From 2803b5e1cd009fe7f67ff2b76311b0c1996649c9 Mon Sep 17 00:00:00 2001 From: Ben Karl Date: Wed, 22 Jul 2026 14:38:32 +0000 Subject: [PATCH] Changes for release v25_0. --- CHANGELOG.md | 4 + lib/google/ads/google_ads/api_versions.rb | 4 +- .../interceptors/logging_interceptor.rb | 4 + .../google_ads/utils/v25/path_lookup_util.rb | 31 + .../v25/actions/book_campaigns_pb.rb | 27 + .../actions/generate_shareable_previews_pb.rb | 31 + .../v25/actions/quote_campaigns_pb.rb | 27 + .../ads/google_ads/v25/common/ad_asset_pb.rb | 36 + .../google_ads/v25/common/ad_type_infos_pb.rb | 62 + .../common/additional_application_info_pb.rb | 25 + .../google_ads/v25/common/asset_policy_pb.rb | 32 + .../v25/common/asset_set_types_pb.rb | 37 + .../google_ads/v25/common/asset_types_pb.rb | 89 + .../google_ads/v25/common/asset_usage_pb.rb | 25 + .../common/audience_insights_attribute_pb.rb | 44 + .../ads/google_ads/v25/common/audiences_pb.rb | 42 + .../ads/google_ads/v25/common/bidding_pb.rb | 46 + .../v25/common/campaign_goal_settings_pb.rb | 29 + .../common/campaign_reservation_quote_pb.rb | 23 + .../v25/common/click_location_pb.rb | 23 + .../ads/google_ads/v25/common/consent_pb.rb | 25 + .../ads/google_ads/v25/common/criteria_pb.rb | 135 + .../criterion_category_availability_pb.rb | 30 + .../v25/common/custom_parameter_pb.rb | 23 + .../v25/common/customizer_value_pb.rb | 26 + .../ads/google_ads/v25/common/dates_pb.rb | 27 + .../v25/common/experiment_types_pb.rb | 27 + .../google_ads/v25/common/extensions_pb.rb | 30 + .../google_ads/v25/common/feed_common_pb.rb | 23 + .../google_ads/v25/common/final_app_url_pb.rb | 25 + .../google_ads/v25/common/frequency_cap_pb.rb | 28 + .../google_ads/v25/common/goal_common_pb.rb | 23 + .../google_ads/v25/common/goal_setting_pb.rb | 28 + .../v25/common/keyword_plan_common_pb.rb | 38 + .../v25/common/local_services_pb.rb | 26 + .../google_ads/v25/common/metric_goal_pb.rb | 26 + .../ads/google_ads/v25/common/metrics_pb.rb | 27 + .../v25/common/offline_user_data_pb.rb | 39 + .../ads/google_ads/v25/common/policy_pb.rb | 40 + .../v25/common/policy_summary_pb.rb | 27 + .../common/real_time_bidding_setting_pb.rb | 23 + .../ads/google_ads/v25/common/segments_pb.rb | 70 + .../google_ads/v25/common/simulation_pb.rb | 36 + .../v25/common/synthetic_content_info_pb.rb | 28 + .../google_ads/v25/common/tag_snippet_pb.rb | 26 + .../v25/common/targeting_setting_pb.rb | 28 + .../google_ads/v25/common/text_label_pb.rb | 23 + .../third_party_integration_partners_pb.rb | 41 + .../v25/common/url_collection_pb.rb | 23 + .../google_ads/v25/common/user_lists_pb.rb | 50 + .../ads/google_ads/v25/common/value_pb.rb | 23 + .../v25/enums/access_invitation_status_pb.rb | 24 + .../google_ads/v25/enums/access_reason_pb.rb | 24 + .../google_ads/v25/enums/access_role_pb.rb | 24 + .../account_budget_proposal_status_pb.rb | 24 + .../enums/account_budget_proposal_type_pb.rb | 24 + .../v25/enums/account_budget_status_pb.rb | 24 + .../v25/enums/account_link_status_pb.rb | 24 + .../v25/enums/ad_destination_type_pb.rb | 24 + .../google_ads/v25/enums/ad_format_type_pb.rb | 24 + .../enums/ad_group_ad_primary_status_pb.rb | 24 + .../ad_group_ad_primary_status_reason_pb.rb | 24 + .../v25/enums/ad_group_ad_rotation_mode_pb.rb | 24 + .../v25/enums/ad_group_ad_status_pb.rb | 24 + .../ad_group_criterion_approval_status_pb.rb | 24 + .../ad_group_criterion_primary_status_pb.rb | 24 + ...roup_criterion_primary_status_reason_pb.rb | 24 + .../v25/enums/ad_group_criterion_status_pb.rb | 24 + .../v25/enums/ad_group_primary_status_pb.rb | 24 + .../ad_group_primary_status_reason_pb.rb | 24 + .../v25/enums/ad_group_status_pb.rb | 24 + .../google_ads/v25/enums/ad_group_type_pb.rb | 24 + .../v25/enums/ad_network_type_pb.rb | 24 + .../ad_serving_optimization_status_pb.rb | 24 + .../enums/ad_strength_action_item_type_pb.rb | 24 + .../google_ads/v25/enums/ad_strength_pb.rb | 24 + .../v25/enums/ad_sub_format_type_pb.rb | 24 + .../v25/enums/ad_sub_network_type_pb.rb | 24 + .../ads/google_ads/v25/enums/ad_type_pb.rb | 24 + .../enums/advertising_channel_sub_type_pb.rb | 24 + .../v25/enums/advertising_channel_type_pb.rb | 24 + .../google_ads/v25/enums/age_range_type_pb.rb | 24 + .../android_privacy_interaction_type_pb.rb | 24 + .../enums/android_privacy_network_type_pb.rb | 24 + .../v25/enums/app_bidding_goal_pb.rb | 24 + .../v25/enums/app_campaign_app_store_pb.rb | 24 + ..._campaign_bidding_strategy_goal_type_pb.rb | 24 + .../v25/enums/app_payment_model_type_pb.rb | 24 + .../enums/app_url_operating_system_type_pb.rb | 24 + .../v25/enums/application_instance_pb.rb | 24 + .../v25/enums/asset_automation_status_pb.rb | 24 + .../v25/enums/asset_automation_type_pb.rb | 24 + ...erage_video_aspect_ratio_requirement_pb.rb | 24 + .../v25/enums/asset_field_type_pb.rb | 24 + .../enums/asset_group_primary_status_pb.rb | 24 + .../asset_group_primary_status_reason_pb.rb | 24 + .../asset_group_signal_approval_status_pb.rb | 24 + .../v25/enums/asset_group_status_pb.rb | 24 + .../v25/enums/asset_link_primary_status_pb.rb | 24 + .../asset_link_primary_status_reason_pb.rb | 24 + .../v25/enums/asset_link_status_pb.rb | 24 + ...set_offline_evaluation_error_reasons_pb.rb | 24 + .../v25/enums/asset_orientation_pb.rb | 24 + .../v25/enums/asset_performance_label_pb.rb | 24 + .../v25/enums/asset_set_asset_status_pb.rb | 24 + .../v25/enums/asset_set_link_status_pb.rb | 24 + .../v25/enums/asset_set_status_pb.rb | 24 + .../google_ads/v25/enums/asset_set_type_pb.rb | 24 + .../google_ads/v25/enums/asset_source_pb.rb | 24 + .../ads/google_ads/v25/enums/asset_type_pb.rb | 24 + .../v25/enums/async_action_status_pb.rb | 24 + .../v25/enums/attribution_model_pb.rb | 24 + .../enums/audience_insights_dimension_pb.rb | 24 + ...udience_insights_marketing_objective_pb.rb | 24 + .../google_ads/v25/enums/audience_scope_pb.rb | 24 + .../v25/enums/audience_status_pb.rb | 24 + .../v25/enums/batch_job_status_pb.rb | 24 + .../benchmarks_marketing_objective_pb.rb | 24 + .../v25/enums/benchmarks_source_type_pb.rb | 24 + .../enums/benchmarks_time_granularity_pb.rb | 24 + .../v25/enums/bid_modifier_source_pb.rb | 24 + .../google_ads/v25/enums/bidding_source_pb.rb | 24 + .../v25/enums/bidding_strategy_status_pb.rb | 24 + .../bidding_strategy_system_status_pb.rb | 24 + .../v25/enums/bidding_strategy_type_pb.rb | 24 + .../v25/enums/billing_setup_status_pb.rb | 24 + .../google_ads/v25/enums/booking_status_pb.rb | 24 + .../brand_request_rejection_reason_pb.rb | 24 + .../v25/enums/brand_safety_suitability_pb.rb | 24 + .../google_ads/v25/enums/brand_state_pb.rb | 24 + .../budget_campaign_association_status_pb.rb | 24 + .../v25/enums/budget_delivery_method_pb.rb | 24 + .../google_ads/v25/enums/budget_period_pb.rb | 24 + .../google_ads/v25/enums/budget_status_pb.rb | 24 + .../google_ads/v25/enums/budget_type_pb.rb | 24 + ...business_message_call_to_action_type_pb.rb | 24 + .../v25/enums/business_message_provider_pb.rb | 24 + .../call_conversion_reporting_state_pb.rb | 24 + .../v25/enums/call_to_action_type_pb.rb | 24 + .../call_tracking_display_location_pb.rb | 24 + .../ads/google_ads/v25/enums/call_type_pb.rb | 24 + .../v25/enums/campaign_criterion_status_pb.rb | 24 + .../v25/enums/campaign_draft_status_pb.rb | 24 + .../v25/enums/campaign_experiment_type_pb.rb | 24 + .../v25/enums/campaign_group_status_pb.rb | 24 + .../enums/campaign_keyword_match_type_pb.rb | 24 + .../v25/enums/campaign_primary_status_pb.rb | 24 + .../campaign_primary_status_reason_pb.rb | 24 + .../v25/enums/campaign_serving_status_pb.rb | 24 + .../enums/campaign_shared_set_status_pb.rb | 24 + .../v25/enums/campaign_status_pb.rb | 24 + .../v25/enums/chain_relationship_type_pb.rb | 24 + .../v25/enums/change_client_type_pb.rb | 24 + .../enums/change_event_resource_type_pb.rb | 24 + .../v25/enums/change_status_operation_pb.rb | 24 + .../enums/change_status_resource_type_pb.rb | 24 + .../ads/google_ads/v25/enums/click_type_pb.rb | 24 + .../v25/enums/combined_audience_status_pb.rb | 24 + .../google_ads/v25/enums/consent_status_pb.rb | 24 + ...t_creator_insights_supplemental_data_pb.rb | 24 + .../v25/enums/content_label_type_pb.rb | 24 + .../enums/conversion_action_category_pb.rb | 24 + .../conversion_action_counting_type_pb.rb | 24 + .../v25/enums/conversion_action_status_pb.rb | 24 + .../v25/enums/conversion_action_type_pb.rb | 24 + .../enums/conversion_adjustment_type_pb.rb | 24 + .../conversion_attribution_event_type_pb.rb | 24 + .../conversion_custom_variable_status_pb.rb | 24 + .../v25/enums/conversion_customer_type_pb.rb | 24 + .../enums/conversion_environment_enum_pb.rb | 24 + .../v25/enums/conversion_lag_bucket_pb.rb | 24 + .../conversion_or_adjustment_lag_bucket_pb.rb | 24 + .../v25/enums/conversion_origin_pb.rb | 24 + .../conversion_tracking_status_enum_pb.rb | 24 + ...version_value_rule_primary_dimension_pb.rb | 24 + .../conversion_value_rule_set_status_pb.rb | 24 + .../enums/conversion_value_rule_status_pb.rb | 24 + ...prior_engagement_type_and_ltv_bucket_pb.rb | 24 + ...n_category_channel_availability_mode_pb.rb | 24 + ...on_category_locale_availability_mode_pb.rb | 24 + .../criterion_system_serving_status_pb.rb | 24 + .../google_ads/v25/enums/criterion_type_pb.rb | 24 + .../enums/custom_audience_member_type_pb.rb | 24 + .../v25/enums/custom_audience_status_pb.rb | 24 + .../v25/enums/custom_audience_type_pb.rb | 24 + .../enums/custom_conversion_goal_status_pb.rb | 24 + .../enums/custom_interest_member_type_pb.rb | 24 + .../v25/enums/custom_interest_status_pb.rb | 24 + .../v25/enums/custom_interest_type_pb.rb | 24 + ...lifecycle_optimization_goal_sub_type_pb.rb | 24 + ...customer_lifecycle_optimization_mode_pb.rb | 24 + .../customer_match_upload_key_type_pb.rb | 24 + ...onversion_eligibility_failure_reason_pb.rb | 24 + .../v25/enums/customer_status_pb.rb | 24 + .../enums/customizer_attribute_status_pb.rb | 24 + .../v25/enums/customizer_attribute_type_pb.rb | 24 + .../v25/enums/customizer_value_status_pb.rb | 24 + .../v25/enums/data_driven_model_status_pb.rb | 24 + .../v25/enums/data_link_status_pb.rb | 24 + .../google_ads/v25/enums/data_link_type_pb.rb | 24 + .../google_ads/v25/enums/day_of_week_pb.rb | 24 + .../v25/enums/demand_gen_channel_config_pb.rb | 24 + .../enums/demand_gen_channel_strategy_pb.rb | 24 + .../ads/google_ads/v25/enums/device_pb.rb | 24 + .../v25/enums/display_ad_format_setting_pb.rb | 24 + .../enums/display_upload_product_type_pb.rb | 24 + .../v25/enums/distance_bucket_pb.rb | 24 + .../eu_political_advertising_status_pb.rb | 24 + .../experiment_asset_detail_operation_pb.rb | 24 + .../enums/experiment_metric_direction_pb.rb | 24 + .../v25/enums/experiment_metric_pb.rb | 24 + .../v25/enums/experiment_status_pb.rb | 24 + .../v25/enums/experiment_type_pb.rb | 24 + .../enums/external_conversion_source_pb.rb | 24 + .../google_ads/v25/enums/fixed_cpm_goal_pb.rb | 24 + ...fixed_cpm_target_frequency_time_unit_pb.rb | 24 + .../v25/enums/frequency_cap_event_type_pb.rb | 24 + .../v25/enums/frequency_cap_level_pb.rb | 24 + .../v25/enums/frequency_cap_time_unit_pb.rb | 24 + .../google_ads/v25/enums/gender_type_pb.rb | 24 + .../enums/geo_target_constant_status_pb.rb | 24 + .../v25/enums/geo_targeting_type_pb.rb | 24 + .../v25/enums/gls_phone_number_type_pb.rb | 24 + .../v25/enums/goal_config_level_pb.rb | 24 + .../enums/goal_optimization_eligibility_pb.rb | 24 + .../ads/google_ads/v25/enums/goal_type_pb.rb | 24 + .../v25/enums/google_ads_field_category_pb.rb | 24 + .../enums/google_ads_field_data_type_pb.rb | 24 + .../v25/enums/google_voice_call_status_pb.rb | 24 + .../enums/hotel_asset_suggestion_status_pb.rb | 24 + .../v25/enums/hotel_date_selection_type_pb.rb | 24 + .../v25/enums/hotel_price_bucket_pb.rb | 24 + .../v25/enums/hotel_rate_type_pb.rb | 24 + .../enums/hotel_reconciliation_status_pb.rb | 24 + .../enums/identity_verification_program_pb.rb | 24 + ...identity_verification_program_status_pb.rb | 24 + .../v25/enums/incentive_offer_type_pb.rb | 24 + .../v25/enums/incentive_state_pb.rb | 24 + .../google_ads/v25/enums/incentive_type_pb.rb | 24 + .../v25/enums/income_range_type_pb.rb | 24 + ..._knowledge_graph_entity_capabilities_pb.rb | 24 + .../google_ads/v25/enums/insights_trend_pb.rb | 24 + .../v25/enums/interaction_event_type_pb.rb | 24 + .../v25/enums/interaction_type_pb.rb | 24 + .../google_ads/v25/enums/invoice_type_pb.rb | 24 + .../v25/enums/keyword_match_type_pb.rb | 24 + .../keyword_plan_aggregate_metric_type_pb.rb | 24 + .../keyword_plan_competition_level_pb.rb | 24 + .../keyword_plan_concept_group_type_pb.rb | 24 + .../keyword_plan_forecast_interval_pb.rb | 24 + .../keyword_plan_keyword_annotation_pb.rb | 24 + .../v25/enums/keyword_plan_network_pb.rb | 24 + .../google_ads/v25/enums/label_status_pb.rb | 24 + .../v25/enums/landing_page_source_pb.rb | 24 + .../enums/lead_form_call_to_action_type_pb.rb | 24 + .../v25/enums/lead_form_desired_intent_pb.rb | 24 + .../lead_form_field_user_input_type_pb.rb | 24 + ...form_post_submit_call_to_action_type_pb.rb | 24 + .../legacy_app_install_ad_app_store_pb.rb | 24 + .../v25/enums/linked_account_type_pb.rb | 24 + .../v25/enums/linked_product_type_pb.rb | 24 + ..._group_filter_custom_attribute_index_pb.rb | 24 + .../listing_group_filter_listing_source_pb.rb | 24 + ..._group_filter_product_category_level_pb.rb | 24 + ...listing_group_filter_product_channel_pb.rb | 24 + ...sting_group_filter_product_condition_pb.rb | 24 + ...ting_group_filter_product_type_level_pb.rb | 24 + .../listing_group_filter_type_enum_pb.rb | 24 + .../v25/enums/listing_group_type_pb.rb | 24 + .../google_ads/v25/enums/listing_type_pb.rb | 24 + ..._registration_check_rejection_reason_pb.rb | 24 + ..._services_business_registration_type_pb.rb | 24 + .../local_services_conversation_type_pb.rb | 24 + .../local_services_employee_status_pb.rb | 24 + .../enums/local_services_employee_type_pb.rb | 24 + ..._services_insurance_rejection_reason_pb.rb | 24 + ...rvices_lead_credit_issuance_decision_pb.rb | 24 + .../local_services_lead_credit_state_pb.rb | 24 + .../enums/local_services_lead_status_pb.rb | 24 + .../local_services_lead_survey_answer_pb.rb | 24 + ...ices_lead_survey_dissatisfied_reason_pb.rb | 24 + ...ervices_lead_survey_satisfied_reason_pb.rb | 24 + .../v25/enums/local_services_lead_type_pb.rb | 24 + ...al_services_license_rejection_reason_pb.rb | 24 + .../local_services_participant_type_pb.rb | 24 + ...ervices_verification_artifact_status_pb.rb | 24 + ..._services_verification_artifact_type_pb.rb | 24 + .../local_services_verification_status_pb.rb | 24 + .../enums/location_group_radius_units_pb.rb | 24 + .../v25/enums/location_ownership_type_pb.rb | 24 + .../v25/enums/location_source_type_pb.rb | 24 + .../enums/location_string_filter_type_pb.rb | 24 + .../v25/enums/lookalike_expansion_level_pb.rb | 24 + .../v25/enums/manager_link_status_pb.rb | 24 + .../ads/google_ads/v25/enums/match_type_pb.rb | 24 + .../ads/google_ads/v25/enums/media_type_pb.rb | 24 + .../enums/messaging_restriction_type_pb.rb | 24 + .../ads/google_ads/v25/enums/mime_type_pb.rb | 24 + .../google_ads/v25/enums/minute_of_hour_pb.rb | 24 + .../v25/enums/mobile_app_vendor_pb.rb | 24 + .../v25/enums/mobile_device_platform_pb.rb | 24 + .../v25/enums/mobile_device_type_pb.rb | 24 + .../google_ads/v25/enums/month_of_year_pb.rb | 24 + .../multi_party_auth_operation_type_pb.rb | 24 + .../multi_party_auth_review_status_pb.rb | 24 + ...ti_party_auth_review_target_resource_pb.rb | 24 + .../v25/enums/negative_geo_target_type_pb.rb | 24 + .../enums/non_skippable_max_duration_pb.rb | 24 + .../enums/non_skippable_min_duration_pb.rb | 24 + ...ne_conversion_diagnostic_status_enum_pb.rb | 24 + .../offline_event_upload_client_enum_pb.rb | 24 + ...offline_user_data_job_failure_reason_pb.rb | 24 + ...fline_user_data_job_match_rate_range_pb.rb | 24 + .../enums/offline_user_data_job_status_pb.rb | 24 + .../enums/offline_user_data_job_type_pb.rb | 24 + ...erating_system_version_operator_type_pb.rb | 24 + .../v25/enums/optimization_goal_type_pb.rb | 24 + .../optimize_assets_experiment_subtype_pb.rb | 24 + .../v25/enums/parental_status_type_pb.rb | 24 + .../v25/enums/partnership_opportunity_pb.rb | 24 + .../google_ads/v25/enums/payment_mode_pb.rb | 24 + .../performance_max_upgrade_status_pb.rb | 24 + .../google_ads/v25/enums/placement_type_pb.rb | 24 + .../v25/enums/policy_approval_status_pb.rb | 24 + .../v25/enums/policy_review_status_pb.rb | 24 + .../v25/enums/policy_topic_entry_type_pb.rb | 24 + ...idence_destination_mismatch_url_type_pb.rb | 24 + ...dence_destination_not_working_device_pb.rb | 24 + ...stination_not_working_dns_error_type_pb.rb | 24 + .../v25/enums/positive_geo_target_type_pb.rb | 24 + .../google_ads/v25/enums/preview_type_pb.rb | 24 + .../price_extension_price_qualifier_pb.rb | 24 + .../enums/price_extension_price_unit_pb.rb | 24 + .../v25/enums/price_extension_type_pb.rb | 24 + .../v25/enums/product_availability_pb.rb | 24 + .../v25/enums/product_category_level_pb.rb | 24 + .../v25/enums/product_category_state_pb.rb | 24 + .../enums/product_channel_exclusivity_pb.rb | 24 + .../v25/enums/product_channel_pb.rb | 24 + .../v25/enums/product_condition_pb.rb | 24 + .../product_custom_attribute_index_pb.rb | 24 + .../v25/enums/product_issue_severity_pb.rb | 24 + .../product_link_invitation_status_pb.rb | 24 + .../google_ads/v25/enums/product_status_pb.rb | 24 + .../v25/enums/product_type_level_pb.rb | 24 + .../v25/enums/promotion_barcode_type_pb.rb | 24 + ...romotion_extension_discount_modifier_pb.rb | 24 + .../enums/promotion_extension_occasion_pb.rb | 24 + .../v25/enums/proximity_radius_units_pb.rb | 24 + .../v25/enums/quality_score_bucket_pb.rb | 24 + .../v25/enums/reach_plan_age_range_pb.rb | 24 + .../v25/enums/reach_plan_buying_method_pb.rb | 24 + .../reach_plan_conversion_rate_model_pb.rb | 24 + .../v25/enums/reach_plan_cost_model_pb.rb | 24 + .../reach_plan_marketing_objective_pb.rb | 24 + .../v25/enums/reach_plan_network_pb.rb | 24 + ...each_plan_plannable_user_list_status_pb.rb | 24 + .../v25/enums/reach_plan_surface_pb.rb | 24 + .../recommendation_subscription_status_pb.rb | 24 + .../v25/enums/recommendation_type_pb.rb | 24 + .../v25/enums/regulatory_fee_type_pb.rb | 24 + .../v25/enums/reservation_request_type_pb.rb | 24 + .../v25/enums/resource_change_operation_pb.rb | 24 + .../v25/enums/resource_limit_type_pb.rb | 24 + .../v25/enums/response_content_type_pb.rb | 24 + .../search_engine_results_page_type_pb.rb | 24 + .../v25/enums/search_term_match_source_pb.rb | 24 + .../v25/enums/search_term_match_type_pb.rb | 24 + .../enums/search_term_targeting_status_pb.rb | 24 + .../v25/enums/seasonality_event_scope_pb.rb | 24 + .../v25/enums/seasonality_event_status_pb.rb | 24 + .../v25/enums/served_asset_field_type_pb.rb | 24 + .../v25/enums/shared_set_status_pb.rb | 24 + .../v25/enums/shared_set_type_pb.rb | 24 + ...ucts_to_campaign_recommendation_enum_pb.rb | 24 + .../simulation_modification_method_pb.rb | 24 + .../v25/enums/simulation_type_pb.rb | 24 + .../enums/sk_ad_network_ad_event_type_pb.rb | 24 + .../sk_ad_network_attribution_credit_pb.rb | 24 + ...k_ad_network_coarse_conversion_value_pb.rb | 24 + .../v25/enums/sk_ad_network_source_type_pb.rb | 24 + .../v25/enums/sk_ad_network_user_type_pb.rb | 24 + .../ads/google_ads/v25/enums/slot_pb.rb | 24 + .../smart_campaign_not_eligible_reason_pb.rb | 24 + .../v25/enums/smart_campaign_status_pb.rb | 24 + .../v25/enums/spending_limit_type_pb.rb | 24 + .../v25/enums/summary_row_setting_pb.rb | 24 + ...synthetic_content_attestation_status_pb.rb | 24 + .../v25/enums/synthetic_content_source_pb.rb | 24 + .../enums/system_managed_entity_source_pb.rb | 24 + ...arget_cpa_opt_in_recommendation_goal_pb.rb | 24 + .../enums/target_frequency_time_unit_pb.rb | 24 + .../target_impression_share_location_pb.rb | 24 + .../v25/enums/targeting_dimension_pb.rb | 24 + ...party_brand_lift_integration_partner_pb.rb | 24 + ...rty_brand_safety_integration_partner_pb.rb | 24 + ...sion_attribution_integration_partner_pb.rb | 24 + ...hird_party_reach_integration_partner_pb.rb | 24 + ...arty_viewability_integration_partner_pb.rb | 24 + .../ads/google_ads/v25/enums/time_type_pb.rb | 24 + .../v25/enums/tracking_code_page_format_pb.rb | 24 + .../v25/enums/tracking_code_type_pb.rb | 24 + .../v25/enums/unit_of_measure_pb.rb | 24 + .../v25/enums/user_identifier_source_pb.rb | 24 + .../enums/user_interest_taxonomy_type_pb.rb | 24 + .../v25/enums/user_list_access_status_pb.rb | 24 + .../v25/enums/user_list_closing_reason_pb.rb | 24 + .../user_list_crm_data_source_type_pb.rb | 24 + .../user_list_customer_type_category_pb.rb | 24 + .../user_list_date_rule_item_operator_pb.rb | 24 + .../user_list_flexible_rule_operator_pb.rb | 24 + .../user_list_logical_rule_operator_pb.rb | 24 + .../enums/user_list_membership_status_pb.rb | 24 + .../user_list_number_rule_item_operator_pb.rb | 24 + .../user_list_prepopulation_status_pb.rb | 24 + .../v25/enums/user_list_rule_type_pb.rb | 24 + .../v25/enums/user_list_size_range_pb.rb | 24 + .../user_list_string_rule_item_operator_pb.rb | 24 + .../google_ads/v25/enums/user_list_type_pb.rb | 24 + .../v25/enums/value_rule_device_type_pb.rb | 24 + .../value_rule_geo_location_match_type_pb.rb | 24 + .../v25/enums/value_rule_operation_pb.rb | 24 + .../value_rule_set_attachment_type_pb.rb | 24 + .../v25/enums/value_rule_set_dimension_pb.rb | 24 + .../vanity_pharma_display_url_mode_pb.rb | 24 + .../v25/enums/vanity_pharma_text_pb.rb | 24 + .../vertical_ads_item_vertical_type_pb.rb | 24 + .../enums/video_ad_format_restriction_pb.rb | 24 + .../video_ad_sequence_interaction_type_pb.rb | 24 + .../video_ad_sequence_minimum_duration_pb.rb | 24 + .../v25/enums/video_enhancement_source_pb.rb | 24 + .../v25/enums/video_experiment_subtype_pb.rb | 24 + .../v25/enums/video_thumbnail_pb.rb | 24 + .../v25/enums/webpage_condition_operand_pb.rb | 24 + .../enums/webpage_condition_operator_pb.rb | 24 + .../v25/enums/youtube_video_privacy_pb.rb | 24 + .../v25/enums/youtube_video_property_pb.rb | 24 + .../enums/youtube_video_upload_state_pb.rb | 24 + .../v25/errors/access_invitation_error_pb.rb | 24 + .../account_budget_proposal_error_pb.rb | 24 + .../v25/errors/account_link_error_pb.rb | 24 + .../google_ads/v25/errors/action_error_pb.rb | 24 + .../v25/errors/ad_customizer_error_pb.rb | 24 + .../ads/google_ads/v25/errors/ad_error_pb.rb | 24 + .../v25/errors/ad_group_ad_error_pb.rb | 24 + .../errors/ad_group_bid_modifier_error_pb.rb | 24 + .../ad_group_criterion_customizer_error_pb.rb | 24 + .../v25/errors/ad_group_criterion_error_pb.rb | 24 + .../errors/ad_group_customizer_error_pb.rb | 24 + .../v25/errors/ad_group_error_pb.rb | 24 + .../v25/errors/ad_group_feed_error_pb.rb | 24 + .../v25/errors/ad_parameter_error_pb.rb | 24 + .../v25/errors/ad_sharing_error_pb.rb | 24 + .../ads/google_ads/v25/errors/adx_error_pb.rb | 24 + .../google_ads/v25/errors/asset_error_pb.rb | 24 + .../v25/errors/asset_generation_error_pb.rb | 24 + .../v25/errors/asset_group_asset_error_pb.rb | 24 + .../v25/errors/asset_group_error_pb.rb | 24 + ...set_group_listing_group_filter_error_pb.rb | 24 + .../v25/errors/asset_group_signal_error_pb.rb | 24 + .../v25/errors/asset_link_error_pb.rb | 24 + .../v25/errors/asset_set_asset_error_pb.rb | 24 + .../v25/errors/asset_set_error_pb.rb | 24 + .../v25/errors/asset_set_link_error_pb.rb | 24 + .../v25/errors/audience_error_pb.rb | 24 + .../v25/errors/audience_insights_error_pb.rb | 24 + .../v25/errors/authentication_error_pb.rb | 24 + .../v25/errors/authorization_error_pb.rb | 24 + ...atically_created_asset_removal_error_pb.rb | 24 + .../v25/errors/batch_job_error_pb.rb | 24 + .../v25/errors/benchmarks_error_pb.rb | 24 + .../google_ads/v25/errors/bidding_error_pb.rb | 24 + .../v25/errors/bidding_strategy_error_pb.rb | 24 + .../v25/errors/billing_setup_error_pb.rb | 24 + .../brand_guidelines_migration_error_pb.rb | 24 + .../v25/errors/campaign_budget_error_pb.rb | 24 + .../campaign_conversion_goal_error_pb.rb | 24 + .../v25/errors/campaign_criterion_error_pb.rb | 24 + .../errors/campaign_customizer_error_pb.rb | 24 + .../v25/errors/campaign_draft_error_pb.rb | 24 + .../v25/errors/campaign_error_pb.rb | 24 + .../errors/campaign_experiment_error_pb.rb | 24 + .../v25/errors/campaign_feed_error_pb.rb | 24 + .../errors/campaign_goal_config_error_pb.rb | 24 + .../errors/campaign_shared_set_error_pb.rb | 24 + .../v25/errors/change_event_error_pb.rb | 24 + .../v25/errors/change_status_error_pb.rb | 24 + .../v25/errors/click_view_error_pb.rb | 24 + .../v25/errors/collection_size_error_pb.rb | 24 + .../content_creator_insights_error_pb.rb | 24 + .../google_ads/v25/errors/context_error_pb.rb | 24 + .../v25/errors/conversion_action_error_pb.rb | 24 + .../conversion_adjustment_upload_error_pb.rb | 24 + .../conversion_custom_variable_error_pb.rb | 24 + ...onversion_goal_campaign_config_error_pb.rb | 24 + .../v25/errors/conversion_upload_error_pb.rb | 24 + .../errors/conversion_value_rule_error_pb.rb | 24 + .../conversion_value_rule_set_error_pb.rb | 24 + .../v25/errors/country_code_error_pb.rb | 24 + .../v25/errors/criterion_error_pb.rb | 24 + .../v25/errors/currency_code_error_pb.rb | 24 + .../v25/errors/currency_error_pb.rb | 24 + .../v25/errors/custom_audience_error_pb.rb | 24 + .../errors/custom_conversion_goal_error_pb.rb | 24 + .../v25/errors/custom_interest_error_pb.rb | 24 + .../errors/customer_client_link_error_pb.rb | 24 + .../errors/customer_customizer_error_pb.rb | 24 + .../v25/errors/customer_error_pb.rb | 24 + .../v25/errors/customer_feed_error_pb.rb | 24 + .../errors/customer_manager_link_error_pb.rb | 24 + ...etwork_conversion_value_schema_error_pb.rb | 24 + .../errors/customer_user_access_error_pb.rb | 24 + .../errors/customizer_attribute_error_pb.rb | 24 + .../v25/errors/data_link_error_pb.rb | 24 + .../v25/errors/database_error_pb.rb | 24 + .../google_ads/v25/errors/date_error_pb.rb | 24 + .../v25/errors/date_range_error_pb.rb | 24 + .../v25/errors/distinct_error_pb.rb | 24 + .../google_ads/v25/errors/enum_error_pb.rb | 24 + .../ads/google_ads/v25/errors/errors_pb.rb | 210 + .../v25/errors/experiment_arm_error_pb.rb | 24 + .../v25/errors/experiment_error_pb.rb | 24 + .../errors/extension_feed_item_error_pb.rb | 24 + .../v25/errors/extension_setting_error_pb.rb | 24 + .../feed_attribute_reference_error_pb.rb | 24 + .../google_ads/v25/errors/feed_error_pb.rb | 24 + .../v25/errors/feed_item_error_pb.rb | 24 + .../v25/errors/feed_item_set_error_pb.rb | 24 + .../v25/errors/feed_item_set_link_error_pb.rb | 24 + .../v25/errors/feed_item_target_error_pb.rb | 24 + .../errors/feed_item_validation_error_pb.rb | 24 + .../v25/errors/feed_mapping_error_pb.rb | 24 + .../google_ads/v25/errors/field_error_pb.rb | 24 + .../v25/errors/field_mask_error_pb.rb | 24 + ...final_url_expansion_asset_view_error_pb.rb | 24 + .../v25/errors/function_error_pb.rb | 24 + .../v25/errors/function_parsing_error_pb.rb | 24 + ...geo_target_constant_suggestion_error_pb.rb | 24 + .../google_ads/v25/errors/goal_error_pb.rb | 24 + .../google_ads/v25/errors/header_error_pb.rb | 24 + .../ads/google_ads/v25/errors/id_error_pb.rb | 24 + .../errors/identity_verification_error_pb.rb | 24 + .../google_ads/v25/errors/image_error_pb.rb | 24 + .../v25/errors/incentive_error_pb.rb | 24 + .../v25/errors/internal_error_pb.rb | 24 + .../google_ads/v25/errors/invoice_error_pb.rb | 24 + .../errors/keyword_plan_ad_group_error_pb.rb | 24 + .../keyword_plan_ad_group_keyword_error_pb.rb | 24 + .../errors/keyword_plan_campaign_error_pb.rb | 24 + .../keyword_plan_campaign_keyword_error_pb.rb | 24 + .../v25/errors/keyword_plan_error_pb.rb | 24 + .../v25/errors/keyword_plan_idea_error_pb.rb | 24 + .../google_ads/v25/errors/label_error_pb.rb | 24 + .../v25/errors/language_code_error_pb.rb | 24 + .../v25/errors/list_operation_error_pb.rb | 24 + .../v25/errors/manager_link_error_pb.rb | 24 + .../v25/errors/media_bundle_error_pb.rb | 24 + .../v25/errors/media_file_error_pb.rb | 24 + .../v25/errors/media_upload_error_pb.rb | 24 + .../v25/errors/merchant_center_error_pb.rb | 24 + .../multi_party_auth_review_error_pb.rb | 24 + .../v25/errors/multiplier_error_pb.rb | 24 + .../google_ads/v25/errors/mutate_error_pb.rb | 24 + .../errors/new_resource_creation_error_pb.rb | 24 + .../v25/errors/not_allowlisted_error_pb.rb | 24 + .../v25/errors/not_empty_error_pb.rb | 24 + .../google_ads/v25/errors/null_error_pb.rb | 24 + .../errors/offline_user_data_job_error_pb.rb | 24 + .../operation_access_denied_error_pb.rb | 24 + .../v25/errors/operator_error_pb.rb | 24 + .../v25/errors/partial_failure_error_pb.rb | 24 + .../v25/errors/payments_account_error_pb.rb | 24 + .../v25/errors/policy_finding_error_pb.rb | 24 + .../policy_validation_parameter_error_pb.rb | 24 + .../v25/errors/policy_violation_error_pb.rb | 24 + .../v25/errors/product_link_error_pb.rb | 24 + .../product_link_invitation_error_pb.rb | 24 + .../google_ads/v25/errors/query_error_pb.rb | 24 + .../google_ads/v25/errors/quota_error_pb.rb | 24 + .../google_ads/v25/errors/range_error_pb.rb | 24 + .../v25/errors/reach_plan_error_pb.rb | 24 + .../v25/errors/recommendation_error_pb.rb | 24 + .../recommendation_subscription_error_pb.rb | 24 + .../v25/errors/region_code_error_pb.rb | 24 + .../google_ads/v25/errors/request_error_pb.rb | 24 + .../errors/resource_access_denied_error_pb.rb | 24 + .../resource_count_limit_exceeded_error_pb.rb | 24 + .../errors/search_term_insight_error_pb.rb | 24 + .../google_ads/v25/errors/setting_error_pb.rb | 24 + .../v25/errors/shareable_preview_error_pb.rb | 24 + .../v25/errors/shared_criterion_error_pb.rb | 24 + .../v25/errors/shared_set_error_pb.rb | 24 + .../v25/errors/shopping_product_error_pb.rb | 24 + .../v25/errors/size_limit_error_pb.rb | 24 + .../v25/errors/smart_campaign_error_pb.rb | 24 + .../v25/errors/string_format_error_pb.rb | 24 + .../v25/errors/string_length_error_pb.rb | 24 + ...third_party_app_analytics_link_error_pb.rb | 24 + .../v25/errors/time_zone_error_pb.rb | 24 + .../v25/errors/url_field_error_pb.rb | 24 + .../v25/errors/user_data_error_pb.rb | 24 + .../user_list_customer_type_error_pb.rb | 24 + .../v25/errors/user_list_error_pb.rb | 24 + .../v25/errors/video_campaign_error_pb.rb | 24 + .../v25/errors/video_reservation_error_pb.rb | 24 + .../youtube_video_registration_error_pb.rb | 24 + .../accessible_bidding_strategy_pb.rb | 34 + .../v25/resources/account_budget_pb.rb | 31 + .../resources/account_budget_proposal_pb.rb | 30 + .../v25/resources/account_link_pb.rb | 30 + .../ad_group_ad_asset_combination_view_pb.rb | 27 + .../resources/ad_group_ad_asset_view_pb.rb | 34 + .../v25/resources/ad_group_ad_label_pb.rb | 26 + .../v25/resources/ad_group_ad_pb.rb | 38 + .../v25/resources/ad_group_asset_pb.rb | 32 + .../v25/resources/ad_group_asset_set_pb.rb | 27 + .../resources/ad_group_audience_view_pb.rb | 26 + .../v25/resources/ad_group_bid_modifier_pb.rb | 28 + .../ad_group_criterion_customizer_pb.rb | 28 + .../resources/ad_group_criterion_label_pb.rb | 26 + .../v25/resources/ad_group_criterion_pb.rb | 38 + .../ad_group_criterion_simulation_pb.rb | 29 + .../v25/resources/ad_group_customizer_pb.rb | 28 + .../v25/resources/ad_group_label_pb.rb | 26 + .../google_ads/v25/resources/ad_group_pb.rb | 47 + .../v25/resources/ad_group_simulation_pb.rb | 29 + .../v25/resources/ad_parameter_pb.rb | 26 + .../ads/google_ads/v25/resources/ad_pb.rb | 34 + .../v25/resources/ad_schedule_view_pb.rb | 26 + .../v25/resources/age_range_view_pb.rb | 26 + ..._max_search_term_ad_combination_view_pb.rb | 26 + ...d_privacy_shared_key_google_ad_group_pb.rb | 28 + ...d_privacy_shared_key_google_campaign_pb.rb | 27 + ...ivacy_shared_key_google_network_type_pb.rb | 28 + .../resources/app_top_combination_view_pb.rb | 28 + .../v25/resources/applied_incentive_pb.rb | 27 + .../v25/resources/asset_field_type_view_pb.rb | 27 + .../v25/resources/asset_group_asset_pb.rb | 33 + .../asset_group_listing_group_filter_pb.rb | 45 + .../v25/resources/asset_group_pb.rb | 38 + .../asset_group_product_group_view_pb.rb | 26 + .../v25/resources/asset_group_signal_pb.rb | 28 + .../asset_group_top_combination_view_pb.rb | 28 + .../ads/google_ads/v25/resources/asset_pb.rb | 38 + .../v25/resources/asset_set_asset_pb.rb | 27 + .../google_ads/v25/resources/asset_set_pb.rb | 33 + .../v25/resources/asset_set_type_view_pb.rb | 27 + .../google_ads/v25/resources/audience_pb.rb | 29 + .../google_ads/v25/resources/batch_job_pb.rb | 28 + .../resources/bidding_data_exclusion_pb.rb | 30 + .../bidding_seasonality_adjustment_pb.rb | 30 + .../v25/resources/bidding_strategy_pb.rb | 29 + .../bidding_strategy_simulation_pb.rb | 29 + .../v25/resources/billing_setup_pb.rb | 29 + .../google_ads/v25/resources/call_view_pb.rb | 29 + .../campaign_aggregate_asset_view_pb.rb | 28 + .../v25/resources/campaign_asset_pb.rb | 32 + .../v25/resources/campaign_asset_set_pb.rb | 27 + .../resources/campaign_audience_view_pb.rb | 26 + .../v25/resources/campaign_bid_modifier_pb.rb | 27 + .../v25/resources/campaign_budget_pb.rb | 30 + .../resources/campaign_conversion_goal_pb.rb | 28 + .../v25/resources/campaign_criterion_pb.rb | 29 + .../v25/resources/campaign_customizer_pb.rb | 28 + .../v25/resources/campaign_draft_pb.rb | 27 + .../v25/resources/campaign_goal_config_pb.rb | 28 + .../v25/resources/campaign_group_pb.rb | 27 + .../v25/resources/campaign_label_pb.rb | 26 + .../google_ads/v25/resources/campaign_pb.rb | 102 + .../campaign_search_term_insight_pb.rb | 26 + .../resources/campaign_search_term_view_pb.rb | 26 + .../v25/resources/campaign_shared_set_pb.rb | 27 + .../v25/resources/campaign_simulation_pb.rb | 29 + .../v25/resources/carrier_constant_pb.rb | 26 + .../v25/resources/cart_data_sales_view_pb.rb | 26 + .../v25/resources/change_event_pb.rb | 46 + .../v25/resources/change_status_pb.rb | 28 + .../channel_aggregate_asset_view_pb.rb | 29 + .../google_ads/v25/resources/click_view_pb.rb | 28 + .../v25/resources/combined_audience_pb.rb | 27 + .../resources/content_criterion_view_pb.rb | 26 + .../v25/resources/conversion_action_pb.rb | 40 + .../conversion_custom_variable_pb.rb | 27 + .../conversion_goal_campaign_config_pb.rb | 27 + .../v25/resources/conversion_value_rule_pb.rb | 38 + .../resources/conversion_value_rule_set_pb.rb | 30 + .../v25/resources/currency_constant_pb.rb | 26 + .../v25/resources/custom_audience_pb.rb | 30 + .../resources/custom_conversion_goal_pb.rb | 27 + .../v25/resources/custom_interest_pb.rb | 30 + .../v25/resources/customer_asset_pb.rb | 32 + .../v25/resources/customer_asset_set_pb.rb | 27 + .../v25/resources/customer_client_link_pb.rb | 27 + .../v25/resources/customer_client_pb.rb | 27 + .../resources/customer_conversion_goal_pb.rb | 28 + .../v25/resources/customer_customizer_pb.rb | 28 + .../v25/resources/customer_label_pb.rb | 26 + .../v25/resources/customer_manager_link_pb.rb | 27 + .../customer_negative_criterion_pb.rb | 28 + .../google_ads/v25/resources/customer_pb.rb | 41 + .../customer_search_term_insight_pb.rb | 26 + ...k_ad_network_conversion_value_schema_pb.rb | 35 + .../customer_user_access_invitation_pb.rb | 28 + .../v25/resources/customer_user_access_pb.rb | 27 + .../v25/resources/customizer_attribute_pb.rb | 28 + .../google_ads/v25/resources/data_link_pb.rb | 30 + ...l_content_suitability_placement_view_pb.rb | 27 + .../v25/resources/detail_placement_view_pb.rb | 27 + .../v25/resources/detailed_demographic_pb.rb | 27 + .../v25/resources/display_keyword_view_pb.rb | 26 + .../v25/resources/distance_view_pb.rb | 27 + .../v25/resources/domain_category_pb.rb | 26 + .../dynamic_search_ads_search_term_view_pb.rb | 26 + .../expanded_landing_page_view_pb.rb | 26 + .../v25/resources/experiment_arm_pb.rb | 36 + .../google_ads/v25/resources/experiment_pb.rb | 31 + .../final_url_expansion_asset_view_pb.rb | 28 + .../v25/resources/gender_view_pb.rb | 26 + .../v25/resources/geo_target_constant_pb.rb | 27 + .../v25/resources/geographic_view_pb.rb | 27 + .../ads/google_ads/v25/resources/goal_pb.rb | 29 + .../v25/resources/google_ads_field_pb.rb | 28 + ...p_content_suitability_placement_view_pb.rb | 27 + .../v25/resources/group_placement_view_pb.rb | 27 + .../v25/resources/hotel_group_view_pb.rb | 26 + .../resources/hotel_performance_view_pb.rb | 26 + .../v25/resources/hotel_reconciliation_pb.rb | 27 + .../v25/resources/income_range_view_pb.rb | 26 + .../google_ads/v25/resources/invoice_pb.rb | 37 + .../keyword_plan_ad_group_keyword_pb.rb | 27 + .../v25/resources/keyword_plan_ad_group_pb.rb | 26 + .../keyword_plan_campaign_keyword_pb.rb | 27 + .../v25/resources/keyword_plan_campaign_pb.rb | 28 + .../v25/resources/keyword_plan_pb.rb | 29 + .../resources/keyword_theme_constant_pb.rb | 26 + .../v25/resources/keyword_view_pb.rb | 26 + .../ads/google_ads/v25/resources/label_pb.rb | 28 + .../v25/resources/landing_page_view_pb.rb | 26 + .../v25/resources/language_constant_pb.rb | 26 + .../resources/lead_form_submission_data_pb.rb | 29 + .../google_ads/v25/resources/life_event_pb.rb | 27 + .../resources/local_services_employee_pb.rb | 31 + .../local_services_lead_conversation_pb.rb | 30 + .../v25/resources/local_services_lead_pb.rb | 32 + ...local_services_verification_artifact_pb.rb | 39 + .../resources/location_interest_view_pb.rb | 26 + .../v25/resources/location_view_pb.rb | 26 + .../resources/managed_placement_view_pb.rb | 26 + .../matched_location_interest_view_pb.rb | 26 + .../google_ads/v25/resources/media_file_pb.rb | 32 + .../mobile_app_category_constant_pb.rb | 26 + .../resources/mobile_device_constant_pb.rb | 27 + .../resources/multi_party_auth_review_pb.rb | 33 + ...ine_conversion_upload_client_summary_pb.rb | 41 + ...ion_upload_conversion_action_summary_pb.rb | 29 + .../v25/resources/offline_user_data_job_pb.rb | 32 + .../operating_system_version_constant_pb.rb | 27 + .../paid_organic_search_term_view_pb.rb | 26 + .../v25/resources/parental_status_view_pb.rb | 26 + .../v25/resources/payments_account_pb.rb | 26 + .../v25/resources/per_store_view_pb.rb | 26 + .../performance_max_placement_view_pb.rb | 27 + .../resources/product_category_constant_pb.rb | 29 + .../v25/resources/product_group_view_pb.rb | 26 + .../resources/product_link_invitation_pb.rb | 32 + .../v25/resources/product_link_pb.rb | 32 + .../v25/resources/qualifying_question_pb.rb | 26 + .../v25/resources/recommendation_pb.rb | 88 + .../recommendation_subscription_pb.rb | 28 + .../v25/resources/remarketing_action_pb.rb | 27 + .../v25/resources/search_term_view_pb.rb | 27 + .../v25/resources/shared_criterion_pb.rb | 28 + .../google_ads/v25/resources/shared_set_pb.rb | 29 + .../resources/shopping_performance_view_pb.rb | 26 + .../v25/resources/shopping_product_pb.rb | 33 + .../smart_campaign_search_term_view_pb.rb | 26 + .../resources/smart_campaign_setting_pb.rb | 28 + .../resources/targeting_expansion_view_pb.rb | 26 + .../third_party_app_analytics_link_pb.rb | 26 + .../v25/resources/topic_constant_pb.rb | 26 + .../google_ads/v25/resources/topic_view_pb.rb | 26 + .../travel_activity_group_view_pb.rb | 26 + .../travel_activity_performance_view_pb.rb | 26 + .../v25/resources/user_interest_pb.rb | 28 + .../resources/user_list_customer_type_pb.rb | 27 + .../google_ads/v25/resources/user_list_pb.rb | 33 + .../v25/resources/user_location_view_pb.rb | 26 + .../v25/resources/video_enhancement_pb.rb | 27 + .../ads/google_ads/v25/resources/video_pb.rb | 26 + .../v25/resources/webpage_view_pb.rb | 26 + .../v25/resources/youtube_video_upload_pb.rb | 28 + lib/google/ads/google_ads/v25/services.rb | 151 + .../account_budget_proposal_service.rb | 59 + .../account_budget_proposal_service/client.rb | 508 +++ .../credentials.rb | 38 + .../account_budget_proposal_service/paths.rb | 86 + .../account_budget_proposal_service_pb.rb | 33 + ...unt_budget_proposal_service_services_pb.rb | 73 + .../v25/services/account_link_service.rb | 52 + .../services/account_link_service/client.rb | 610 +++ .../account_link_service/credentials.rb | 38 + .../services/account_link_service/paths.rb | 52 + .../v25/services/account_link_service_pb.rb | 36 + .../account_link_service_services_pb.rb | 76 + .../v25/services/ad_group_ad_label_service.rb | 51 + .../ad_group_ad_label_service/client.rb | 501 +++ .../ad_group_ad_label_service/credentials.rb | 38 + .../ad_group_ad_label_service/paths.rb | 92 + .../services/ad_group_ad_label_service_pb.rb | 33 + .../ad_group_ad_label_service_services_pb.rb | 62 + .../v25/services/ad_group_ad_service.rb | 51 + .../services/ad_group_ad_service/client.rb | 643 ++++ .../ad_group_ad_service/credentials.rb | 38 + .../v25/services/ad_group_ad_service/paths.rb | 126 + .../v25/services/ad_group_ad_service_pb.rb | 40 + .../ad_group_ad_service_services_pb.rb | 107 + .../v25/services/ad_group_asset_service.rb | 51 + .../services/ad_group_asset_service/client.rb | 505 +++ .../ad_group_asset_service/credentials.rb | 38 + .../services/ad_group_asset_service/paths.rb | 90 + .../v25/services/ad_group_asset_service_pb.rb | 35 + .../ad_group_asset_service_services_pb.rb | 63 + .../services/ad_group_asset_set_service.rb | 51 + .../ad_group_asset_set_service/client.rb | 494 +++ .../ad_group_asset_set_service/credentials.rb | 38 + .../ad_group_asset_set_service/paths.rb | 88 + .../services/ad_group_asset_set_service_pb.rb | 34 + .../ad_group_asset_set_service_services_pb.rb | 50 + .../services/ad_group_bid_modifier_service.rb | 51 + .../ad_group_bid_modifier_service/client.rb | 519 +++ .../credentials.rb | 38 + .../ad_group_bid_modifier_service/paths.rb | 71 + .../ad_group_bid_modifier_service_pb.rb | 35 + ..._group_bid_modifier_service_services_pb.rb | 75 + .../ad_group_criterion_customizer_service.rb | 51 + .../client.rb | 494 +++ .../credentials.rb | 38 + .../paths.rb | 92 + ...d_group_criterion_customizer_service_pb.rb | 34 + ...riterion_customizer_service_services_pb.rb | 50 + .../ad_group_criterion_label_service.rb | 51 + .../client.rb | 500 +++ .../credentials.rb | 38 + .../ad_group_criterion_label_service/paths.rb | 92 + .../ad_group_criterion_label_service_pb.rb | 33 + ...oup_criterion_label_service_services_pb.rb | 60 + .../services/ad_group_criterion_service.rb | 51 + .../ad_group_criterion_service/client.rb | 526 +++ .../ad_group_criterion_service/credentials.rb | 38 + .../ad_group_criterion_service/paths.rb | 137 + .../services/ad_group_criterion_service_pb.rb | 36 + .../ad_group_criterion_service_services_pb.rb | 84 + .../services/ad_group_customizer_service.rb | 51 + .../ad_group_customizer_service/client.rb | 494 +++ .../credentials.rb | 38 + .../ad_group_customizer_service/paths.rb | 88 + .../ad_group_customizer_service_pb.rb | 34 + ...ad_group_customizer_service_services_pb.rb | 50 + .../v25/services/ad_group_label_service.rb | 51 + .../services/ad_group_label_service/client.rb | 502 +++ .../ad_group_label_service/credentials.rb | 38 + .../services/ad_group_label_service/paths.rb | 88 + .../v25/services/ad_group_label_service_pb.rb | 33 + .../ad_group_label_service_services_pb.rb | 63 + .../v25/services/ad_group_service.rb | 51 + .../v25/services/ad_group_service/client.rb | 523 +++ .../services/ad_group_service/credentials.rb | 38 + .../v25/services/ad_group_service/paths.rb | 88 + .../v25/services/ad_group_service_pb.rb | 35 + .../services/ad_group_service_services_pb.rb | 82 + .../v25/services/ad_parameter_service.rb | 51 + .../services/ad_parameter_service/client.rb | 506 +++ .../ad_parameter_service/credentials.rb | 38 + .../services/ad_parameter_service/paths.rb | 75 + .../v25/services/ad_parameter_service_pb.rb | 35 + .../ad_parameter_service_services_pb.rb | 64 + .../ads/google_ads/v25/services/ad_service.rb | 51 + .../v25/services/ad_service/client.rb | 531 +++ .../v25/services/ad_service/credentials.rb | 38 + .../v25/services/ad_service/paths.rb | 52 + .../google_ads/v25/services/ad_service_pb.rb | 36 + .../v25/services/ad_service_services_pb.rb | 90 + .../v25/services/asset_generation_service.rb | 51 + .../asset_generation_service/client.rb | 643 ++++ .../asset_generation_service/credentials.rb | 38 + .../asset_generation_service/paths.rb | 71 + .../services/asset_generation_service_pb.rb | 40 + .../asset_generation_service_services_pb.rb | 69 + .../v25/services/asset_group_asset_service.rb | 51 + .../asset_group_asset_service/client.rb | 491 +++ .../asset_group_asset_service/credentials.rb | 38 + .../asset_group_asset_service/paths.rb | 90 + .../services/asset_group_asset_service_pb.rb | 34 + .../asset_group_asset_service_services_pb.rb | 50 + ...sset_group_listing_group_filter_service.rb | 51 + .../client.rb | 489 +++ .../credentials.rb | 38 + .../paths.rb | 88 + ...t_group_listing_group_filter_service_pb.rb | 34 + ...isting_group_filter_service_services_pb.rb | 50 + .../v25/services/asset_group_service.rb | 51 + .../services/asset_group_service/client.rb | 484 +++ .../asset_group_service/credentials.rb | 38 + .../v25/services/asset_group_service/paths.rb | 69 + .../v25/services/asset_group_service_pb.rb | 34 + .../asset_group_service_services_pb.rb | 50 + .../services/asset_group_signal_service.rb | 51 + .../asset_group_signal_service/client.rb | 493 +++ .../asset_group_signal_service/credentials.rb | 38 + .../asset_group_signal_service/paths.rb | 71 + .../services/asset_group_signal_service_pb.rb | 35 + .../asset_group_signal_service_services_pb.rb | 50 + .../google_ads/v25/services/asset_service.rb | 53 + .../v25/services/asset_service/client.rb | 521 +++ .../v25/services/asset_service/credentials.rb | 38 + .../v25/services/asset_service/paths.rb | 69 + .../v25/services/asset_service_pb.rb | 35 + .../v25/services/asset_service_services_pb.rb | 80 + .../v25/services/asset_set_asset_service.rb | 51 + .../asset_set_asset_service/client.rb | 492 +++ .../asset_set_asset_service/credentials.rb | 38 + .../services/asset_set_asset_service/paths.rb | 88 + .../services/asset_set_asset_service_pb.rb | 34 + .../asset_set_asset_service_services_pb.rb | 50 + .../v25/services/asset_set_service.rb | 51 + .../v25/services/asset_set_service/client.rb | 491 +++ .../services/asset_set_service/credentials.rb | 38 + .../v25/services/asset_set_service/paths.rb | 52 + .../v25/services/asset_set_service_pb.rb | 35 + .../services/asset_set_service_services_pb.rb | 50 + .../v25/services/audience_insights_service.rb | 52 + .../audience_insights_service/client.rb | 1326 +++++++ .../audience_insights_service/credentials.rb | 38 + .../services/audience_insights_service_pb.rb | 62 + .../audience_insights_service_services_pb.rb | 158 + .../v25/services/audience_service.rb | 51 + .../v25/services/audience_service/client.rb | 492 +++ .../services/audience_service/credentials.rb | 38 + .../v25/services/audience_service/paths.rb | 103 + .../v25/services/audience_service_pb.rb | 35 + .../services/audience_service_services_pb.rb | 52 + ...matically_created_asset_removal_service.rb | 50 + .../client.rb | 493 +++ .../credentials.rb | 38 + ...ically_created_asset_removal_service_pb.rb | 31 + ...eated_asset_removal_service_services_pb.rb | 58 + .../v25/services/batch_job_service.rb | 52 + .../v25/services/batch_job_service/client.rb | 861 +++++ .../services/batch_job_service/credentials.rb | 38 + .../services/batch_job_service/operations.rb | 855 +++++ .../v25/services/batch_job_service/paths.rb | 1373 +++++++ .../v25/services/batch_job_service_pb.rb | 43 + .../services/batch_job_service_services_pb.rb | 97 + .../v25/services/benchmarks_service.rb | 51 + .../v25/services/benchmarks_service/client.rb | 892 +++++ .../benchmarks_service/credentials.rb | 38 + .../v25/services/benchmarks_service_pb.rb | 56 + .../benchmarks_service_services_pb.rb | 107 + .../bidding_data_exclusion_service.rb | 51 + .../bidding_data_exclusion_service/client.rb | 492 +++ .../credentials.rb | 38 + .../bidding_data_exclusion_service/paths.rb | 69 + .../bidding_data_exclusion_service_pb.rb | 35 + ...ding_data_exclusion_service_services_pb.rb | 48 + .../bidding_seasonality_adjustment_service.rb | 51 + .../client.rb | 494 +++ .../credentials.rb | 38 + .../paths.rb | 69 + ...dding_seasonality_adjustment_service_pb.rb | 35 + ...sonality_adjustment_service_services_pb.rb | 48 + .../v25/services/bidding_strategy_service.rb | 51 + .../bidding_strategy_service/client.rb | 522 +++ .../bidding_strategy_service/credentials.rb | 38 + .../bidding_strategy_service/paths.rb | 52 + .../services/bidding_strategy_service_pb.rb | 35 + .../bidding_strategy_service_services_pb.rb | 78 + .../v25/services/billing_setup_service.rb | 59 + .../services/billing_setup_service/client.rb | 501 +++ .../billing_setup_service/credentials.rb | 38 + .../services/billing_setup_service/paths.rb | 69 + .../v25/services/billing_setup_service_pb.rb | 32 + .../billing_setup_service_services_pb.rb | 69 + .../v25/services/brand_suggestion_service.rb | 50 + .../brand_suggestion_service/client.rb | 483 +++ .../brand_suggestion_service/credentials.rb | 38 + .../services/brand_suggestion_service_pb.rb | 30 + .../brand_suggestion_service_services_pb.rb | 50 + .../v25/services/campaign_asset_service.rb | 51 + .../services/campaign_asset_service/client.rb | 506 +++ .../campaign_asset_service/credentials.rb | 38 + .../services/campaign_asset_service/paths.rb | 90 + .../v25/services/campaign_asset_service_pb.rb | 35 + .../campaign_asset_service_services_pb.rb | 64 + .../services/campaign_asset_set_service.rb | 51 + .../campaign_asset_set_service/client.rb | 494 +++ .../campaign_asset_set_service/credentials.rb | 38 + .../campaign_asset_set_service/paths.rb | 88 + .../services/campaign_asset_set_service_pb.rb | 34 + .../campaign_asset_set_service_services_pb.rb | 50 + .../services/campaign_bid_modifier_service.rb | 51 + .../campaign_bid_modifier_service/client.rb | 518 +++ .../credentials.rb | 38 + .../campaign_bid_modifier_service/paths.rb | 71 + .../campaign_bid_modifier_service_pb.rb | 35 + ...mpaign_bid_modifier_service_services_pb.rb | 74 + .../v25/services/campaign_budget_service.rb | 51 + .../campaign_budget_service/client.rb | 511 +++ .../campaign_budget_service/credentials.rb | 38 + .../services/campaign_budget_service/paths.rb | 52 + .../services/campaign_budget_service_pb.rb | 35 + .../campaign_budget_service_services_pb.rb | 69 + .../campaign_conversion_goal_service.rb | 51 + .../client.rb | 486 +++ .../credentials.rb | 38 + .../campaign_conversion_goal_service/paths.rb | 73 + .../campaign_conversion_goal_service_pb.rb | 33 + ...ign_conversion_goal_service_services_pb.rb | 50 + .../services/campaign_criterion_service.rb | 51 + .../campaign_criterion_service/client.rb | 522 +++ .../campaign_criterion_service/credentials.rb | 38 + .../campaign_criterion_service/paths.rb | 175 + .../services/campaign_criterion_service_pb.rb | 35 + .../campaign_criterion_service_services_pb.rb | 80 + .../services/campaign_customizer_service.rb | 51 + .../campaign_customizer_service/client.rb | 494 +++ .../credentials.rb | 38 + .../campaign_customizer_service/paths.rb | 88 + .../campaign_customizer_service_pb.rb | 34 + ...campaign_customizer_service_services_pb.rb | 50 + .../v25/services/campaign_draft_service.rb | 52 + .../services/campaign_draft_service/client.rb | 761 ++++ .../campaign_draft_service/credentials.rb | 38 + .../campaign_draft_service/operations.rb | 855 +++++ .../services/campaign_draft_service/paths.rb | 71 + .../v25/services/campaign_draft_service_pb.rb | 40 + .../campaign_draft_service_services_pb.rb | 94 + .../services/campaign_goal_config_service.rb | 51 + .../campaign_goal_config_service/client.rb | 498 +++ .../credentials.rb | 38 + .../campaign_goal_config_service/paths.rb | 88 + .../campaign_goal_config_service_pb.rb | 34 + ...ampaign_goal_config_service_services_pb.rb | 58 + .../v25/services/campaign_group_service.rb | 51 + .../services/campaign_group_service/client.rb | 492 +++ .../campaign_group_service/credentials.rb | 38 + .../services/campaign_group_service/paths.rb | 52 + .../v25/services/campaign_group_service_pb.rb | 35 + .../campaign_group_service_services_pb.rb | 50 + .../v25/services/campaign_label_service.rb | 51 + .../services/campaign_label_service/client.rb | 504 +++ .../campaign_label_service/credentials.rb | 38 + .../services/campaign_label_service/paths.rb | 88 + .../v25/services/campaign_label_service_pb.rb | 33 + .../campaign_label_service_services_pb.rb | 63 + .../v25/services/campaign_service.rb | 51 + .../v25/services/campaign_service/client.rb | 637 ++++ .../services/campaign_service/credentials.rb | 38 + .../v25/services/campaign_service/paths.rb | 173 + .../v25/services/campaign_service_pb.rb | 40 + .../services/campaign_service_services_pb.rb | 102 + .../services/campaign_shared_set_service.rb | 51 + .../campaign_shared_set_service/client.rb | 517 +++ .../credentials.rb | 38 + .../campaign_shared_set_service/paths.rb | 88 + .../campaign_shared_set_service_pb.rb | 34 + ...campaign_shared_set_service_services_pb.rb | 73 + .../content_creator_insights_service.rb | 55 + .../client.rb | 657 ++++ .../credentials.rb | 38 + .../content_creator_insights_service_pb.rb | 47 + ...nt_creator_insights_service_services_pb.rb | 76 + .../v25/services/conversion_action_service.rb | 51 + .../conversion_action_service/client.rb | 512 +++ .../conversion_action_service/credentials.rb | 38 + .../conversion_action_service/paths.rb | 66 + .../services/conversion_action_service_pb.rb | 35 + .../conversion_action_service_services_pb.rb | 68 + .../conversion_adjustment_upload_service.rb | 50 + .../client.rb | 504 +++ .../credentials.rb | 38 + ...conversion_adjustment_upload_service_pb.rb | 35 + ...n_adjustment_upload_service_services_pb.rb | 56 + .../conversion_custom_variable_service.rb | 51 + .../client.rb | 504 +++ .../credentials.rb | 38 + .../paths.rb | 66 + .../conversion_custom_variable_service_pb.rb | 35 + ...ion_custom_variable_service_services_pb.rb | 60 + ...conversion_goal_campaign_config_service.rb | 51 + .../client.rb | 489 +++ .../credentials.rb | 38 + .../paths.rb | 86 + ...version_goal_campaign_config_service_pb.rb | 34 + ...oal_campaign_config_service_services_pb.rb | 50 + .../v25/services/conversion_upload_service.rb | 51 + .../conversion_upload_service/client.rb | 625 +++ .../conversion_upload_service/credentials.rb | 38 + .../conversion_upload_service/paths.rb | 52 + .../services/conversion_upload_service_pb.rb | 47 + .../conversion_upload_service_services_pb.rb | 68 + .../services/conversion_value_rule_service.rb | 51 + .../conversion_value_rule_service/client.rb | 494 +++ .../credentials.rb | 38 + .../conversion_value_rule_service/paths.rb | 114 + .../conversion_value_rule_service_pb.rb | 35 + ...nversion_value_rule_service_services_pb.rb | 50 + .../conversion_value_rule_set_service.rb | 51 + .../client.rb | 494 +++ .../credentials.rb | 38 + .../paths.rb | 100 + .../conversion_value_rule_set_service_pb.rb | 35 + ...sion_value_rule_set_service_services_pb.rb | 50 + .../v25/services/custom_audience_service.rb | 51 + .../custom_audience_service/client.rb | 498 +++ .../custom_audience_service/credentials.rb | 38 + .../services/custom_audience_service/paths.rb | 52 + .../services/custom_audience_service_pb.rb | 33 + .../custom_audience_service_services_pb.rb | 64 + .../custom_conversion_goal_service.rb | 51 + .../custom_conversion_goal_service/client.rb | 489 +++ .../credentials.rb | 38 + .../custom_conversion_goal_service/paths.rb | 69 + .../custom_conversion_goal_service_pb.rb | 34 + ...tom_conversion_goal_service_services_pb.rb | 50 + .../v25/services/custom_interest_service.rb | 51 + .../custom_interest_service/client.rb | 496 +++ .../custom_interest_service/credentials.rb | 38 + .../services/custom_interest_service/paths.rb | 52 + .../services/custom_interest_service_pb.rb | 33 + .../custom_interest_service_services_pb.rb | 62 + .../v25/services/customer_asset_service.rb | 51 + .../services/customer_asset_service/client.rb | 503 +++ .../customer_asset_service/credentials.rb | 38 + .../services/customer_asset_service/paths.rb | 71 + .../v25/services/customer_asset_service_pb.rb | 35 + .../customer_asset_service_services_pb.rb | 61 + .../services/customer_asset_set_service.rb | 51 + .../customer_asset_set_service/client.rb | 494 +++ .../customer_asset_set_service/credentials.rb | 38 + .../customer_asset_set_service/paths.rb | 83 + .../services/customer_asset_set_service_pb.rb | 34 + .../customer_asset_set_service_services_pb.rb | 50 + .../services/customer_client_link_service.rb | 51 + .../customer_client_link_service/client.rb | 497 +++ .../credentials.rb | 38 + .../customer_client_link_service/paths.rb | 68 + .../customer_client_link_service_pb.rb | 33 + ...ustomer_client_link_service_services_pb.rb | 61 + .../customer_conversion_goal_service.rb | 51 + .../client.rb | 486 +++ .../credentials.rb | 38 + .../customer_conversion_goal_service/paths.rb | 54 + .../customer_conversion_goal_service_pb.rb | 33 + ...mer_conversion_goal_service_services_pb.rb | 50 + .../services/customer_customizer_service.rb | 51 + .../customer_customizer_service/client.rb | 494 +++ .../credentials.rb | 38 + .../customer_customizer_service/paths.rb | 69 + .../customer_customizer_service_pb.rb | 34 + ...customer_customizer_service_services_pb.rb | 50 + .../v25/services/customer_label_service.rb | 55 + .../services/customer_label_service/client.rb | 506 +++ .../customer_label_service/credentials.rb | 38 + .../services/customer_label_service/paths.rb | 83 + .../v25/services/customer_label_service_pb.rb | 33 + .../customer_label_service_services_pb.rb | 65 + .../services/customer_manager_link_service.rb | 51 + .../customer_manager_link_service/client.rb | 617 +++ .../credentials.rb | 38 + .../customer_manager_link_service/paths.rb | 68 + .../customer_manager_link_service_pb.rb | 35 + ...stomer_manager_link_service_services_pb.rb | 77 + .../customer_negative_criterion_service.rb | 51 + .../client.rb | 503 +++ .../credentials.rb | 38 + .../paths.rb | 66 + .../customer_negative_criterion_service_pb.rb | 34 + ..._negative_criterion_service_services_pb.rb | 61 + .../v25/services/customer_service.rb | 51 + .../v25/services/customer_service/client.rb | 701 ++++ .../services/customer_service/credentials.rb | 38 + .../v25/services/customer_service/paths.rb | 66 + .../v25/services/customer_service_pb.rb | 39 + .../services/customer_service_services_pb.rb | 86 + ...network_conversion_value_schema_service.rb | 51 + .../client.rb | 494 +++ .../credentials.rb | 38 + .../paths.rb | 52 + ...work_conversion_value_schema_service_pb.rb | 33 + ...ersion_value_schema_service_services_pb.rb | 56 + ...customer_user_access_invitation_service.rb | 52 + .../client.rb | 490 +++ .../credentials.rb | 38 + .../paths.rb | 69 + ...tomer_user_access_invitation_service_pb.rb | 32 + ...r_access_invitation_service_services_pb.rb | 59 + .../services/customer_user_access_service.rb | 51 + .../customer_user_access_service/client.rb | 492 +++ .../credentials.rb | 38 + .../customer_user_access_service/paths.rb | 69 + .../customer_user_access_service_pb.rb | 33 + ...ustomer_user_access_service_services_pb.rb | 59 + .../services/customizer_attribute_service.rb | 51 + .../customizer_attribute_service/client.rb | 494 +++ .../credentials.rb | 38 + .../customizer_attribute_service/paths.rb | 52 + .../customizer_attribute_service_pb.rb | 35 + ...ustomizer_attribute_service_services_pb.rb | 50 + .../v25/services/data_link_service.rb | 52 + .../v25/services/data_link_service/client.rb | 708 ++++ .../services/data_link_service/credentials.rb | 38 + .../v25/services/data_link_service/paths.rb | 54 + .../v25/services/data_link_service_pb.rb | 35 + .../services/data_link_service_services_pb.rb | 90 + .../v25/services/experiment_arm_service.rb | 51 + .../services/experiment_arm_service/client.rb | 501 +++ .../experiment_arm_service/credentials.rb | 38 + .../services/experiment_arm_service/paths.rb | 156 + .../v25/services/experiment_arm_service_pb.rb | 35 + .../experiment_arm_service_services_pb.rb | 59 + .../v25/services/experiment_service.rb | 52 + .../v25/services/experiment_service/client.rb | 1096 ++++++ .../experiment_service/credentials.rb | 38 + .../services/experiment_service/operations.rb | 855 +++++ .../v25/services/experiment_service/paths.rb | 86 + .../v25/services/experiment_service_pb.rb | 45 + .../experiment_service_services_pb.rb | 137 + .../services/geo_target_constant_service.rb | 51 + .../geo_target_constant_service/client.rb | 491 +++ .../credentials.rb | 38 + .../geo_target_constant_service/paths.rb | 49 + .../geo_target_constant_service_pb.rb | 31 + ...geo_target_constant_service_services_pb.rb | 58 + .../google_ads/v25/services/goal_service.rb | 51 + .../v25/services/goal_service/client.rb | 496 +++ .../v25/services/goal_service/credentials.rb | 38 + .../v25/services/goal_service/paths.rb | 66 + .../v25/services/goal_service_pb.rb | 34 + .../v25/services/goal_service_services_pb.rb | 58 + .../v25/services/google_ads_field_service.rb | 51 + .../google_ads_field_service/client.rb | 595 +++ .../google_ads_field_service/credentials.rb | 38 + .../google_ads_field_service/paths.rb | 49 + .../services/google_ads_field_service_pb.rb | 31 + .../google_ads_field_service_services_pb.rb | 68 + .../v25/services/google_ads_service.rb | 51 + .../v25/services/google_ads_service/client.rb | 845 ++++ .../google_ads_service/credentials.rb | 38 + .../v25/services/google_ads_service/paths.rb | 3397 +++++++++++++++++ .../v25/services/google_ads_service_pb.rb | 289 ++ .../google_ads_service_services_pb.rb | 189 + .../services/identity_verification_service.rb | 50 + .../identity_verification_service/client.rb | 591 +++ .../credentials.rb | 38 + .../identity_verification_service_pb.rb | 35 + ...entity_verification_service_services_pb.rb | 68 + .../v25/services/incentive_service.rb | 50 + .../v25/services/incentive_service/client.rb | 589 +++ .../services/incentive_service/credentials.rb | 38 + .../v25/services/incentive_service_pb.rb | 38 + .../services/incentive_service_services_pb.rb | 49 + .../v25/services/invoice_service.rb | 51 + .../v25/services/invoice_service/client.rb | 500 +++ .../services/invoice_service/credentials.rb | 38 + .../v25/services/invoice_service/paths.rb | 52 + .../v25/services/invoice_service_pb.rb | 30 + .../services/invoice_service_services_pb.rb | 59 + .../keyword_plan_ad_group_keyword_service.rb | 55 + .../client.rb | 509 +++ .../credentials.rb | 38 + .../paths.rb | 69 + ...eyword_plan_ad_group_keyword_service_pb.rb | 34 + ...an_ad_group_keyword_service_services_pb.rb | 68 + .../services/keyword_plan_ad_group_service.rb | 51 + .../keyword_plan_ad_group_service/client.rb | 507 +++ .../credentials.rb | 38 + .../keyword_plan_ad_group_service/paths.rb | 69 + .../keyword_plan_ad_group_service_pb.rb | 34 + ...yword_plan_ad_group_service_services_pb.rb | 66 + .../keyword_plan_campaign_keyword_service.rb | 54 + .../client.rb | 507 +++ .../credentials.rb | 38 + .../paths.rb | 69 + ...eyword_plan_campaign_keyword_service_pb.rb | 34 + ...an_campaign_keyword_service_services_pb.rb | 66 + .../services/keyword_plan_campaign_service.rb | 51 + .../keyword_plan_campaign_service/client.rb | 508 +++ .../credentials.rb | 38 + .../keyword_plan_campaign_service/paths.rb | 97 + .../keyword_plan_campaign_service_pb.rb | 34 + ...yword_plan_campaign_service_services_pb.rb | 67 + .../v25/services/keyword_plan_idea_service.rb | 50 + .../keyword_plan_idea_service/client.rb | 893 +++++ .../keyword_plan_idea_service/credentials.rb | 38 + .../services/keyword_plan_idea_service_pb.rb | 55 + .../keyword_plan_idea_service_services_pb.rb | 94 + .../v25/services/keyword_plan_service.rb | 51 + .../services/keyword_plan_service/client.rb | 504 +++ .../keyword_plan_service/credentials.rb | 38 + .../services/keyword_plan_service/paths.rb | 52 + .../v25/services/keyword_plan_service_pb.rb | 34 + .../keyword_plan_service_services_pb.rb | 65 + .../keyword_theme_constant_service.rb | 51 + .../keyword_theme_constant_service/client.rb | 485 +++ .../credentials.rb | 38 + .../keyword_theme_constant_service/paths.rb | 52 + .../keyword_theme_constant_service_pb.rb | 28 + ...word_theme_constant_service_services_pb.rb | 57 + .../google_ads/v25/services/label_service.rb | 51 + .../v25/services/label_service/client.rb | 515 +++ .../v25/services/label_service/credentials.rb | 38 + .../v25/services/label_service/paths.rb | 52 + .../v25/services/label_service_pb.rb | 35 + .../v25/services/label_service_services_pb.rb | 72 + .../services/local_services_lead_service.rb | 51 + .../local_services_lead_service/client.rb | 586 +++ .../credentials.rb | 38 + .../local_services_lead_service/paths.rb | 52 + .../local_services_lead_service_pb.rb | 40 + ...local_services_lead_service_services_pb.rb | 50 + .../multi_party_auth_review_service.rb | 51 + .../multi_party_auth_review_service/client.rb | 495 +++ .../credentials.rb | 38 + .../multi_party_auth_review_service/paths.rb | 52 + .../multi_party_auth_review_service_pb.rb | 34 + ...i_party_auth_review_service_services_pb.rb | 61 + .../services/offline_user_data_job_service.rb | 52 + .../offline_user_data_job_service/client.rb | 747 ++++ .../credentials.rb | 38 + .../operations.rb | 855 +++++ .../offline_user_data_job_service/paths.rb | 52 + .../offline_user_data_job_service_pb.rb | 38 + ...fline_user_data_job_service_services_pb.rb | 90 + .../v25/services/payments_account_service.rb | 52 + .../payments_account_service/client.rb | 491 +++ .../payments_account_service/credentials.rb | 38 + .../payments_account_service/paths.rb | 66 + .../services/payments_account_service_pb.rb | 29 + .../payments_account_service_services_pb.rb | 61 + .../product_link_invitation_service.rb | 52 + .../product_link_invitation_service/client.rb | 677 ++++ .../credentials.rb | 38 + .../product_link_invitation_service/paths.rb | 66 + .../product_link_invitation_service_pb.rb | 35 + ...uct_link_invitation_service_services_pb.rb | 52 + .../v25/services/product_link_service.rb | 52 + .../services/product_link_service/client.rb | 603 +++ .../product_link_service/credentials.rb | 38 + .../services/product_link_service/paths.rb | 66 + .../v25/services/product_link_service_pb.rb | 32 + .../product_link_service_services_pb.rb | 71 + .../v25/services/reach_plan_service.rb | 54 + .../v25/services/reach_plan_service/client.rb | 1046 +++++ .../reach_plan_service/credentials.rb | 38 + .../v25/services/reach_plan_service_pb.rb | 83 + .../reach_plan_service_services_pb.rb | 129 + .../v25/services/recommendation_service.rb | 51 + .../services/recommendation_service/client.rb | 818 ++++ .../recommendation_service/credentials.rb | 38 + .../services/recommendation_service/paths.rb | 154 + .../v25/services/recommendation_service_pb.rb | 80 + .../recommendation_service_services_pb.rb | 84 + .../recommendation_subscription_service.rb | 51 + .../client.rb | 507 +++ .../credentials.rb | 38 + .../paths.rb | 52 + .../recommendation_subscription_service_pb.rb | 35 + ...dation_subscription_service_services_pb.rb | 63 + .../services/remarketing_action_service.rb | 51 + .../remarketing_action_service/client.rb | 499 +++ .../remarketing_action_service/credentials.rb | 38 + .../remarketing_action_service/paths.rb | 52 + .../services/remarketing_action_service_pb.rb | 34 + .../remarketing_action_service_services_pb.rb | 58 + .../v25/services/reservation_service.rb | 51 + .../services/reservation_service/client.rb | 574 +++ .../reservation_service/credentials.rb | 38 + .../v25/services/reservation_service_pb.rb | 32 + .../reservation_service_services_pb.rb | 52 + .../v25/services/shareable_preview_service.rb | 57 + .../shareable_preview_service/client.rb | 485 +++ .../shareable_preview_service/credentials.rb | 38 + .../services/shareable_preview_service_pb.rb | 29 + .../shareable_preview_service_services_pb.rb | 54 + .../v25/services/shared_criterion_service.rb | 51 + .../shared_criterion_service/client.rb | 513 +++ .../shared_criterion_service/credentials.rb | 38 + .../shared_criterion_service/paths.rb | 85 + .../services/shared_criterion_service_pb.rb | 34 + .../shared_criterion_service_services_pb.rb | 71 + .../v25/services/shared_set_service.rb | 51 + .../v25/services/shared_set_service/client.rb | 516 +++ .../shared_set_service/credentials.rb | 38 + .../v25/services/shared_set_service/paths.rb | 52 + .../v25/services/shared_set_service_pb.rb | 35 + .../shared_set_service_services_pb.rb | 74 + .../smart_campaign_setting_service.rb | 51 + .../smart_campaign_setting_service/client.rb | 587 +++ .../credentials.rb | 38 + .../smart_campaign_setting_service/paths.rb | 69 + .../smart_campaign_setting_service_pb.rb | 44 + ...rt_campaign_setting_service_services_pb.rb | 51 + .../smart_campaign_suggest_service.rb | 51 + .../smart_campaign_suggest_service/client.rb | 689 ++++ .../credentials.rb | 38 + .../smart_campaign_suggest_service/paths.rb | 69 + .../smart_campaign_suggest_service_pb.rb | 42 + ...rt_campaign_suggest_service_services_pb.rb | 52 + .../third_party_app_analytics_link_service.rb | 52 + .../client.rb | 488 +++ .../credentials.rb | 38 + .../paths.rb | 52 + ...ird_party_app_analytics_link_service_pb.rb | 28 + ..._app_analytics_link_service_services_pb.rb | 57 + .../travel_asset_suggestion_service.rb | 50 + .../travel_asset_suggestion_service/client.rb | 487 +++ .../credentials.rb | 38 + .../travel_asset_suggestion_service_pb.rb | 34 + ...el_asset_suggestion_service_services_pb.rb | 50 + .../v25/services/user_data_service.rb | 55 + .../v25/services/user_data_service/client.rb | 497 +++ .../services/user_data_service/credentials.rb | 38 + .../v25/services/user_data_service_pb.rb | 30 + .../services/user_data_service_services_pb.rb | 67 + .../user_list_customer_type_service.rb | 51 + .../user_list_customer_type_service/client.rb | 500 +++ .../credentials.rb | 38 + .../user_list_customer_type_service/paths.rb | 71 + .../user_list_customer_type_service_pb.rb | 33 + ..._list_customer_type_service_services_pb.rb | 59 + .../v25/services/user_list_service.rb | 51 + .../v25/services/user_list_service/client.rb | 509 +++ .../services/user_list_service/credentials.rb | 38 + .../v25/services/user_list_service/paths.rb | 52 + .../v25/services/user_list_service_pb.rb | 34 + .../services/user_list_service_services_pb.rb | 71 + .../services/you_tube_video_upload_service.rb | 51 + .../you_tube_video_upload_service/client.rb | 678 ++++ .../credentials.rb | 38 + .../you_tube_video_upload_service/paths.rb | 52 + .../youtube_video_upload_service_pb.rb | 35 + ...outube_video_upload_service_services_pb.rb | 55 + lib/google/ads/google_ads/version.rb | 2 +- test/test_errors.rb | 14 +- test/test_field_mask_util.rb | 44 +- test/test_google_ads.rb | 2 +- test/test_google_ads_client.rb | 20 +- test/test_logging_interceptor.rb | 125 +- test/test_lookup_util.rb | 4 +- test/test_object_creation.rb | 16 +- test/test_path_lookup_util.rb | 6 +- test/test_service_wrapper.rb | 6 +- 1452 files changed, 119521 insertions(+), 104 deletions(-) create mode 100644 lib/google/ads/google_ads/utils/v25/path_lookup_util.rb create mode 100644 lib/google/ads/google_ads/v25/actions/book_campaigns_pb.rb create mode 100644 lib/google/ads/google_ads/v25/actions/generate_shareable_previews_pb.rb create mode 100644 lib/google/ads/google_ads/v25/actions/quote_campaigns_pb.rb create mode 100644 lib/google/ads/google_ads/v25/common/ad_asset_pb.rb create mode 100644 lib/google/ads/google_ads/v25/common/ad_type_infos_pb.rb create mode 100644 lib/google/ads/google_ads/v25/common/additional_application_info_pb.rb create mode 100644 lib/google/ads/google_ads/v25/common/asset_policy_pb.rb create mode 100644 lib/google/ads/google_ads/v25/common/asset_set_types_pb.rb create mode 100644 lib/google/ads/google_ads/v25/common/asset_types_pb.rb create mode 100644 lib/google/ads/google_ads/v25/common/asset_usage_pb.rb create mode 100644 lib/google/ads/google_ads/v25/common/audience_insights_attribute_pb.rb create mode 100644 lib/google/ads/google_ads/v25/common/audiences_pb.rb create mode 100644 lib/google/ads/google_ads/v25/common/bidding_pb.rb create mode 100644 lib/google/ads/google_ads/v25/common/campaign_goal_settings_pb.rb create mode 100644 lib/google/ads/google_ads/v25/common/campaign_reservation_quote_pb.rb create mode 100644 lib/google/ads/google_ads/v25/common/click_location_pb.rb create mode 100644 lib/google/ads/google_ads/v25/common/consent_pb.rb create mode 100644 lib/google/ads/google_ads/v25/common/criteria_pb.rb create mode 100644 lib/google/ads/google_ads/v25/common/criterion_category_availability_pb.rb create mode 100644 lib/google/ads/google_ads/v25/common/custom_parameter_pb.rb create mode 100644 lib/google/ads/google_ads/v25/common/customizer_value_pb.rb create mode 100644 lib/google/ads/google_ads/v25/common/dates_pb.rb create mode 100644 lib/google/ads/google_ads/v25/common/experiment_types_pb.rb create mode 100644 lib/google/ads/google_ads/v25/common/extensions_pb.rb create mode 100644 lib/google/ads/google_ads/v25/common/feed_common_pb.rb create mode 100644 lib/google/ads/google_ads/v25/common/final_app_url_pb.rb create mode 100644 lib/google/ads/google_ads/v25/common/frequency_cap_pb.rb create mode 100644 lib/google/ads/google_ads/v25/common/goal_common_pb.rb create mode 100644 lib/google/ads/google_ads/v25/common/goal_setting_pb.rb create mode 100644 lib/google/ads/google_ads/v25/common/keyword_plan_common_pb.rb create mode 100644 lib/google/ads/google_ads/v25/common/local_services_pb.rb create mode 100644 lib/google/ads/google_ads/v25/common/metric_goal_pb.rb create mode 100644 lib/google/ads/google_ads/v25/common/metrics_pb.rb create mode 100644 lib/google/ads/google_ads/v25/common/offline_user_data_pb.rb create mode 100644 lib/google/ads/google_ads/v25/common/policy_pb.rb create mode 100644 lib/google/ads/google_ads/v25/common/policy_summary_pb.rb create mode 100644 lib/google/ads/google_ads/v25/common/real_time_bidding_setting_pb.rb create mode 100644 lib/google/ads/google_ads/v25/common/segments_pb.rb create mode 100644 lib/google/ads/google_ads/v25/common/simulation_pb.rb create mode 100644 lib/google/ads/google_ads/v25/common/synthetic_content_info_pb.rb create mode 100644 lib/google/ads/google_ads/v25/common/tag_snippet_pb.rb create mode 100644 lib/google/ads/google_ads/v25/common/targeting_setting_pb.rb create mode 100644 lib/google/ads/google_ads/v25/common/text_label_pb.rb create mode 100644 lib/google/ads/google_ads/v25/common/third_party_integration_partners_pb.rb create mode 100644 lib/google/ads/google_ads/v25/common/url_collection_pb.rb create mode 100644 lib/google/ads/google_ads/v25/common/user_lists_pb.rb create mode 100644 lib/google/ads/google_ads/v25/common/value_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/access_invitation_status_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/access_reason_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/access_role_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/account_budget_proposal_status_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/account_budget_proposal_type_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/account_budget_status_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/account_link_status_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/ad_destination_type_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/ad_format_type_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/ad_group_ad_primary_status_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/ad_group_ad_primary_status_reason_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/ad_group_ad_rotation_mode_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/ad_group_ad_status_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/ad_group_criterion_approval_status_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/ad_group_criterion_primary_status_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/ad_group_criterion_primary_status_reason_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/ad_group_criterion_status_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/ad_group_primary_status_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/ad_group_primary_status_reason_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/ad_group_status_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/ad_group_type_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/ad_network_type_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/ad_serving_optimization_status_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/ad_strength_action_item_type_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/ad_strength_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/ad_sub_format_type_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/ad_sub_network_type_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/ad_type_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/advertising_channel_sub_type_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/advertising_channel_type_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/age_range_type_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/android_privacy_interaction_type_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/android_privacy_network_type_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/app_bidding_goal_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/app_campaign_app_store_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/app_campaign_bidding_strategy_goal_type_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/app_payment_model_type_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/app_url_operating_system_type_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/application_instance_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/asset_automation_status_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/asset_automation_type_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/asset_coverage_video_aspect_ratio_requirement_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/asset_field_type_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/asset_group_primary_status_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/asset_group_primary_status_reason_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/asset_group_signal_approval_status_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/asset_group_status_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/asset_link_primary_status_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/asset_link_primary_status_reason_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/asset_link_status_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/asset_offline_evaluation_error_reasons_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/asset_orientation_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/asset_performance_label_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/asset_set_asset_status_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/asset_set_link_status_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/asset_set_status_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/asset_set_type_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/asset_source_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/asset_type_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/async_action_status_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/attribution_model_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/audience_insights_dimension_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/audience_insights_marketing_objective_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/audience_scope_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/audience_status_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/batch_job_status_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/benchmarks_marketing_objective_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/benchmarks_source_type_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/benchmarks_time_granularity_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/bid_modifier_source_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/bidding_source_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/bidding_strategy_status_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/bidding_strategy_system_status_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/bidding_strategy_type_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/billing_setup_status_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/booking_status_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/brand_request_rejection_reason_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/brand_safety_suitability_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/brand_state_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/budget_campaign_association_status_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/budget_delivery_method_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/budget_period_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/budget_status_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/budget_type_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/business_message_call_to_action_type_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/business_message_provider_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/call_conversion_reporting_state_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/call_to_action_type_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/call_tracking_display_location_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/call_type_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/campaign_criterion_status_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/campaign_draft_status_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/campaign_experiment_type_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/campaign_group_status_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/campaign_keyword_match_type_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/campaign_primary_status_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/campaign_primary_status_reason_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/campaign_serving_status_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/campaign_shared_set_status_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/campaign_status_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/chain_relationship_type_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/change_client_type_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/change_event_resource_type_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/change_status_operation_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/change_status_resource_type_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/click_type_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/combined_audience_status_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/consent_status_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/content_creator_insights_supplemental_data_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/content_label_type_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/conversion_action_category_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/conversion_action_counting_type_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/conversion_action_status_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/conversion_action_type_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/conversion_adjustment_type_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/conversion_attribution_event_type_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/conversion_custom_variable_status_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/conversion_customer_type_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/conversion_environment_enum_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/conversion_lag_bucket_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/conversion_or_adjustment_lag_bucket_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/conversion_origin_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/conversion_tracking_status_enum_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/conversion_value_rule_primary_dimension_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/conversion_value_rule_set_status_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/conversion_value_rule_status_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/converting_user_prior_engagement_type_and_ltv_bucket_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/criterion_category_channel_availability_mode_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/criterion_category_locale_availability_mode_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/criterion_system_serving_status_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/criterion_type_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/custom_audience_member_type_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/custom_audience_status_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/custom_audience_type_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/custom_conversion_goal_status_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/custom_interest_member_type_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/custom_interest_status_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/custom_interest_type_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/customer_lifecycle_optimization_goal_sub_type_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/customer_lifecycle_optimization_mode_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/customer_match_upload_key_type_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/customer_pay_per_conversion_eligibility_failure_reason_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/customer_status_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/customizer_attribute_status_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/customizer_attribute_type_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/customizer_value_status_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/data_driven_model_status_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/data_link_status_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/data_link_type_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/day_of_week_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/demand_gen_channel_config_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/demand_gen_channel_strategy_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/device_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/display_ad_format_setting_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/display_upload_product_type_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/distance_bucket_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/eu_political_advertising_status_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/experiment_asset_detail_operation_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/experiment_metric_direction_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/experiment_metric_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/experiment_status_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/experiment_type_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/external_conversion_source_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/fixed_cpm_goal_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/fixed_cpm_target_frequency_time_unit_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/frequency_cap_event_type_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/frequency_cap_level_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/frequency_cap_time_unit_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/gender_type_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/geo_target_constant_status_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/geo_targeting_type_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/gls_phone_number_type_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/goal_config_level_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/goal_optimization_eligibility_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/goal_type_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/google_ads_field_category_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/google_ads_field_data_type_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/google_voice_call_status_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/hotel_asset_suggestion_status_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/hotel_date_selection_type_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/hotel_price_bucket_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/hotel_rate_type_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/hotel_reconciliation_status_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/identity_verification_program_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/identity_verification_program_status_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/incentive_offer_type_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/incentive_state_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/incentive_type_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/income_range_type_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/insights_knowledge_graph_entity_capabilities_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/insights_trend_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/interaction_event_type_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/interaction_type_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/invoice_type_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/keyword_match_type_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/keyword_plan_aggregate_metric_type_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/keyword_plan_competition_level_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/keyword_plan_concept_group_type_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/keyword_plan_forecast_interval_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/keyword_plan_keyword_annotation_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/keyword_plan_network_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/label_status_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/landing_page_source_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/lead_form_call_to_action_type_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/lead_form_desired_intent_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/lead_form_field_user_input_type_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/lead_form_post_submit_call_to_action_type_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/legacy_app_install_ad_app_store_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/linked_account_type_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/linked_product_type_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/listing_group_filter_custom_attribute_index_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/listing_group_filter_listing_source_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/listing_group_filter_product_category_level_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/listing_group_filter_product_channel_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/listing_group_filter_product_condition_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/listing_group_filter_product_type_level_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/listing_group_filter_type_enum_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/listing_group_type_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/listing_type_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/local_services_business_registration_check_rejection_reason_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/local_services_business_registration_type_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/local_services_conversation_type_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/local_services_employee_status_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/local_services_employee_type_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/local_services_insurance_rejection_reason_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/local_services_lead_credit_issuance_decision_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/local_services_lead_credit_state_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/local_services_lead_status_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/local_services_lead_survey_answer_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/local_services_lead_survey_dissatisfied_reason_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/local_services_lead_survey_satisfied_reason_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/local_services_lead_type_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/local_services_license_rejection_reason_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/local_services_participant_type_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/local_services_verification_artifact_status_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/local_services_verification_artifact_type_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/local_services_verification_status_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/location_group_radius_units_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/location_ownership_type_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/location_source_type_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/location_string_filter_type_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/lookalike_expansion_level_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/manager_link_status_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/match_type_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/media_type_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/messaging_restriction_type_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/mime_type_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/minute_of_hour_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/mobile_app_vendor_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/mobile_device_platform_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/mobile_device_type_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/month_of_year_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/multi_party_auth_operation_type_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/multi_party_auth_review_status_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/multi_party_auth_review_target_resource_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/negative_geo_target_type_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/non_skippable_max_duration_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/non_skippable_min_duration_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/offline_conversion_diagnostic_status_enum_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/offline_event_upload_client_enum_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/offline_user_data_job_failure_reason_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/offline_user_data_job_match_rate_range_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/offline_user_data_job_status_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/offline_user_data_job_type_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/operating_system_version_operator_type_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/optimization_goal_type_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/optimize_assets_experiment_subtype_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/parental_status_type_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/partnership_opportunity_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/payment_mode_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/performance_max_upgrade_status_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/placement_type_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/policy_approval_status_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/policy_review_status_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/policy_topic_entry_type_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/policy_topic_evidence_destination_mismatch_url_type_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/policy_topic_evidence_destination_not_working_device_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/policy_topic_evidence_destination_not_working_dns_error_type_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/positive_geo_target_type_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/preview_type_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/price_extension_price_qualifier_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/price_extension_price_unit_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/price_extension_type_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/product_availability_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/product_category_level_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/product_category_state_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/product_channel_exclusivity_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/product_channel_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/product_condition_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/product_custom_attribute_index_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/product_issue_severity_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/product_link_invitation_status_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/product_status_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/product_type_level_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/promotion_barcode_type_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/promotion_extension_discount_modifier_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/promotion_extension_occasion_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/proximity_radius_units_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/quality_score_bucket_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/reach_plan_age_range_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/reach_plan_buying_method_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/reach_plan_conversion_rate_model_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/reach_plan_cost_model_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/reach_plan_marketing_objective_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/reach_plan_network_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/reach_plan_plannable_user_list_status_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/reach_plan_surface_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/recommendation_subscription_status_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/recommendation_type_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/regulatory_fee_type_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/reservation_request_type_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/resource_change_operation_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/resource_limit_type_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/response_content_type_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/search_engine_results_page_type_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/search_term_match_source_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/search_term_match_type_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/search_term_targeting_status_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/seasonality_event_scope_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/seasonality_event_status_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/served_asset_field_type_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/shared_set_status_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/shared_set_type_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/shopping_add_products_to_campaign_recommendation_enum_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/simulation_modification_method_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/simulation_type_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/sk_ad_network_ad_event_type_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/sk_ad_network_attribution_credit_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/sk_ad_network_coarse_conversion_value_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/sk_ad_network_source_type_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/sk_ad_network_user_type_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/slot_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/smart_campaign_not_eligible_reason_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/smart_campaign_status_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/spending_limit_type_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/summary_row_setting_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/synthetic_content_attestation_status_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/synthetic_content_source_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/system_managed_entity_source_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/target_cpa_opt_in_recommendation_goal_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/target_frequency_time_unit_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/target_impression_share_location_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/targeting_dimension_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/third_party_brand_lift_integration_partner_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/third_party_brand_safety_integration_partner_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/third_party_conversion_attribution_integration_partner_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/third_party_reach_integration_partner_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/third_party_viewability_integration_partner_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/time_type_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/tracking_code_page_format_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/tracking_code_type_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/unit_of_measure_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/user_identifier_source_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/user_interest_taxonomy_type_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/user_list_access_status_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/user_list_closing_reason_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/user_list_crm_data_source_type_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/user_list_customer_type_category_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/user_list_date_rule_item_operator_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/user_list_flexible_rule_operator_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/user_list_logical_rule_operator_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/user_list_membership_status_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/user_list_number_rule_item_operator_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/user_list_prepopulation_status_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/user_list_rule_type_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/user_list_size_range_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/user_list_string_rule_item_operator_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/user_list_type_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/value_rule_device_type_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/value_rule_geo_location_match_type_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/value_rule_operation_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/value_rule_set_attachment_type_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/value_rule_set_dimension_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/vanity_pharma_display_url_mode_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/vanity_pharma_text_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/vertical_ads_item_vertical_type_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/video_ad_format_restriction_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/video_ad_sequence_interaction_type_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/video_ad_sequence_minimum_duration_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/video_enhancement_source_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/video_experiment_subtype_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/video_thumbnail_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/webpage_condition_operand_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/webpage_condition_operator_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/youtube_video_privacy_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/youtube_video_property_pb.rb create mode 100644 lib/google/ads/google_ads/v25/enums/youtube_video_upload_state_pb.rb create mode 100644 lib/google/ads/google_ads/v25/errors/access_invitation_error_pb.rb create mode 100644 lib/google/ads/google_ads/v25/errors/account_budget_proposal_error_pb.rb create mode 100644 lib/google/ads/google_ads/v25/errors/account_link_error_pb.rb create mode 100644 lib/google/ads/google_ads/v25/errors/action_error_pb.rb create mode 100644 lib/google/ads/google_ads/v25/errors/ad_customizer_error_pb.rb create mode 100644 lib/google/ads/google_ads/v25/errors/ad_error_pb.rb create mode 100644 lib/google/ads/google_ads/v25/errors/ad_group_ad_error_pb.rb create mode 100644 lib/google/ads/google_ads/v25/errors/ad_group_bid_modifier_error_pb.rb create mode 100644 lib/google/ads/google_ads/v25/errors/ad_group_criterion_customizer_error_pb.rb create mode 100644 lib/google/ads/google_ads/v25/errors/ad_group_criterion_error_pb.rb create mode 100644 lib/google/ads/google_ads/v25/errors/ad_group_customizer_error_pb.rb create mode 100644 lib/google/ads/google_ads/v25/errors/ad_group_error_pb.rb create mode 100644 lib/google/ads/google_ads/v25/errors/ad_group_feed_error_pb.rb create mode 100644 lib/google/ads/google_ads/v25/errors/ad_parameter_error_pb.rb create mode 100644 lib/google/ads/google_ads/v25/errors/ad_sharing_error_pb.rb create mode 100644 lib/google/ads/google_ads/v25/errors/adx_error_pb.rb create mode 100644 lib/google/ads/google_ads/v25/errors/asset_error_pb.rb create mode 100644 lib/google/ads/google_ads/v25/errors/asset_generation_error_pb.rb create mode 100644 lib/google/ads/google_ads/v25/errors/asset_group_asset_error_pb.rb create mode 100644 lib/google/ads/google_ads/v25/errors/asset_group_error_pb.rb create mode 100644 lib/google/ads/google_ads/v25/errors/asset_group_listing_group_filter_error_pb.rb create mode 100644 lib/google/ads/google_ads/v25/errors/asset_group_signal_error_pb.rb create mode 100644 lib/google/ads/google_ads/v25/errors/asset_link_error_pb.rb create mode 100644 lib/google/ads/google_ads/v25/errors/asset_set_asset_error_pb.rb create mode 100644 lib/google/ads/google_ads/v25/errors/asset_set_error_pb.rb create mode 100644 lib/google/ads/google_ads/v25/errors/asset_set_link_error_pb.rb create mode 100644 lib/google/ads/google_ads/v25/errors/audience_error_pb.rb create mode 100644 lib/google/ads/google_ads/v25/errors/audience_insights_error_pb.rb create mode 100644 lib/google/ads/google_ads/v25/errors/authentication_error_pb.rb create mode 100644 lib/google/ads/google_ads/v25/errors/authorization_error_pb.rb create mode 100644 lib/google/ads/google_ads/v25/errors/automatically_created_asset_removal_error_pb.rb create mode 100644 lib/google/ads/google_ads/v25/errors/batch_job_error_pb.rb create mode 100644 lib/google/ads/google_ads/v25/errors/benchmarks_error_pb.rb create mode 100644 lib/google/ads/google_ads/v25/errors/bidding_error_pb.rb create mode 100644 lib/google/ads/google_ads/v25/errors/bidding_strategy_error_pb.rb create mode 100644 lib/google/ads/google_ads/v25/errors/billing_setup_error_pb.rb create mode 100644 lib/google/ads/google_ads/v25/errors/brand_guidelines_migration_error_pb.rb create mode 100644 lib/google/ads/google_ads/v25/errors/campaign_budget_error_pb.rb create mode 100644 lib/google/ads/google_ads/v25/errors/campaign_conversion_goal_error_pb.rb create mode 100644 lib/google/ads/google_ads/v25/errors/campaign_criterion_error_pb.rb create mode 100644 lib/google/ads/google_ads/v25/errors/campaign_customizer_error_pb.rb create mode 100644 lib/google/ads/google_ads/v25/errors/campaign_draft_error_pb.rb create mode 100644 lib/google/ads/google_ads/v25/errors/campaign_error_pb.rb create mode 100644 lib/google/ads/google_ads/v25/errors/campaign_experiment_error_pb.rb create mode 100644 lib/google/ads/google_ads/v25/errors/campaign_feed_error_pb.rb create mode 100644 lib/google/ads/google_ads/v25/errors/campaign_goal_config_error_pb.rb create mode 100644 lib/google/ads/google_ads/v25/errors/campaign_shared_set_error_pb.rb create mode 100644 lib/google/ads/google_ads/v25/errors/change_event_error_pb.rb create mode 100644 lib/google/ads/google_ads/v25/errors/change_status_error_pb.rb create mode 100644 lib/google/ads/google_ads/v25/errors/click_view_error_pb.rb create mode 100644 lib/google/ads/google_ads/v25/errors/collection_size_error_pb.rb create mode 100644 lib/google/ads/google_ads/v25/errors/content_creator_insights_error_pb.rb create mode 100644 lib/google/ads/google_ads/v25/errors/context_error_pb.rb create mode 100644 lib/google/ads/google_ads/v25/errors/conversion_action_error_pb.rb create mode 100644 lib/google/ads/google_ads/v25/errors/conversion_adjustment_upload_error_pb.rb create mode 100644 lib/google/ads/google_ads/v25/errors/conversion_custom_variable_error_pb.rb create mode 100644 lib/google/ads/google_ads/v25/errors/conversion_goal_campaign_config_error_pb.rb create mode 100644 lib/google/ads/google_ads/v25/errors/conversion_upload_error_pb.rb create mode 100644 lib/google/ads/google_ads/v25/errors/conversion_value_rule_error_pb.rb create mode 100644 lib/google/ads/google_ads/v25/errors/conversion_value_rule_set_error_pb.rb create mode 100644 lib/google/ads/google_ads/v25/errors/country_code_error_pb.rb create mode 100644 lib/google/ads/google_ads/v25/errors/criterion_error_pb.rb create mode 100644 lib/google/ads/google_ads/v25/errors/currency_code_error_pb.rb create mode 100644 lib/google/ads/google_ads/v25/errors/currency_error_pb.rb create mode 100644 lib/google/ads/google_ads/v25/errors/custom_audience_error_pb.rb create mode 100644 lib/google/ads/google_ads/v25/errors/custom_conversion_goal_error_pb.rb create mode 100644 lib/google/ads/google_ads/v25/errors/custom_interest_error_pb.rb create mode 100644 lib/google/ads/google_ads/v25/errors/customer_client_link_error_pb.rb create mode 100644 lib/google/ads/google_ads/v25/errors/customer_customizer_error_pb.rb create mode 100644 lib/google/ads/google_ads/v25/errors/customer_error_pb.rb create mode 100644 lib/google/ads/google_ads/v25/errors/customer_feed_error_pb.rb create mode 100644 lib/google/ads/google_ads/v25/errors/customer_manager_link_error_pb.rb create mode 100644 lib/google/ads/google_ads/v25/errors/customer_sk_ad_network_conversion_value_schema_error_pb.rb create mode 100644 lib/google/ads/google_ads/v25/errors/customer_user_access_error_pb.rb create mode 100644 lib/google/ads/google_ads/v25/errors/customizer_attribute_error_pb.rb create mode 100644 lib/google/ads/google_ads/v25/errors/data_link_error_pb.rb create mode 100644 lib/google/ads/google_ads/v25/errors/database_error_pb.rb create mode 100644 lib/google/ads/google_ads/v25/errors/date_error_pb.rb create mode 100644 lib/google/ads/google_ads/v25/errors/date_range_error_pb.rb create mode 100644 lib/google/ads/google_ads/v25/errors/distinct_error_pb.rb create mode 100644 lib/google/ads/google_ads/v25/errors/enum_error_pb.rb create mode 100644 lib/google/ads/google_ads/v25/errors/errors_pb.rb create mode 100644 lib/google/ads/google_ads/v25/errors/experiment_arm_error_pb.rb create mode 100644 lib/google/ads/google_ads/v25/errors/experiment_error_pb.rb create mode 100644 lib/google/ads/google_ads/v25/errors/extension_feed_item_error_pb.rb create mode 100644 lib/google/ads/google_ads/v25/errors/extension_setting_error_pb.rb create mode 100644 lib/google/ads/google_ads/v25/errors/feed_attribute_reference_error_pb.rb create mode 100644 lib/google/ads/google_ads/v25/errors/feed_error_pb.rb create mode 100644 lib/google/ads/google_ads/v25/errors/feed_item_error_pb.rb create mode 100644 lib/google/ads/google_ads/v25/errors/feed_item_set_error_pb.rb create mode 100644 lib/google/ads/google_ads/v25/errors/feed_item_set_link_error_pb.rb create mode 100644 lib/google/ads/google_ads/v25/errors/feed_item_target_error_pb.rb create mode 100644 lib/google/ads/google_ads/v25/errors/feed_item_validation_error_pb.rb create mode 100644 lib/google/ads/google_ads/v25/errors/feed_mapping_error_pb.rb create mode 100644 lib/google/ads/google_ads/v25/errors/field_error_pb.rb create mode 100644 lib/google/ads/google_ads/v25/errors/field_mask_error_pb.rb create mode 100644 lib/google/ads/google_ads/v25/errors/final_url_expansion_asset_view_error_pb.rb create mode 100644 lib/google/ads/google_ads/v25/errors/function_error_pb.rb create mode 100644 lib/google/ads/google_ads/v25/errors/function_parsing_error_pb.rb create mode 100644 lib/google/ads/google_ads/v25/errors/geo_target_constant_suggestion_error_pb.rb create mode 100644 lib/google/ads/google_ads/v25/errors/goal_error_pb.rb create mode 100644 lib/google/ads/google_ads/v25/errors/header_error_pb.rb create mode 100644 lib/google/ads/google_ads/v25/errors/id_error_pb.rb create mode 100644 lib/google/ads/google_ads/v25/errors/identity_verification_error_pb.rb create mode 100644 lib/google/ads/google_ads/v25/errors/image_error_pb.rb create mode 100644 lib/google/ads/google_ads/v25/errors/incentive_error_pb.rb create mode 100644 lib/google/ads/google_ads/v25/errors/internal_error_pb.rb create mode 100644 lib/google/ads/google_ads/v25/errors/invoice_error_pb.rb create mode 100644 lib/google/ads/google_ads/v25/errors/keyword_plan_ad_group_error_pb.rb create mode 100644 lib/google/ads/google_ads/v25/errors/keyword_plan_ad_group_keyword_error_pb.rb create mode 100644 lib/google/ads/google_ads/v25/errors/keyword_plan_campaign_error_pb.rb create mode 100644 lib/google/ads/google_ads/v25/errors/keyword_plan_campaign_keyword_error_pb.rb create mode 100644 lib/google/ads/google_ads/v25/errors/keyword_plan_error_pb.rb create mode 100644 lib/google/ads/google_ads/v25/errors/keyword_plan_idea_error_pb.rb create mode 100644 lib/google/ads/google_ads/v25/errors/label_error_pb.rb create mode 100644 lib/google/ads/google_ads/v25/errors/language_code_error_pb.rb create mode 100644 lib/google/ads/google_ads/v25/errors/list_operation_error_pb.rb create mode 100644 lib/google/ads/google_ads/v25/errors/manager_link_error_pb.rb create mode 100644 lib/google/ads/google_ads/v25/errors/media_bundle_error_pb.rb create mode 100644 lib/google/ads/google_ads/v25/errors/media_file_error_pb.rb create mode 100644 lib/google/ads/google_ads/v25/errors/media_upload_error_pb.rb create mode 100644 lib/google/ads/google_ads/v25/errors/merchant_center_error_pb.rb create mode 100644 lib/google/ads/google_ads/v25/errors/multi_party_auth_review_error_pb.rb create mode 100644 lib/google/ads/google_ads/v25/errors/multiplier_error_pb.rb create mode 100644 lib/google/ads/google_ads/v25/errors/mutate_error_pb.rb create mode 100644 lib/google/ads/google_ads/v25/errors/new_resource_creation_error_pb.rb create mode 100644 lib/google/ads/google_ads/v25/errors/not_allowlisted_error_pb.rb create mode 100644 lib/google/ads/google_ads/v25/errors/not_empty_error_pb.rb create mode 100644 lib/google/ads/google_ads/v25/errors/null_error_pb.rb create mode 100644 lib/google/ads/google_ads/v25/errors/offline_user_data_job_error_pb.rb create mode 100644 lib/google/ads/google_ads/v25/errors/operation_access_denied_error_pb.rb create mode 100644 lib/google/ads/google_ads/v25/errors/operator_error_pb.rb create mode 100644 lib/google/ads/google_ads/v25/errors/partial_failure_error_pb.rb create mode 100644 lib/google/ads/google_ads/v25/errors/payments_account_error_pb.rb create mode 100644 lib/google/ads/google_ads/v25/errors/policy_finding_error_pb.rb create mode 100644 lib/google/ads/google_ads/v25/errors/policy_validation_parameter_error_pb.rb create mode 100644 lib/google/ads/google_ads/v25/errors/policy_violation_error_pb.rb create mode 100644 lib/google/ads/google_ads/v25/errors/product_link_error_pb.rb create mode 100644 lib/google/ads/google_ads/v25/errors/product_link_invitation_error_pb.rb create mode 100644 lib/google/ads/google_ads/v25/errors/query_error_pb.rb create mode 100644 lib/google/ads/google_ads/v25/errors/quota_error_pb.rb create mode 100644 lib/google/ads/google_ads/v25/errors/range_error_pb.rb create mode 100644 lib/google/ads/google_ads/v25/errors/reach_plan_error_pb.rb create mode 100644 lib/google/ads/google_ads/v25/errors/recommendation_error_pb.rb create mode 100644 lib/google/ads/google_ads/v25/errors/recommendation_subscription_error_pb.rb create mode 100644 lib/google/ads/google_ads/v25/errors/region_code_error_pb.rb create mode 100644 lib/google/ads/google_ads/v25/errors/request_error_pb.rb create mode 100644 lib/google/ads/google_ads/v25/errors/resource_access_denied_error_pb.rb create mode 100644 lib/google/ads/google_ads/v25/errors/resource_count_limit_exceeded_error_pb.rb create mode 100644 lib/google/ads/google_ads/v25/errors/search_term_insight_error_pb.rb create mode 100644 lib/google/ads/google_ads/v25/errors/setting_error_pb.rb create mode 100644 lib/google/ads/google_ads/v25/errors/shareable_preview_error_pb.rb create mode 100644 lib/google/ads/google_ads/v25/errors/shared_criterion_error_pb.rb create mode 100644 lib/google/ads/google_ads/v25/errors/shared_set_error_pb.rb create mode 100644 lib/google/ads/google_ads/v25/errors/shopping_product_error_pb.rb create mode 100644 lib/google/ads/google_ads/v25/errors/size_limit_error_pb.rb create mode 100644 lib/google/ads/google_ads/v25/errors/smart_campaign_error_pb.rb create mode 100644 lib/google/ads/google_ads/v25/errors/string_format_error_pb.rb create mode 100644 lib/google/ads/google_ads/v25/errors/string_length_error_pb.rb create mode 100644 lib/google/ads/google_ads/v25/errors/third_party_app_analytics_link_error_pb.rb create mode 100644 lib/google/ads/google_ads/v25/errors/time_zone_error_pb.rb create mode 100644 lib/google/ads/google_ads/v25/errors/url_field_error_pb.rb create mode 100644 lib/google/ads/google_ads/v25/errors/user_data_error_pb.rb create mode 100644 lib/google/ads/google_ads/v25/errors/user_list_customer_type_error_pb.rb create mode 100644 lib/google/ads/google_ads/v25/errors/user_list_error_pb.rb create mode 100644 lib/google/ads/google_ads/v25/errors/video_campaign_error_pb.rb create mode 100644 lib/google/ads/google_ads/v25/errors/video_reservation_error_pb.rb create mode 100644 lib/google/ads/google_ads/v25/errors/youtube_video_registration_error_pb.rb create mode 100644 lib/google/ads/google_ads/v25/resources/accessible_bidding_strategy_pb.rb create mode 100644 lib/google/ads/google_ads/v25/resources/account_budget_pb.rb create mode 100644 lib/google/ads/google_ads/v25/resources/account_budget_proposal_pb.rb create mode 100644 lib/google/ads/google_ads/v25/resources/account_link_pb.rb create mode 100644 lib/google/ads/google_ads/v25/resources/ad_group_ad_asset_combination_view_pb.rb create mode 100644 lib/google/ads/google_ads/v25/resources/ad_group_ad_asset_view_pb.rb create mode 100644 lib/google/ads/google_ads/v25/resources/ad_group_ad_label_pb.rb create mode 100644 lib/google/ads/google_ads/v25/resources/ad_group_ad_pb.rb create mode 100644 lib/google/ads/google_ads/v25/resources/ad_group_asset_pb.rb create mode 100644 lib/google/ads/google_ads/v25/resources/ad_group_asset_set_pb.rb create mode 100644 lib/google/ads/google_ads/v25/resources/ad_group_audience_view_pb.rb create mode 100644 lib/google/ads/google_ads/v25/resources/ad_group_bid_modifier_pb.rb create mode 100644 lib/google/ads/google_ads/v25/resources/ad_group_criterion_customizer_pb.rb create mode 100644 lib/google/ads/google_ads/v25/resources/ad_group_criterion_label_pb.rb create mode 100644 lib/google/ads/google_ads/v25/resources/ad_group_criterion_pb.rb create mode 100644 lib/google/ads/google_ads/v25/resources/ad_group_criterion_simulation_pb.rb create mode 100644 lib/google/ads/google_ads/v25/resources/ad_group_customizer_pb.rb create mode 100644 lib/google/ads/google_ads/v25/resources/ad_group_label_pb.rb create mode 100644 lib/google/ads/google_ads/v25/resources/ad_group_pb.rb create mode 100644 lib/google/ads/google_ads/v25/resources/ad_group_simulation_pb.rb create mode 100644 lib/google/ads/google_ads/v25/resources/ad_parameter_pb.rb create mode 100644 lib/google/ads/google_ads/v25/resources/ad_pb.rb create mode 100644 lib/google/ads/google_ads/v25/resources/ad_schedule_view_pb.rb create mode 100644 lib/google/ads/google_ads/v25/resources/age_range_view_pb.rb create mode 100644 lib/google/ads/google_ads/v25/resources/ai_max_search_term_ad_combination_view_pb.rb create mode 100644 lib/google/ads/google_ads/v25/resources/android_privacy_shared_key_google_ad_group_pb.rb create mode 100644 lib/google/ads/google_ads/v25/resources/android_privacy_shared_key_google_campaign_pb.rb create mode 100644 lib/google/ads/google_ads/v25/resources/android_privacy_shared_key_google_network_type_pb.rb create mode 100644 lib/google/ads/google_ads/v25/resources/app_top_combination_view_pb.rb create mode 100644 lib/google/ads/google_ads/v25/resources/applied_incentive_pb.rb create mode 100644 lib/google/ads/google_ads/v25/resources/asset_field_type_view_pb.rb create mode 100644 lib/google/ads/google_ads/v25/resources/asset_group_asset_pb.rb create mode 100644 lib/google/ads/google_ads/v25/resources/asset_group_listing_group_filter_pb.rb create mode 100644 lib/google/ads/google_ads/v25/resources/asset_group_pb.rb create mode 100644 lib/google/ads/google_ads/v25/resources/asset_group_product_group_view_pb.rb create mode 100644 lib/google/ads/google_ads/v25/resources/asset_group_signal_pb.rb create mode 100644 lib/google/ads/google_ads/v25/resources/asset_group_top_combination_view_pb.rb create mode 100644 lib/google/ads/google_ads/v25/resources/asset_pb.rb create mode 100644 lib/google/ads/google_ads/v25/resources/asset_set_asset_pb.rb create mode 100644 lib/google/ads/google_ads/v25/resources/asset_set_pb.rb create mode 100644 lib/google/ads/google_ads/v25/resources/asset_set_type_view_pb.rb create mode 100644 lib/google/ads/google_ads/v25/resources/audience_pb.rb create mode 100644 lib/google/ads/google_ads/v25/resources/batch_job_pb.rb create mode 100644 lib/google/ads/google_ads/v25/resources/bidding_data_exclusion_pb.rb create mode 100644 lib/google/ads/google_ads/v25/resources/bidding_seasonality_adjustment_pb.rb create mode 100644 lib/google/ads/google_ads/v25/resources/bidding_strategy_pb.rb create mode 100644 lib/google/ads/google_ads/v25/resources/bidding_strategy_simulation_pb.rb create mode 100644 lib/google/ads/google_ads/v25/resources/billing_setup_pb.rb create mode 100644 lib/google/ads/google_ads/v25/resources/call_view_pb.rb create mode 100644 lib/google/ads/google_ads/v25/resources/campaign_aggregate_asset_view_pb.rb create mode 100644 lib/google/ads/google_ads/v25/resources/campaign_asset_pb.rb create mode 100644 lib/google/ads/google_ads/v25/resources/campaign_asset_set_pb.rb create mode 100644 lib/google/ads/google_ads/v25/resources/campaign_audience_view_pb.rb create mode 100644 lib/google/ads/google_ads/v25/resources/campaign_bid_modifier_pb.rb create mode 100644 lib/google/ads/google_ads/v25/resources/campaign_budget_pb.rb create mode 100644 lib/google/ads/google_ads/v25/resources/campaign_conversion_goal_pb.rb create mode 100644 lib/google/ads/google_ads/v25/resources/campaign_criterion_pb.rb create mode 100644 lib/google/ads/google_ads/v25/resources/campaign_customizer_pb.rb create mode 100644 lib/google/ads/google_ads/v25/resources/campaign_draft_pb.rb create mode 100644 lib/google/ads/google_ads/v25/resources/campaign_goal_config_pb.rb create mode 100644 lib/google/ads/google_ads/v25/resources/campaign_group_pb.rb create mode 100644 lib/google/ads/google_ads/v25/resources/campaign_label_pb.rb create mode 100644 lib/google/ads/google_ads/v25/resources/campaign_pb.rb create mode 100644 lib/google/ads/google_ads/v25/resources/campaign_search_term_insight_pb.rb create mode 100644 lib/google/ads/google_ads/v25/resources/campaign_search_term_view_pb.rb create mode 100644 lib/google/ads/google_ads/v25/resources/campaign_shared_set_pb.rb create mode 100644 lib/google/ads/google_ads/v25/resources/campaign_simulation_pb.rb create mode 100644 lib/google/ads/google_ads/v25/resources/carrier_constant_pb.rb create mode 100644 lib/google/ads/google_ads/v25/resources/cart_data_sales_view_pb.rb create mode 100644 lib/google/ads/google_ads/v25/resources/change_event_pb.rb create mode 100644 lib/google/ads/google_ads/v25/resources/change_status_pb.rb create mode 100644 lib/google/ads/google_ads/v25/resources/channel_aggregate_asset_view_pb.rb create mode 100644 lib/google/ads/google_ads/v25/resources/click_view_pb.rb create mode 100644 lib/google/ads/google_ads/v25/resources/combined_audience_pb.rb create mode 100644 lib/google/ads/google_ads/v25/resources/content_criterion_view_pb.rb create mode 100644 lib/google/ads/google_ads/v25/resources/conversion_action_pb.rb create mode 100644 lib/google/ads/google_ads/v25/resources/conversion_custom_variable_pb.rb create mode 100644 lib/google/ads/google_ads/v25/resources/conversion_goal_campaign_config_pb.rb create mode 100644 lib/google/ads/google_ads/v25/resources/conversion_value_rule_pb.rb create mode 100644 lib/google/ads/google_ads/v25/resources/conversion_value_rule_set_pb.rb create mode 100644 lib/google/ads/google_ads/v25/resources/currency_constant_pb.rb create mode 100644 lib/google/ads/google_ads/v25/resources/custom_audience_pb.rb create mode 100644 lib/google/ads/google_ads/v25/resources/custom_conversion_goal_pb.rb create mode 100644 lib/google/ads/google_ads/v25/resources/custom_interest_pb.rb create mode 100644 lib/google/ads/google_ads/v25/resources/customer_asset_pb.rb create mode 100644 lib/google/ads/google_ads/v25/resources/customer_asset_set_pb.rb create mode 100644 lib/google/ads/google_ads/v25/resources/customer_client_link_pb.rb create mode 100644 lib/google/ads/google_ads/v25/resources/customer_client_pb.rb create mode 100644 lib/google/ads/google_ads/v25/resources/customer_conversion_goal_pb.rb create mode 100644 lib/google/ads/google_ads/v25/resources/customer_customizer_pb.rb create mode 100644 lib/google/ads/google_ads/v25/resources/customer_label_pb.rb create mode 100644 lib/google/ads/google_ads/v25/resources/customer_manager_link_pb.rb create mode 100644 lib/google/ads/google_ads/v25/resources/customer_negative_criterion_pb.rb create mode 100644 lib/google/ads/google_ads/v25/resources/customer_pb.rb create mode 100644 lib/google/ads/google_ads/v25/resources/customer_search_term_insight_pb.rb create mode 100644 lib/google/ads/google_ads/v25/resources/customer_sk_ad_network_conversion_value_schema_pb.rb create mode 100644 lib/google/ads/google_ads/v25/resources/customer_user_access_invitation_pb.rb create mode 100644 lib/google/ads/google_ads/v25/resources/customer_user_access_pb.rb create mode 100644 lib/google/ads/google_ads/v25/resources/customizer_attribute_pb.rb create mode 100644 lib/google/ads/google_ads/v25/resources/data_link_pb.rb create mode 100644 lib/google/ads/google_ads/v25/resources/detail_content_suitability_placement_view_pb.rb create mode 100644 lib/google/ads/google_ads/v25/resources/detail_placement_view_pb.rb create mode 100644 lib/google/ads/google_ads/v25/resources/detailed_demographic_pb.rb create mode 100644 lib/google/ads/google_ads/v25/resources/display_keyword_view_pb.rb create mode 100644 lib/google/ads/google_ads/v25/resources/distance_view_pb.rb create mode 100644 lib/google/ads/google_ads/v25/resources/domain_category_pb.rb create mode 100644 lib/google/ads/google_ads/v25/resources/dynamic_search_ads_search_term_view_pb.rb create mode 100644 lib/google/ads/google_ads/v25/resources/expanded_landing_page_view_pb.rb create mode 100644 lib/google/ads/google_ads/v25/resources/experiment_arm_pb.rb create mode 100644 lib/google/ads/google_ads/v25/resources/experiment_pb.rb create mode 100644 lib/google/ads/google_ads/v25/resources/final_url_expansion_asset_view_pb.rb create mode 100644 lib/google/ads/google_ads/v25/resources/gender_view_pb.rb create mode 100644 lib/google/ads/google_ads/v25/resources/geo_target_constant_pb.rb create mode 100644 lib/google/ads/google_ads/v25/resources/geographic_view_pb.rb create mode 100644 lib/google/ads/google_ads/v25/resources/goal_pb.rb create mode 100644 lib/google/ads/google_ads/v25/resources/google_ads_field_pb.rb create mode 100644 lib/google/ads/google_ads/v25/resources/group_content_suitability_placement_view_pb.rb create mode 100644 lib/google/ads/google_ads/v25/resources/group_placement_view_pb.rb create mode 100644 lib/google/ads/google_ads/v25/resources/hotel_group_view_pb.rb create mode 100644 lib/google/ads/google_ads/v25/resources/hotel_performance_view_pb.rb create mode 100644 lib/google/ads/google_ads/v25/resources/hotel_reconciliation_pb.rb create mode 100644 lib/google/ads/google_ads/v25/resources/income_range_view_pb.rb create mode 100644 lib/google/ads/google_ads/v25/resources/invoice_pb.rb create mode 100644 lib/google/ads/google_ads/v25/resources/keyword_plan_ad_group_keyword_pb.rb create mode 100644 lib/google/ads/google_ads/v25/resources/keyword_plan_ad_group_pb.rb create mode 100644 lib/google/ads/google_ads/v25/resources/keyword_plan_campaign_keyword_pb.rb create mode 100644 lib/google/ads/google_ads/v25/resources/keyword_plan_campaign_pb.rb create mode 100644 lib/google/ads/google_ads/v25/resources/keyword_plan_pb.rb create mode 100644 lib/google/ads/google_ads/v25/resources/keyword_theme_constant_pb.rb create mode 100644 lib/google/ads/google_ads/v25/resources/keyword_view_pb.rb create mode 100644 lib/google/ads/google_ads/v25/resources/label_pb.rb create mode 100644 lib/google/ads/google_ads/v25/resources/landing_page_view_pb.rb create mode 100644 lib/google/ads/google_ads/v25/resources/language_constant_pb.rb create mode 100644 lib/google/ads/google_ads/v25/resources/lead_form_submission_data_pb.rb create mode 100644 lib/google/ads/google_ads/v25/resources/life_event_pb.rb create mode 100644 lib/google/ads/google_ads/v25/resources/local_services_employee_pb.rb create mode 100644 lib/google/ads/google_ads/v25/resources/local_services_lead_conversation_pb.rb create mode 100644 lib/google/ads/google_ads/v25/resources/local_services_lead_pb.rb create mode 100644 lib/google/ads/google_ads/v25/resources/local_services_verification_artifact_pb.rb create mode 100644 lib/google/ads/google_ads/v25/resources/location_interest_view_pb.rb create mode 100644 lib/google/ads/google_ads/v25/resources/location_view_pb.rb create mode 100644 lib/google/ads/google_ads/v25/resources/managed_placement_view_pb.rb create mode 100644 lib/google/ads/google_ads/v25/resources/matched_location_interest_view_pb.rb create mode 100644 lib/google/ads/google_ads/v25/resources/media_file_pb.rb create mode 100644 lib/google/ads/google_ads/v25/resources/mobile_app_category_constant_pb.rb create mode 100644 lib/google/ads/google_ads/v25/resources/mobile_device_constant_pb.rb create mode 100644 lib/google/ads/google_ads/v25/resources/multi_party_auth_review_pb.rb create mode 100644 lib/google/ads/google_ads/v25/resources/offline_conversion_upload_client_summary_pb.rb create mode 100644 lib/google/ads/google_ads/v25/resources/offline_conversion_upload_conversion_action_summary_pb.rb create mode 100644 lib/google/ads/google_ads/v25/resources/offline_user_data_job_pb.rb create mode 100644 lib/google/ads/google_ads/v25/resources/operating_system_version_constant_pb.rb create mode 100644 lib/google/ads/google_ads/v25/resources/paid_organic_search_term_view_pb.rb create mode 100644 lib/google/ads/google_ads/v25/resources/parental_status_view_pb.rb create mode 100644 lib/google/ads/google_ads/v25/resources/payments_account_pb.rb create mode 100644 lib/google/ads/google_ads/v25/resources/per_store_view_pb.rb create mode 100644 lib/google/ads/google_ads/v25/resources/performance_max_placement_view_pb.rb create mode 100644 lib/google/ads/google_ads/v25/resources/product_category_constant_pb.rb create mode 100644 lib/google/ads/google_ads/v25/resources/product_group_view_pb.rb create mode 100644 lib/google/ads/google_ads/v25/resources/product_link_invitation_pb.rb create mode 100644 lib/google/ads/google_ads/v25/resources/product_link_pb.rb create mode 100644 lib/google/ads/google_ads/v25/resources/qualifying_question_pb.rb create mode 100644 lib/google/ads/google_ads/v25/resources/recommendation_pb.rb create mode 100644 lib/google/ads/google_ads/v25/resources/recommendation_subscription_pb.rb create mode 100644 lib/google/ads/google_ads/v25/resources/remarketing_action_pb.rb create mode 100644 lib/google/ads/google_ads/v25/resources/search_term_view_pb.rb create mode 100644 lib/google/ads/google_ads/v25/resources/shared_criterion_pb.rb create mode 100644 lib/google/ads/google_ads/v25/resources/shared_set_pb.rb create mode 100644 lib/google/ads/google_ads/v25/resources/shopping_performance_view_pb.rb create mode 100644 lib/google/ads/google_ads/v25/resources/shopping_product_pb.rb create mode 100644 lib/google/ads/google_ads/v25/resources/smart_campaign_search_term_view_pb.rb create mode 100644 lib/google/ads/google_ads/v25/resources/smart_campaign_setting_pb.rb create mode 100644 lib/google/ads/google_ads/v25/resources/targeting_expansion_view_pb.rb create mode 100644 lib/google/ads/google_ads/v25/resources/third_party_app_analytics_link_pb.rb create mode 100644 lib/google/ads/google_ads/v25/resources/topic_constant_pb.rb create mode 100644 lib/google/ads/google_ads/v25/resources/topic_view_pb.rb create mode 100644 lib/google/ads/google_ads/v25/resources/travel_activity_group_view_pb.rb create mode 100644 lib/google/ads/google_ads/v25/resources/travel_activity_performance_view_pb.rb create mode 100644 lib/google/ads/google_ads/v25/resources/user_interest_pb.rb create mode 100644 lib/google/ads/google_ads/v25/resources/user_list_customer_type_pb.rb create mode 100644 lib/google/ads/google_ads/v25/resources/user_list_pb.rb create mode 100644 lib/google/ads/google_ads/v25/resources/user_location_view_pb.rb create mode 100644 lib/google/ads/google_ads/v25/resources/video_enhancement_pb.rb create mode 100644 lib/google/ads/google_ads/v25/resources/video_pb.rb create mode 100644 lib/google/ads/google_ads/v25/resources/webpage_view_pb.rb create mode 100644 lib/google/ads/google_ads/v25/resources/youtube_video_upload_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services.rb create mode 100644 lib/google/ads/google_ads/v25/services/account_budget_proposal_service.rb create mode 100644 lib/google/ads/google_ads/v25/services/account_budget_proposal_service/client.rb create mode 100644 lib/google/ads/google_ads/v25/services/account_budget_proposal_service/credentials.rb create mode 100644 lib/google/ads/google_ads/v25/services/account_budget_proposal_service/paths.rb create mode 100644 lib/google/ads/google_ads/v25/services/account_budget_proposal_service_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/account_budget_proposal_service_services_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/account_link_service.rb create mode 100644 lib/google/ads/google_ads/v25/services/account_link_service/client.rb create mode 100644 lib/google/ads/google_ads/v25/services/account_link_service/credentials.rb create mode 100644 lib/google/ads/google_ads/v25/services/account_link_service/paths.rb create mode 100644 lib/google/ads/google_ads/v25/services/account_link_service_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/account_link_service_services_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/ad_group_ad_label_service.rb create mode 100644 lib/google/ads/google_ads/v25/services/ad_group_ad_label_service/client.rb create mode 100644 lib/google/ads/google_ads/v25/services/ad_group_ad_label_service/credentials.rb create mode 100644 lib/google/ads/google_ads/v25/services/ad_group_ad_label_service/paths.rb create mode 100644 lib/google/ads/google_ads/v25/services/ad_group_ad_label_service_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/ad_group_ad_label_service_services_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/ad_group_ad_service.rb create mode 100644 lib/google/ads/google_ads/v25/services/ad_group_ad_service/client.rb create mode 100644 lib/google/ads/google_ads/v25/services/ad_group_ad_service/credentials.rb create mode 100644 lib/google/ads/google_ads/v25/services/ad_group_ad_service/paths.rb create mode 100644 lib/google/ads/google_ads/v25/services/ad_group_ad_service_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/ad_group_ad_service_services_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/ad_group_asset_service.rb create mode 100644 lib/google/ads/google_ads/v25/services/ad_group_asset_service/client.rb create mode 100644 lib/google/ads/google_ads/v25/services/ad_group_asset_service/credentials.rb create mode 100644 lib/google/ads/google_ads/v25/services/ad_group_asset_service/paths.rb create mode 100644 lib/google/ads/google_ads/v25/services/ad_group_asset_service_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/ad_group_asset_service_services_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/ad_group_asset_set_service.rb create mode 100644 lib/google/ads/google_ads/v25/services/ad_group_asset_set_service/client.rb create mode 100644 lib/google/ads/google_ads/v25/services/ad_group_asset_set_service/credentials.rb create mode 100644 lib/google/ads/google_ads/v25/services/ad_group_asset_set_service/paths.rb create mode 100644 lib/google/ads/google_ads/v25/services/ad_group_asset_set_service_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/ad_group_asset_set_service_services_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/ad_group_bid_modifier_service.rb create mode 100644 lib/google/ads/google_ads/v25/services/ad_group_bid_modifier_service/client.rb create mode 100644 lib/google/ads/google_ads/v25/services/ad_group_bid_modifier_service/credentials.rb create mode 100644 lib/google/ads/google_ads/v25/services/ad_group_bid_modifier_service/paths.rb create mode 100644 lib/google/ads/google_ads/v25/services/ad_group_bid_modifier_service_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/ad_group_bid_modifier_service_services_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/ad_group_criterion_customizer_service.rb create mode 100644 lib/google/ads/google_ads/v25/services/ad_group_criterion_customizer_service/client.rb create mode 100644 lib/google/ads/google_ads/v25/services/ad_group_criterion_customizer_service/credentials.rb create mode 100644 lib/google/ads/google_ads/v25/services/ad_group_criterion_customizer_service/paths.rb create mode 100644 lib/google/ads/google_ads/v25/services/ad_group_criterion_customizer_service_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/ad_group_criterion_customizer_service_services_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/ad_group_criterion_label_service.rb create mode 100644 lib/google/ads/google_ads/v25/services/ad_group_criterion_label_service/client.rb create mode 100644 lib/google/ads/google_ads/v25/services/ad_group_criterion_label_service/credentials.rb create mode 100644 lib/google/ads/google_ads/v25/services/ad_group_criterion_label_service/paths.rb create mode 100644 lib/google/ads/google_ads/v25/services/ad_group_criterion_label_service_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/ad_group_criterion_label_service_services_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/ad_group_criterion_service.rb create mode 100644 lib/google/ads/google_ads/v25/services/ad_group_criterion_service/client.rb create mode 100644 lib/google/ads/google_ads/v25/services/ad_group_criterion_service/credentials.rb create mode 100644 lib/google/ads/google_ads/v25/services/ad_group_criterion_service/paths.rb create mode 100644 lib/google/ads/google_ads/v25/services/ad_group_criterion_service_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/ad_group_criterion_service_services_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/ad_group_customizer_service.rb create mode 100644 lib/google/ads/google_ads/v25/services/ad_group_customizer_service/client.rb create mode 100644 lib/google/ads/google_ads/v25/services/ad_group_customizer_service/credentials.rb create mode 100644 lib/google/ads/google_ads/v25/services/ad_group_customizer_service/paths.rb create mode 100644 lib/google/ads/google_ads/v25/services/ad_group_customizer_service_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/ad_group_customizer_service_services_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/ad_group_label_service.rb create mode 100644 lib/google/ads/google_ads/v25/services/ad_group_label_service/client.rb create mode 100644 lib/google/ads/google_ads/v25/services/ad_group_label_service/credentials.rb create mode 100644 lib/google/ads/google_ads/v25/services/ad_group_label_service/paths.rb create mode 100644 lib/google/ads/google_ads/v25/services/ad_group_label_service_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/ad_group_label_service_services_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/ad_group_service.rb create mode 100644 lib/google/ads/google_ads/v25/services/ad_group_service/client.rb create mode 100644 lib/google/ads/google_ads/v25/services/ad_group_service/credentials.rb create mode 100644 lib/google/ads/google_ads/v25/services/ad_group_service/paths.rb create mode 100644 lib/google/ads/google_ads/v25/services/ad_group_service_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/ad_group_service_services_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/ad_parameter_service.rb create mode 100644 lib/google/ads/google_ads/v25/services/ad_parameter_service/client.rb create mode 100644 lib/google/ads/google_ads/v25/services/ad_parameter_service/credentials.rb create mode 100644 lib/google/ads/google_ads/v25/services/ad_parameter_service/paths.rb create mode 100644 lib/google/ads/google_ads/v25/services/ad_parameter_service_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/ad_parameter_service_services_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/ad_service.rb create mode 100644 lib/google/ads/google_ads/v25/services/ad_service/client.rb create mode 100644 lib/google/ads/google_ads/v25/services/ad_service/credentials.rb create mode 100644 lib/google/ads/google_ads/v25/services/ad_service/paths.rb create mode 100644 lib/google/ads/google_ads/v25/services/ad_service_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/ad_service_services_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/asset_generation_service.rb create mode 100644 lib/google/ads/google_ads/v25/services/asset_generation_service/client.rb create mode 100644 lib/google/ads/google_ads/v25/services/asset_generation_service/credentials.rb create mode 100644 lib/google/ads/google_ads/v25/services/asset_generation_service/paths.rb create mode 100644 lib/google/ads/google_ads/v25/services/asset_generation_service_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/asset_generation_service_services_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/asset_group_asset_service.rb create mode 100644 lib/google/ads/google_ads/v25/services/asset_group_asset_service/client.rb create mode 100644 lib/google/ads/google_ads/v25/services/asset_group_asset_service/credentials.rb create mode 100644 lib/google/ads/google_ads/v25/services/asset_group_asset_service/paths.rb create mode 100644 lib/google/ads/google_ads/v25/services/asset_group_asset_service_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/asset_group_asset_service_services_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/asset_group_listing_group_filter_service.rb create mode 100644 lib/google/ads/google_ads/v25/services/asset_group_listing_group_filter_service/client.rb create mode 100644 lib/google/ads/google_ads/v25/services/asset_group_listing_group_filter_service/credentials.rb create mode 100644 lib/google/ads/google_ads/v25/services/asset_group_listing_group_filter_service/paths.rb create mode 100644 lib/google/ads/google_ads/v25/services/asset_group_listing_group_filter_service_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/asset_group_listing_group_filter_service_services_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/asset_group_service.rb create mode 100644 lib/google/ads/google_ads/v25/services/asset_group_service/client.rb create mode 100644 lib/google/ads/google_ads/v25/services/asset_group_service/credentials.rb create mode 100644 lib/google/ads/google_ads/v25/services/asset_group_service/paths.rb create mode 100644 lib/google/ads/google_ads/v25/services/asset_group_service_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/asset_group_service_services_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/asset_group_signal_service.rb create mode 100644 lib/google/ads/google_ads/v25/services/asset_group_signal_service/client.rb create mode 100644 lib/google/ads/google_ads/v25/services/asset_group_signal_service/credentials.rb create mode 100644 lib/google/ads/google_ads/v25/services/asset_group_signal_service/paths.rb create mode 100644 lib/google/ads/google_ads/v25/services/asset_group_signal_service_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/asset_group_signal_service_services_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/asset_service.rb create mode 100644 lib/google/ads/google_ads/v25/services/asset_service/client.rb create mode 100644 lib/google/ads/google_ads/v25/services/asset_service/credentials.rb create mode 100644 lib/google/ads/google_ads/v25/services/asset_service/paths.rb create mode 100644 lib/google/ads/google_ads/v25/services/asset_service_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/asset_service_services_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/asset_set_asset_service.rb create mode 100644 lib/google/ads/google_ads/v25/services/asset_set_asset_service/client.rb create mode 100644 lib/google/ads/google_ads/v25/services/asset_set_asset_service/credentials.rb create mode 100644 lib/google/ads/google_ads/v25/services/asset_set_asset_service/paths.rb create mode 100644 lib/google/ads/google_ads/v25/services/asset_set_asset_service_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/asset_set_asset_service_services_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/asset_set_service.rb create mode 100644 lib/google/ads/google_ads/v25/services/asset_set_service/client.rb create mode 100644 lib/google/ads/google_ads/v25/services/asset_set_service/credentials.rb create mode 100644 lib/google/ads/google_ads/v25/services/asset_set_service/paths.rb create mode 100644 lib/google/ads/google_ads/v25/services/asset_set_service_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/asset_set_service_services_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/audience_insights_service.rb create mode 100644 lib/google/ads/google_ads/v25/services/audience_insights_service/client.rb create mode 100644 lib/google/ads/google_ads/v25/services/audience_insights_service/credentials.rb create mode 100644 lib/google/ads/google_ads/v25/services/audience_insights_service_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/audience_insights_service_services_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/audience_service.rb create mode 100644 lib/google/ads/google_ads/v25/services/audience_service/client.rb create mode 100644 lib/google/ads/google_ads/v25/services/audience_service/credentials.rb create mode 100644 lib/google/ads/google_ads/v25/services/audience_service/paths.rb create mode 100644 lib/google/ads/google_ads/v25/services/audience_service_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/audience_service_services_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/automatically_created_asset_removal_service.rb create mode 100644 lib/google/ads/google_ads/v25/services/automatically_created_asset_removal_service/client.rb create mode 100644 lib/google/ads/google_ads/v25/services/automatically_created_asset_removal_service/credentials.rb create mode 100644 lib/google/ads/google_ads/v25/services/automatically_created_asset_removal_service_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/automatically_created_asset_removal_service_services_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/batch_job_service.rb create mode 100644 lib/google/ads/google_ads/v25/services/batch_job_service/client.rb create mode 100644 lib/google/ads/google_ads/v25/services/batch_job_service/credentials.rb create mode 100644 lib/google/ads/google_ads/v25/services/batch_job_service/operations.rb create mode 100644 lib/google/ads/google_ads/v25/services/batch_job_service/paths.rb create mode 100644 lib/google/ads/google_ads/v25/services/batch_job_service_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/batch_job_service_services_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/benchmarks_service.rb create mode 100644 lib/google/ads/google_ads/v25/services/benchmarks_service/client.rb create mode 100644 lib/google/ads/google_ads/v25/services/benchmarks_service/credentials.rb create mode 100644 lib/google/ads/google_ads/v25/services/benchmarks_service_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/benchmarks_service_services_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/bidding_data_exclusion_service.rb create mode 100644 lib/google/ads/google_ads/v25/services/bidding_data_exclusion_service/client.rb create mode 100644 lib/google/ads/google_ads/v25/services/bidding_data_exclusion_service/credentials.rb create mode 100644 lib/google/ads/google_ads/v25/services/bidding_data_exclusion_service/paths.rb create mode 100644 lib/google/ads/google_ads/v25/services/bidding_data_exclusion_service_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/bidding_data_exclusion_service_services_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/bidding_seasonality_adjustment_service.rb create mode 100644 lib/google/ads/google_ads/v25/services/bidding_seasonality_adjustment_service/client.rb create mode 100644 lib/google/ads/google_ads/v25/services/bidding_seasonality_adjustment_service/credentials.rb create mode 100644 lib/google/ads/google_ads/v25/services/bidding_seasonality_adjustment_service/paths.rb create mode 100644 lib/google/ads/google_ads/v25/services/bidding_seasonality_adjustment_service_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/bidding_seasonality_adjustment_service_services_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/bidding_strategy_service.rb create mode 100644 lib/google/ads/google_ads/v25/services/bidding_strategy_service/client.rb create mode 100644 lib/google/ads/google_ads/v25/services/bidding_strategy_service/credentials.rb create mode 100644 lib/google/ads/google_ads/v25/services/bidding_strategy_service/paths.rb create mode 100644 lib/google/ads/google_ads/v25/services/bidding_strategy_service_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/bidding_strategy_service_services_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/billing_setup_service.rb create mode 100644 lib/google/ads/google_ads/v25/services/billing_setup_service/client.rb create mode 100644 lib/google/ads/google_ads/v25/services/billing_setup_service/credentials.rb create mode 100644 lib/google/ads/google_ads/v25/services/billing_setup_service/paths.rb create mode 100644 lib/google/ads/google_ads/v25/services/billing_setup_service_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/billing_setup_service_services_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/brand_suggestion_service.rb create mode 100644 lib/google/ads/google_ads/v25/services/brand_suggestion_service/client.rb create mode 100644 lib/google/ads/google_ads/v25/services/brand_suggestion_service/credentials.rb create mode 100644 lib/google/ads/google_ads/v25/services/brand_suggestion_service_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/brand_suggestion_service_services_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/campaign_asset_service.rb create mode 100644 lib/google/ads/google_ads/v25/services/campaign_asset_service/client.rb create mode 100644 lib/google/ads/google_ads/v25/services/campaign_asset_service/credentials.rb create mode 100644 lib/google/ads/google_ads/v25/services/campaign_asset_service/paths.rb create mode 100644 lib/google/ads/google_ads/v25/services/campaign_asset_service_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/campaign_asset_service_services_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/campaign_asset_set_service.rb create mode 100644 lib/google/ads/google_ads/v25/services/campaign_asset_set_service/client.rb create mode 100644 lib/google/ads/google_ads/v25/services/campaign_asset_set_service/credentials.rb create mode 100644 lib/google/ads/google_ads/v25/services/campaign_asset_set_service/paths.rb create mode 100644 lib/google/ads/google_ads/v25/services/campaign_asset_set_service_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/campaign_asset_set_service_services_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/campaign_bid_modifier_service.rb create mode 100644 lib/google/ads/google_ads/v25/services/campaign_bid_modifier_service/client.rb create mode 100644 lib/google/ads/google_ads/v25/services/campaign_bid_modifier_service/credentials.rb create mode 100644 lib/google/ads/google_ads/v25/services/campaign_bid_modifier_service/paths.rb create mode 100644 lib/google/ads/google_ads/v25/services/campaign_bid_modifier_service_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/campaign_bid_modifier_service_services_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/campaign_budget_service.rb create mode 100644 lib/google/ads/google_ads/v25/services/campaign_budget_service/client.rb create mode 100644 lib/google/ads/google_ads/v25/services/campaign_budget_service/credentials.rb create mode 100644 lib/google/ads/google_ads/v25/services/campaign_budget_service/paths.rb create mode 100644 lib/google/ads/google_ads/v25/services/campaign_budget_service_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/campaign_budget_service_services_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/campaign_conversion_goal_service.rb create mode 100644 lib/google/ads/google_ads/v25/services/campaign_conversion_goal_service/client.rb create mode 100644 lib/google/ads/google_ads/v25/services/campaign_conversion_goal_service/credentials.rb create mode 100644 lib/google/ads/google_ads/v25/services/campaign_conversion_goal_service/paths.rb create mode 100644 lib/google/ads/google_ads/v25/services/campaign_conversion_goal_service_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/campaign_conversion_goal_service_services_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/campaign_criterion_service.rb create mode 100644 lib/google/ads/google_ads/v25/services/campaign_criterion_service/client.rb create mode 100644 lib/google/ads/google_ads/v25/services/campaign_criterion_service/credentials.rb create mode 100644 lib/google/ads/google_ads/v25/services/campaign_criterion_service/paths.rb create mode 100644 lib/google/ads/google_ads/v25/services/campaign_criterion_service_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/campaign_criterion_service_services_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/campaign_customizer_service.rb create mode 100644 lib/google/ads/google_ads/v25/services/campaign_customizer_service/client.rb create mode 100644 lib/google/ads/google_ads/v25/services/campaign_customizer_service/credentials.rb create mode 100644 lib/google/ads/google_ads/v25/services/campaign_customizer_service/paths.rb create mode 100644 lib/google/ads/google_ads/v25/services/campaign_customizer_service_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/campaign_customizer_service_services_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/campaign_draft_service.rb create mode 100644 lib/google/ads/google_ads/v25/services/campaign_draft_service/client.rb create mode 100644 lib/google/ads/google_ads/v25/services/campaign_draft_service/credentials.rb create mode 100644 lib/google/ads/google_ads/v25/services/campaign_draft_service/operations.rb create mode 100644 lib/google/ads/google_ads/v25/services/campaign_draft_service/paths.rb create mode 100644 lib/google/ads/google_ads/v25/services/campaign_draft_service_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/campaign_draft_service_services_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/campaign_goal_config_service.rb create mode 100644 lib/google/ads/google_ads/v25/services/campaign_goal_config_service/client.rb create mode 100644 lib/google/ads/google_ads/v25/services/campaign_goal_config_service/credentials.rb create mode 100644 lib/google/ads/google_ads/v25/services/campaign_goal_config_service/paths.rb create mode 100644 lib/google/ads/google_ads/v25/services/campaign_goal_config_service_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/campaign_goal_config_service_services_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/campaign_group_service.rb create mode 100644 lib/google/ads/google_ads/v25/services/campaign_group_service/client.rb create mode 100644 lib/google/ads/google_ads/v25/services/campaign_group_service/credentials.rb create mode 100644 lib/google/ads/google_ads/v25/services/campaign_group_service/paths.rb create mode 100644 lib/google/ads/google_ads/v25/services/campaign_group_service_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/campaign_group_service_services_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/campaign_label_service.rb create mode 100644 lib/google/ads/google_ads/v25/services/campaign_label_service/client.rb create mode 100644 lib/google/ads/google_ads/v25/services/campaign_label_service/credentials.rb create mode 100644 lib/google/ads/google_ads/v25/services/campaign_label_service/paths.rb create mode 100644 lib/google/ads/google_ads/v25/services/campaign_label_service_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/campaign_label_service_services_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/campaign_service.rb create mode 100644 lib/google/ads/google_ads/v25/services/campaign_service/client.rb create mode 100644 lib/google/ads/google_ads/v25/services/campaign_service/credentials.rb create mode 100644 lib/google/ads/google_ads/v25/services/campaign_service/paths.rb create mode 100644 lib/google/ads/google_ads/v25/services/campaign_service_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/campaign_service_services_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/campaign_shared_set_service.rb create mode 100644 lib/google/ads/google_ads/v25/services/campaign_shared_set_service/client.rb create mode 100644 lib/google/ads/google_ads/v25/services/campaign_shared_set_service/credentials.rb create mode 100644 lib/google/ads/google_ads/v25/services/campaign_shared_set_service/paths.rb create mode 100644 lib/google/ads/google_ads/v25/services/campaign_shared_set_service_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/campaign_shared_set_service_services_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/content_creator_insights_service.rb create mode 100644 lib/google/ads/google_ads/v25/services/content_creator_insights_service/client.rb create mode 100644 lib/google/ads/google_ads/v25/services/content_creator_insights_service/credentials.rb create mode 100644 lib/google/ads/google_ads/v25/services/content_creator_insights_service_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/content_creator_insights_service_services_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/conversion_action_service.rb create mode 100644 lib/google/ads/google_ads/v25/services/conversion_action_service/client.rb create mode 100644 lib/google/ads/google_ads/v25/services/conversion_action_service/credentials.rb create mode 100644 lib/google/ads/google_ads/v25/services/conversion_action_service/paths.rb create mode 100644 lib/google/ads/google_ads/v25/services/conversion_action_service_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/conversion_action_service_services_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/conversion_adjustment_upload_service.rb create mode 100644 lib/google/ads/google_ads/v25/services/conversion_adjustment_upload_service/client.rb create mode 100644 lib/google/ads/google_ads/v25/services/conversion_adjustment_upload_service/credentials.rb create mode 100644 lib/google/ads/google_ads/v25/services/conversion_adjustment_upload_service_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/conversion_adjustment_upload_service_services_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/conversion_custom_variable_service.rb create mode 100644 lib/google/ads/google_ads/v25/services/conversion_custom_variable_service/client.rb create mode 100644 lib/google/ads/google_ads/v25/services/conversion_custom_variable_service/credentials.rb create mode 100644 lib/google/ads/google_ads/v25/services/conversion_custom_variable_service/paths.rb create mode 100644 lib/google/ads/google_ads/v25/services/conversion_custom_variable_service_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/conversion_custom_variable_service_services_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/conversion_goal_campaign_config_service.rb create mode 100644 lib/google/ads/google_ads/v25/services/conversion_goal_campaign_config_service/client.rb create mode 100644 lib/google/ads/google_ads/v25/services/conversion_goal_campaign_config_service/credentials.rb create mode 100644 lib/google/ads/google_ads/v25/services/conversion_goal_campaign_config_service/paths.rb create mode 100644 lib/google/ads/google_ads/v25/services/conversion_goal_campaign_config_service_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/conversion_goal_campaign_config_service_services_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/conversion_upload_service.rb create mode 100644 lib/google/ads/google_ads/v25/services/conversion_upload_service/client.rb create mode 100644 lib/google/ads/google_ads/v25/services/conversion_upload_service/credentials.rb create mode 100644 lib/google/ads/google_ads/v25/services/conversion_upload_service/paths.rb create mode 100644 lib/google/ads/google_ads/v25/services/conversion_upload_service_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/conversion_upload_service_services_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/conversion_value_rule_service.rb create mode 100644 lib/google/ads/google_ads/v25/services/conversion_value_rule_service/client.rb create mode 100644 lib/google/ads/google_ads/v25/services/conversion_value_rule_service/credentials.rb create mode 100644 lib/google/ads/google_ads/v25/services/conversion_value_rule_service/paths.rb create mode 100644 lib/google/ads/google_ads/v25/services/conversion_value_rule_service_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/conversion_value_rule_service_services_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/conversion_value_rule_set_service.rb create mode 100644 lib/google/ads/google_ads/v25/services/conversion_value_rule_set_service/client.rb create mode 100644 lib/google/ads/google_ads/v25/services/conversion_value_rule_set_service/credentials.rb create mode 100644 lib/google/ads/google_ads/v25/services/conversion_value_rule_set_service/paths.rb create mode 100644 lib/google/ads/google_ads/v25/services/conversion_value_rule_set_service_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/conversion_value_rule_set_service_services_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/custom_audience_service.rb create mode 100644 lib/google/ads/google_ads/v25/services/custom_audience_service/client.rb create mode 100644 lib/google/ads/google_ads/v25/services/custom_audience_service/credentials.rb create mode 100644 lib/google/ads/google_ads/v25/services/custom_audience_service/paths.rb create mode 100644 lib/google/ads/google_ads/v25/services/custom_audience_service_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/custom_audience_service_services_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/custom_conversion_goal_service.rb create mode 100644 lib/google/ads/google_ads/v25/services/custom_conversion_goal_service/client.rb create mode 100644 lib/google/ads/google_ads/v25/services/custom_conversion_goal_service/credentials.rb create mode 100644 lib/google/ads/google_ads/v25/services/custom_conversion_goal_service/paths.rb create mode 100644 lib/google/ads/google_ads/v25/services/custom_conversion_goal_service_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/custom_conversion_goal_service_services_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/custom_interest_service.rb create mode 100644 lib/google/ads/google_ads/v25/services/custom_interest_service/client.rb create mode 100644 lib/google/ads/google_ads/v25/services/custom_interest_service/credentials.rb create mode 100644 lib/google/ads/google_ads/v25/services/custom_interest_service/paths.rb create mode 100644 lib/google/ads/google_ads/v25/services/custom_interest_service_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/custom_interest_service_services_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/customer_asset_service.rb create mode 100644 lib/google/ads/google_ads/v25/services/customer_asset_service/client.rb create mode 100644 lib/google/ads/google_ads/v25/services/customer_asset_service/credentials.rb create mode 100644 lib/google/ads/google_ads/v25/services/customer_asset_service/paths.rb create mode 100644 lib/google/ads/google_ads/v25/services/customer_asset_service_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/customer_asset_service_services_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/customer_asset_set_service.rb create mode 100644 lib/google/ads/google_ads/v25/services/customer_asset_set_service/client.rb create mode 100644 lib/google/ads/google_ads/v25/services/customer_asset_set_service/credentials.rb create mode 100644 lib/google/ads/google_ads/v25/services/customer_asset_set_service/paths.rb create mode 100644 lib/google/ads/google_ads/v25/services/customer_asset_set_service_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/customer_asset_set_service_services_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/customer_client_link_service.rb create mode 100644 lib/google/ads/google_ads/v25/services/customer_client_link_service/client.rb create mode 100644 lib/google/ads/google_ads/v25/services/customer_client_link_service/credentials.rb create mode 100644 lib/google/ads/google_ads/v25/services/customer_client_link_service/paths.rb create mode 100644 lib/google/ads/google_ads/v25/services/customer_client_link_service_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/customer_client_link_service_services_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/customer_conversion_goal_service.rb create mode 100644 lib/google/ads/google_ads/v25/services/customer_conversion_goal_service/client.rb create mode 100644 lib/google/ads/google_ads/v25/services/customer_conversion_goal_service/credentials.rb create mode 100644 lib/google/ads/google_ads/v25/services/customer_conversion_goal_service/paths.rb create mode 100644 lib/google/ads/google_ads/v25/services/customer_conversion_goal_service_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/customer_conversion_goal_service_services_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/customer_customizer_service.rb create mode 100644 lib/google/ads/google_ads/v25/services/customer_customizer_service/client.rb create mode 100644 lib/google/ads/google_ads/v25/services/customer_customizer_service/credentials.rb create mode 100644 lib/google/ads/google_ads/v25/services/customer_customizer_service/paths.rb create mode 100644 lib/google/ads/google_ads/v25/services/customer_customizer_service_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/customer_customizer_service_services_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/customer_label_service.rb create mode 100644 lib/google/ads/google_ads/v25/services/customer_label_service/client.rb create mode 100644 lib/google/ads/google_ads/v25/services/customer_label_service/credentials.rb create mode 100644 lib/google/ads/google_ads/v25/services/customer_label_service/paths.rb create mode 100644 lib/google/ads/google_ads/v25/services/customer_label_service_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/customer_label_service_services_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/customer_manager_link_service.rb create mode 100644 lib/google/ads/google_ads/v25/services/customer_manager_link_service/client.rb create mode 100644 lib/google/ads/google_ads/v25/services/customer_manager_link_service/credentials.rb create mode 100644 lib/google/ads/google_ads/v25/services/customer_manager_link_service/paths.rb create mode 100644 lib/google/ads/google_ads/v25/services/customer_manager_link_service_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/customer_manager_link_service_services_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/customer_negative_criterion_service.rb create mode 100644 lib/google/ads/google_ads/v25/services/customer_negative_criterion_service/client.rb create mode 100644 lib/google/ads/google_ads/v25/services/customer_negative_criterion_service/credentials.rb create mode 100644 lib/google/ads/google_ads/v25/services/customer_negative_criterion_service/paths.rb create mode 100644 lib/google/ads/google_ads/v25/services/customer_negative_criterion_service_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/customer_negative_criterion_service_services_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/customer_service.rb create mode 100644 lib/google/ads/google_ads/v25/services/customer_service/client.rb create mode 100644 lib/google/ads/google_ads/v25/services/customer_service/credentials.rb create mode 100644 lib/google/ads/google_ads/v25/services/customer_service/paths.rb create mode 100644 lib/google/ads/google_ads/v25/services/customer_service_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/customer_service_services_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/customer_sk_ad_network_conversion_value_schema_service.rb create mode 100644 lib/google/ads/google_ads/v25/services/customer_sk_ad_network_conversion_value_schema_service/client.rb create mode 100644 lib/google/ads/google_ads/v25/services/customer_sk_ad_network_conversion_value_schema_service/credentials.rb create mode 100644 lib/google/ads/google_ads/v25/services/customer_sk_ad_network_conversion_value_schema_service/paths.rb create mode 100644 lib/google/ads/google_ads/v25/services/customer_sk_ad_network_conversion_value_schema_service_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/customer_sk_ad_network_conversion_value_schema_service_services_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/customer_user_access_invitation_service.rb create mode 100644 lib/google/ads/google_ads/v25/services/customer_user_access_invitation_service/client.rb create mode 100644 lib/google/ads/google_ads/v25/services/customer_user_access_invitation_service/credentials.rb create mode 100644 lib/google/ads/google_ads/v25/services/customer_user_access_invitation_service/paths.rb create mode 100644 lib/google/ads/google_ads/v25/services/customer_user_access_invitation_service_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/customer_user_access_invitation_service_services_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/customer_user_access_service.rb create mode 100644 lib/google/ads/google_ads/v25/services/customer_user_access_service/client.rb create mode 100644 lib/google/ads/google_ads/v25/services/customer_user_access_service/credentials.rb create mode 100644 lib/google/ads/google_ads/v25/services/customer_user_access_service/paths.rb create mode 100644 lib/google/ads/google_ads/v25/services/customer_user_access_service_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/customer_user_access_service_services_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/customizer_attribute_service.rb create mode 100644 lib/google/ads/google_ads/v25/services/customizer_attribute_service/client.rb create mode 100644 lib/google/ads/google_ads/v25/services/customizer_attribute_service/credentials.rb create mode 100644 lib/google/ads/google_ads/v25/services/customizer_attribute_service/paths.rb create mode 100644 lib/google/ads/google_ads/v25/services/customizer_attribute_service_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/customizer_attribute_service_services_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/data_link_service.rb create mode 100644 lib/google/ads/google_ads/v25/services/data_link_service/client.rb create mode 100644 lib/google/ads/google_ads/v25/services/data_link_service/credentials.rb create mode 100644 lib/google/ads/google_ads/v25/services/data_link_service/paths.rb create mode 100644 lib/google/ads/google_ads/v25/services/data_link_service_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/data_link_service_services_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/experiment_arm_service.rb create mode 100644 lib/google/ads/google_ads/v25/services/experiment_arm_service/client.rb create mode 100644 lib/google/ads/google_ads/v25/services/experiment_arm_service/credentials.rb create mode 100644 lib/google/ads/google_ads/v25/services/experiment_arm_service/paths.rb create mode 100644 lib/google/ads/google_ads/v25/services/experiment_arm_service_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/experiment_arm_service_services_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/experiment_service.rb create mode 100644 lib/google/ads/google_ads/v25/services/experiment_service/client.rb create mode 100644 lib/google/ads/google_ads/v25/services/experiment_service/credentials.rb create mode 100644 lib/google/ads/google_ads/v25/services/experiment_service/operations.rb create mode 100644 lib/google/ads/google_ads/v25/services/experiment_service/paths.rb create mode 100644 lib/google/ads/google_ads/v25/services/experiment_service_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/experiment_service_services_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/geo_target_constant_service.rb create mode 100644 lib/google/ads/google_ads/v25/services/geo_target_constant_service/client.rb create mode 100644 lib/google/ads/google_ads/v25/services/geo_target_constant_service/credentials.rb create mode 100644 lib/google/ads/google_ads/v25/services/geo_target_constant_service/paths.rb create mode 100644 lib/google/ads/google_ads/v25/services/geo_target_constant_service_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/geo_target_constant_service_services_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/goal_service.rb create mode 100644 lib/google/ads/google_ads/v25/services/goal_service/client.rb create mode 100644 lib/google/ads/google_ads/v25/services/goal_service/credentials.rb create mode 100644 lib/google/ads/google_ads/v25/services/goal_service/paths.rb create mode 100644 lib/google/ads/google_ads/v25/services/goal_service_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/goal_service_services_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/google_ads_field_service.rb create mode 100644 lib/google/ads/google_ads/v25/services/google_ads_field_service/client.rb create mode 100644 lib/google/ads/google_ads/v25/services/google_ads_field_service/credentials.rb create mode 100644 lib/google/ads/google_ads/v25/services/google_ads_field_service/paths.rb create mode 100644 lib/google/ads/google_ads/v25/services/google_ads_field_service_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/google_ads_field_service_services_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/google_ads_service.rb create mode 100644 lib/google/ads/google_ads/v25/services/google_ads_service/client.rb create mode 100644 lib/google/ads/google_ads/v25/services/google_ads_service/credentials.rb create mode 100644 lib/google/ads/google_ads/v25/services/google_ads_service/paths.rb create mode 100644 lib/google/ads/google_ads/v25/services/google_ads_service_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/google_ads_service_services_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/identity_verification_service.rb create mode 100644 lib/google/ads/google_ads/v25/services/identity_verification_service/client.rb create mode 100644 lib/google/ads/google_ads/v25/services/identity_verification_service/credentials.rb create mode 100644 lib/google/ads/google_ads/v25/services/identity_verification_service_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/identity_verification_service_services_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/incentive_service.rb create mode 100644 lib/google/ads/google_ads/v25/services/incentive_service/client.rb create mode 100644 lib/google/ads/google_ads/v25/services/incentive_service/credentials.rb create mode 100644 lib/google/ads/google_ads/v25/services/incentive_service_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/incentive_service_services_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/invoice_service.rb create mode 100644 lib/google/ads/google_ads/v25/services/invoice_service/client.rb create mode 100644 lib/google/ads/google_ads/v25/services/invoice_service/credentials.rb create mode 100644 lib/google/ads/google_ads/v25/services/invoice_service/paths.rb create mode 100644 lib/google/ads/google_ads/v25/services/invoice_service_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/invoice_service_services_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/keyword_plan_ad_group_keyword_service.rb create mode 100644 lib/google/ads/google_ads/v25/services/keyword_plan_ad_group_keyword_service/client.rb create mode 100644 lib/google/ads/google_ads/v25/services/keyword_plan_ad_group_keyword_service/credentials.rb create mode 100644 lib/google/ads/google_ads/v25/services/keyword_plan_ad_group_keyword_service/paths.rb create mode 100644 lib/google/ads/google_ads/v25/services/keyword_plan_ad_group_keyword_service_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/keyword_plan_ad_group_keyword_service_services_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/keyword_plan_ad_group_service.rb create mode 100644 lib/google/ads/google_ads/v25/services/keyword_plan_ad_group_service/client.rb create mode 100644 lib/google/ads/google_ads/v25/services/keyword_plan_ad_group_service/credentials.rb create mode 100644 lib/google/ads/google_ads/v25/services/keyword_plan_ad_group_service/paths.rb create mode 100644 lib/google/ads/google_ads/v25/services/keyword_plan_ad_group_service_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/keyword_plan_ad_group_service_services_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/keyword_plan_campaign_keyword_service.rb create mode 100644 lib/google/ads/google_ads/v25/services/keyword_plan_campaign_keyword_service/client.rb create mode 100644 lib/google/ads/google_ads/v25/services/keyword_plan_campaign_keyword_service/credentials.rb create mode 100644 lib/google/ads/google_ads/v25/services/keyword_plan_campaign_keyword_service/paths.rb create mode 100644 lib/google/ads/google_ads/v25/services/keyword_plan_campaign_keyword_service_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/keyword_plan_campaign_keyword_service_services_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/keyword_plan_campaign_service.rb create mode 100644 lib/google/ads/google_ads/v25/services/keyword_plan_campaign_service/client.rb create mode 100644 lib/google/ads/google_ads/v25/services/keyword_plan_campaign_service/credentials.rb create mode 100644 lib/google/ads/google_ads/v25/services/keyword_plan_campaign_service/paths.rb create mode 100644 lib/google/ads/google_ads/v25/services/keyword_plan_campaign_service_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/keyword_plan_campaign_service_services_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/keyword_plan_idea_service.rb create mode 100644 lib/google/ads/google_ads/v25/services/keyword_plan_idea_service/client.rb create mode 100644 lib/google/ads/google_ads/v25/services/keyword_plan_idea_service/credentials.rb create mode 100644 lib/google/ads/google_ads/v25/services/keyword_plan_idea_service_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/keyword_plan_idea_service_services_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/keyword_plan_service.rb create mode 100644 lib/google/ads/google_ads/v25/services/keyword_plan_service/client.rb create mode 100644 lib/google/ads/google_ads/v25/services/keyword_plan_service/credentials.rb create mode 100644 lib/google/ads/google_ads/v25/services/keyword_plan_service/paths.rb create mode 100644 lib/google/ads/google_ads/v25/services/keyword_plan_service_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/keyword_plan_service_services_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/keyword_theme_constant_service.rb create mode 100644 lib/google/ads/google_ads/v25/services/keyword_theme_constant_service/client.rb create mode 100644 lib/google/ads/google_ads/v25/services/keyword_theme_constant_service/credentials.rb create mode 100644 lib/google/ads/google_ads/v25/services/keyword_theme_constant_service/paths.rb create mode 100644 lib/google/ads/google_ads/v25/services/keyword_theme_constant_service_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/keyword_theme_constant_service_services_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/label_service.rb create mode 100644 lib/google/ads/google_ads/v25/services/label_service/client.rb create mode 100644 lib/google/ads/google_ads/v25/services/label_service/credentials.rb create mode 100644 lib/google/ads/google_ads/v25/services/label_service/paths.rb create mode 100644 lib/google/ads/google_ads/v25/services/label_service_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/label_service_services_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/local_services_lead_service.rb create mode 100644 lib/google/ads/google_ads/v25/services/local_services_lead_service/client.rb create mode 100644 lib/google/ads/google_ads/v25/services/local_services_lead_service/credentials.rb create mode 100644 lib/google/ads/google_ads/v25/services/local_services_lead_service/paths.rb create mode 100644 lib/google/ads/google_ads/v25/services/local_services_lead_service_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/local_services_lead_service_services_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/multi_party_auth_review_service.rb create mode 100644 lib/google/ads/google_ads/v25/services/multi_party_auth_review_service/client.rb create mode 100644 lib/google/ads/google_ads/v25/services/multi_party_auth_review_service/credentials.rb create mode 100644 lib/google/ads/google_ads/v25/services/multi_party_auth_review_service/paths.rb create mode 100644 lib/google/ads/google_ads/v25/services/multi_party_auth_review_service_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/multi_party_auth_review_service_services_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/offline_user_data_job_service.rb create mode 100644 lib/google/ads/google_ads/v25/services/offline_user_data_job_service/client.rb create mode 100644 lib/google/ads/google_ads/v25/services/offline_user_data_job_service/credentials.rb create mode 100644 lib/google/ads/google_ads/v25/services/offline_user_data_job_service/operations.rb create mode 100644 lib/google/ads/google_ads/v25/services/offline_user_data_job_service/paths.rb create mode 100644 lib/google/ads/google_ads/v25/services/offline_user_data_job_service_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/offline_user_data_job_service_services_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/payments_account_service.rb create mode 100644 lib/google/ads/google_ads/v25/services/payments_account_service/client.rb create mode 100644 lib/google/ads/google_ads/v25/services/payments_account_service/credentials.rb create mode 100644 lib/google/ads/google_ads/v25/services/payments_account_service/paths.rb create mode 100644 lib/google/ads/google_ads/v25/services/payments_account_service_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/payments_account_service_services_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/product_link_invitation_service.rb create mode 100644 lib/google/ads/google_ads/v25/services/product_link_invitation_service/client.rb create mode 100644 lib/google/ads/google_ads/v25/services/product_link_invitation_service/credentials.rb create mode 100644 lib/google/ads/google_ads/v25/services/product_link_invitation_service/paths.rb create mode 100644 lib/google/ads/google_ads/v25/services/product_link_invitation_service_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/product_link_invitation_service_services_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/product_link_service.rb create mode 100644 lib/google/ads/google_ads/v25/services/product_link_service/client.rb create mode 100644 lib/google/ads/google_ads/v25/services/product_link_service/credentials.rb create mode 100644 lib/google/ads/google_ads/v25/services/product_link_service/paths.rb create mode 100644 lib/google/ads/google_ads/v25/services/product_link_service_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/product_link_service_services_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/reach_plan_service.rb create mode 100644 lib/google/ads/google_ads/v25/services/reach_plan_service/client.rb create mode 100644 lib/google/ads/google_ads/v25/services/reach_plan_service/credentials.rb create mode 100644 lib/google/ads/google_ads/v25/services/reach_plan_service_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/reach_plan_service_services_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/recommendation_service.rb create mode 100644 lib/google/ads/google_ads/v25/services/recommendation_service/client.rb create mode 100644 lib/google/ads/google_ads/v25/services/recommendation_service/credentials.rb create mode 100644 lib/google/ads/google_ads/v25/services/recommendation_service/paths.rb create mode 100644 lib/google/ads/google_ads/v25/services/recommendation_service_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/recommendation_service_services_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/recommendation_subscription_service.rb create mode 100644 lib/google/ads/google_ads/v25/services/recommendation_subscription_service/client.rb create mode 100644 lib/google/ads/google_ads/v25/services/recommendation_subscription_service/credentials.rb create mode 100644 lib/google/ads/google_ads/v25/services/recommendation_subscription_service/paths.rb create mode 100644 lib/google/ads/google_ads/v25/services/recommendation_subscription_service_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/recommendation_subscription_service_services_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/remarketing_action_service.rb create mode 100644 lib/google/ads/google_ads/v25/services/remarketing_action_service/client.rb create mode 100644 lib/google/ads/google_ads/v25/services/remarketing_action_service/credentials.rb create mode 100644 lib/google/ads/google_ads/v25/services/remarketing_action_service/paths.rb create mode 100644 lib/google/ads/google_ads/v25/services/remarketing_action_service_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/remarketing_action_service_services_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/reservation_service.rb create mode 100644 lib/google/ads/google_ads/v25/services/reservation_service/client.rb create mode 100644 lib/google/ads/google_ads/v25/services/reservation_service/credentials.rb create mode 100644 lib/google/ads/google_ads/v25/services/reservation_service_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/reservation_service_services_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/shareable_preview_service.rb create mode 100644 lib/google/ads/google_ads/v25/services/shareable_preview_service/client.rb create mode 100644 lib/google/ads/google_ads/v25/services/shareable_preview_service/credentials.rb create mode 100644 lib/google/ads/google_ads/v25/services/shareable_preview_service_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/shareable_preview_service_services_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/shared_criterion_service.rb create mode 100644 lib/google/ads/google_ads/v25/services/shared_criterion_service/client.rb create mode 100644 lib/google/ads/google_ads/v25/services/shared_criterion_service/credentials.rb create mode 100644 lib/google/ads/google_ads/v25/services/shared_criterion_service/paths.rb create mode 100644 lib/google/ads/google_ads/v25/services/shared_criterion_service_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/shared_criterion_service_services_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/shared_set_service.rb create mode 100644 lib/google/ads/google_ads/v25/services/shared_set_service/client.rb create mode 100644 lib/google/ads/google_ads/v25/services/shared_set_service/credentials.rb create mode 100644 lib/google/ads/google_ads/v25/services/shared_set_service/paths.rb create mode 100644 lib/google/ads/google_ads/v25/services/shared_set_service_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/shared_set_service_services_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/smart_campaign_setting_service.rb create mode 100644 lib/google/ads/google_ads/v25/services/smart_campaign_setting_service/client.rb create mode 100644 lib/google/ads/google_ads/v25/services/smart_campaign_setting_service/credentials.rb create mode 100644 lib/google/ads/google_ads/v25/services/smart_campaign_setting_service/paths.rb create mode 100644 lib/google/ads/google_ads/v25/services/smart_campaign_setting_service_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/smart_campaign_setting_service_services_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/smart_campaign_suggest_service.rb create mode 100644 lib/google/ads/google_ads/v25/services/smart_campaign_suggest_service/client.rb create mode 100644 lib/google/ads/google_ads/v25/services/smart_campaign_suggest_service/credentials.rb create mode 100644 lib/google/ads/google_ads/v25/services/smart_campaign_suggest_service/paths.rb create mode 100644 lib/google/ads/google_ads/v25/services/smart_campaign_suggest_service_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/smart_campaign_suggest_service_services_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/third_party_app_analytics_link_service.rb create mode 100644 lib/google/ads/google_ads/v25/services/third_party_app_analytics_link_service/client.rb create mode 100644 lib/google/ads/google_ads/v25/services/third_party_app_analytics_link_service/credentials.rb create mode 100644 lib/google/ads/google_ads/v25/services/third_party_app_analytics_link_service/paths.rb create mode 100644 lib/google/ads/google_ads/v25/services/third_party_app_analytics_link_service_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/third_party_app_analytics_link_service_services_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/travel_asset_suggestion_service.rb create mode 100644 lib/google/ads/google_ads/v25/services/travel_asset_suggestion_service/client.rb create mode 100644 lib/google/ads/google_ads/v25/services/travel_asset_suggestion_service/credentials.rb create mode 100644 lib/google/ads/google_ads/v25/services/travel_asset_suggestion_service_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/travel_asset_suggestion_service_services_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/user_data_service.rb create mode 100644 lib/google/ads/google_ads/v25/services/user_data_service/client.rb create mode 100644 lib/google/ads/google_ads/v25/services/user_data_service/credentials.rb create mode 100644 lib/google/ads/google_ads/v25/services/user_data_service_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/user_data_service_services_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/user_list_customer_type_service.rb create mode 100644 lib/google/ads/google_ads/v25/services/user_list_customer_type_service/client.rb create mode 100644 lib/google/ads/google_ads/v25/services/user_list_customer_type_service/credentials.rb create mode 100644 lib/google/ads/google_ads/v25/services/user_list_customer_type_service/paths.rb create mode 100644 lib/google/ads/google_ads/v25/services/user_list_customer_type_service_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/user_list_customer_type_service_services_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/user_list_service.rb create mode 100644 lib/google/ads/google_ads/v25/services/user_list_service/client.rb create mode 100644 lib/google/ads/google_ads/v25/services/user_list_service/credentials.rb create mode 100644 lib/google/ads/google_ads/v25/services/user_list_service/paths.rb create mode 100644 lib/google/ads/google_ads/v25/services/user_list_service_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/user_list_service_services_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/you_tube_video_upload_service.rb create mode 100644 lib/google/ads/google_ads/v25/services/you_tube_video_upload_service/client.rb create mode 100644 lib/google/ads/google_ads/v25/services/you_tube_video_upload_service/credentials.rb create mode 100644 lib/google/ads/google_ads/v25/services/you_tube_video_upload_service/paths.rb create mode 100644 lib/google/ads/google_ads/v25/services/youtube_video_upload_service_pb.rb create mode 100644 lib/google/ads/google_ads/v25/services/youtube_video_upload_service_services_pb.rb diff --git a/CHANGELOG.md b/CHANGELOG.md index baa7fd9d2..66dfc3f44 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +43.0.0 +----- +- Compatibility with v25.0 of the API: https://developers.google.com/google-ads/api/docs/release-notes + 42.0.0 ----- - Compatibility with v24.2, v23.3, v22.2, v21.2 of the API: https://developers.google.com/google-ads/api/docs/release-notes diff --git a/lib/google/ads/google_ads/api_versions.rb b/lib/google/ads/google_ads/api_versions.rb index d7781a1e3..e92597386 100644 --- a/lib/google/ads/google_ads/api_versions.rb +++ b/lib/google/ads/google_ads/api_versions.rb @@ -1,8 +1,8 @@ module Google module Ads module GoogleAds - KNOWN_API_VERSIONS = [:V21, :V22, :V23, :V24] - DEFAULT_API_VERSION = :V24 + KNOWN_API_VERSIONS = [:V21, :V22, :V23, :V24, :V25] + DEFAULT_API_VERSION = :V25 def self.default_api_version DEFAULT_API_VERSION diff --git a/lib/google/ads/google_ads/interceptors/logging_interceptor.rb b/lib/google/ads/google_ads/interceptors/logging_interceptor.rb index eb70cc1d7..179d40b4a 100644 --- a/lib/google/ads/google_ads/interceptors/logging_interceptor.rb +++ b/lib/google/ads/google_ads/interceptors/logging_interceptor.rb @@ -38,6 +38,7 @@ class LoggingInterceptor < GRPC::ClientInterceptor customer_user_access_invitation.email_address| change_event.user_email| local_services_lead.contact_details.phone_number| + local_services_lead.contact_details.phone_number_extension| local_services_lead.contact_details.email| local_services_lead.contact_details.consumer_name| local_services_lead_conversation.message_details.text @@ -269,6 +270,9 @@ def sanitize_local_services_lead(message) if message["contactDetails"].include?("phoneNumber") message["contactDetails"]["phoneNumber"] = MASK_REPLACEMENT end + if message["contactDetails"].include?("phoneNumberExtension") + message["contactDetails"]["phoneNumberExtension"] = MASK_REPLACEMENT + end if message["contactDetails"].include?("consumerName") message["contactDetails"]["consumerName"] = MASK_REPLACEMENT end diff --git a/lib/google/ads/google_ads/utils/v25/path_lookup_util.rb b/lib/google/ads/google_ads/utils/v25/path_lookup_util.rb new file mode 100644 index 000000000..fdc43a00e --- /dev/null +++ b/lib/google/ads/google_ads/utils/v25/path_lookup_util.rb @@ -0,0 +1,31 @@ +# Encoding: utf-8 +# +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Utility that generates up resource names for entities given IDs. + +require "google/ads/google_ads/utils/build_path_lookup_class" + +module Google + module Ads + module GoogleAds + module Utils + module V25 + PathLookupUtil = Utils.build_path_lookup_class(:v25) + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/actions/book_campaigns_pb.rb b/lib/google/ads/google_ads/v25/actions/book_campaigns_pb.rb new file mode 100644 index 000000000..e78b666e4 --- /dev/null +++ b/lib/google/ads/google_ads/v25/actions/book_campaigns_pb.rb @@ -0,0 +1,27 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/actions/book_campaigns.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/enums/reservation_request_type_pb' + + +descriptor_data = "\n5google/ads/googleads/v25/actions/book_campaigns.proto\x12 google.ads.googleads.v25.actions\x1a=google/ads/googleads/v25/enums/reservation_request_type.proto\"\x8f\x02\n\x16\x42ookCampaignsOperation\x12T\n\tcampaigns\x18\x01 \x03(\x0b\x32\x41.google.ads.googleads.v25.actions.BookCampaignsOperation.Campaign\x12\x17\n\x0fquote_signature\x18\x02 \x01(\t\x1a\x85\x01\n\x08\x43\x61mpaign\x12\x10\n\x08\x63\x61mpaign\x18\x01 \x01(\t\x12g\n\x0crequest_type\x18\x02 \x01(\x0e\x32Q.google.ads.googleads.v25.enums.ReservationRequestTypeEnum.ReservationRequestType\"\x15\n\x13\x42ookCampaignsResultB\xf8\x01\n$com.google.ads.googleads.v25.actionsB\x12\x42ookCampaignsProtoP\x01ZGgoogle.golang.org/genproto/googleapis/ads/googleads/v25/actions;actions\xa2\x02\x03GAA\xaa\x02 Google.Ads.GoogleAds.V25.Actions\xca\x02 Google\\Ads\\GoogleAds\\V25\\Actions\xea\x02$Google::Ads::GoogleAds::V25::Actionsb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Actions + BookCampaignsOperation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.actions.BookCampaignsOperation").msgclass + BookCampaignsOperation::Campaign = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.actions.BookCampaignsOperation.Campaign").msgclass + BookCampaignsResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.actions.BookCampaignsResult").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/actions/generate_shareable_previews_pb.rb b/lib/google/ads/google_ads/v25/actions/generate_shareable_previews_pb.rb new file mode 100644 index 000000000..6d85e6b7f --- /dev/null +++ b/lib/google/ads/google_ads/v25/actions/generate_shareable_previews_pb.rb @@ -0,0 +1,31 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/actions/generate_shareable_previews.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/enums/preview_type_pb' +require 'google/api/field_behavior_pb' + + +descriptor_data = "\nBgoogle/ads/googleads/v25/actions/generate_shareable_previews.proto\x12 google.ads.googleads.v25.actions\x1a\x31google/ads/googleads/v25/enums/preview_type.proto\x1a\x1fgoogle/api/field_behavior.proto\"y\n\"GenerateShareablePreviewsOperation\x12S\n\x12shareable_previews\x18\x01 \x03(\x0b\x32\x32.google.ads.googleads.v25.actions.ShareablePreviewB\x03\xe0\x41\x02\"\xa6\x01\n\x10ShareablePreview\x12V\n\x0cpreview_type\x18\x01 \x01(\x0e\x32;.google.ads.googleads.v25.enums.PreviewTypeEnum.PreviewTypeB\x03\xe0\x41\x02\x12\x15\n\x0b\x61\x64_group_ad\x18\x02 \x01(\tH\x00\x12\x15\n\x0b\x61sset_group\x18\x03 \x01(\tH\x00\x42\x0c\n\nidentifier\"m\n\x1fGenerateShareablePreviewsResult\x12J\n\x08previews\x18\x01 \x03(\x0b\x32\x38.google.ads.googleads.v25.actions.ShareablePreviewResult\"\xaf\x02\n\x16ShareablePreviewResult\x12\x1c\n\x14\x65xpiration_date_time\x18\x03 \x01(\t\x12N\n\x11ui_preview_result\x18\x01 \x01(\x0b\x32\x31.google.ads.googleads.v25.actions.UiPreviewResultH\x00\x12\x61\n\x1byoutube_live_preview_result\x18\x02 \x01(\x0b\x32:.google.ads.googleads.v25.actions.YouTubeLivePreviewResultH\x00\x12\x15\n\x0b\x61\x64_group_ad\x18\x04 \x01(\tH\x01\x12\x15\n\x0b\x61sset_group\x18\x05 \x01(\tH\x01\x42\x08\n\x06resultB\x0c\n\nidentifier\"0\n\x0fUiPreviewResult\x12\x1d\n\x15shareable_preview_url\x18\x01 \x01(\t\"W\n\x18YouTubeLivePreviewResult\x12\x1b\n\x13youtube_preview_url\x18\x01 \x01(\t\x12\x1e\n\x16youtube_tv_preview_url\x18\x02 \x01(\tB\x84\x02\n$com.google.ads.googleads.v25.actionsB\x1eGenerateShareablePreviewsProtoP\x01ZGgoogle.golang.org/genproto/googleapis/ads/googleads/v25/actions;actions\xa2\x02\x03GAA\xaa\x02 Google.Ads.GoogleAds.V25.Actions\xca\x02 Google\\Ads\\GoogleAds\\V25\\Actions\xea\x02$Google::Ads::GoogleAds::V25::Actionsb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Actions + GenerateShareablePreviewsOperation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.actions.GenerateShareablePreviewsOperation").msgclass + ShareablePreview = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.actions.ShareablePreview").msgclass + GenerateShareablePreviewsResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.actions.GenerateShareablePreviewsResult").msgclass + ShareablePreviewResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.actions.ShareablePreviewResult").msgclass + UiPreviewResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.actions.UiPreviewResult").msgclass + YouTubeLivePreviewResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.actions.YouTubeLivePreviewResult").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/actions/quote_campaigns_pb.rb b/lib/google/ads/google_ads/v25/actions/quote_campaigns_pb.rb new file mode 100644 index 000000000..f888ad476 --- /dev/null +++ b/lib/google/ads/google_ads/v25/actions/quote_campaigns_pb.rb @@ -0,0 +1,27 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/actions/quote_campaigns.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/common/campaign_reservation_quote_pb' + + +descriptor_data = "\n6google/ads/googleads/v25/actions/quote_campaigns.proto\x12 google.ads.googleads.v25.actions\x1a@google/ads/googleads/v25/common/campaign_reservation_quote.proto\"\xa7\x01\n\x17QuoteCampaignsOperation\x12U\n\tcampaigns\x18\x01 \x03(\x0b\x32\x42.google.ads.googleads.v25.actions.QuoteCampaignsOperation.Campaign\x12\x17\n\x0fquote_signature\x18\x02 \x01(\t\x1a\x1c\n\x08\x43\x61mpaign\x12\x10\n\x08\x63\x61mpaign\x18\x01 \x01(\t\"z\n\x14QuoteCampaignsResult\x12I\n\x06quotes\x18\x01 \x03(\x0b\x32\x39.google.ads.googleads.v25.common.CampaignReservationQuote\x12\x17\n\x0fquote_signature\x18\x02 \x01(\tB\xf9\x01\n$com.google.ads.googleads.v25.actionsB\x13QuoteCampaignsProtoP\x01ZGgoogle.golang.org/genproto/googleapis/ads/googleads/v25/actions;actions\xa2\x02\x03GAA\xaa\x02 Google.Ads.GoogleAds.V25.Actions\xca\x02 Google\\Ads\\GoogleAds\\V25\\Actions\xea\x02$Google::Ads::GoogleAds::V25::Actionsb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Actions + QuoteCampaignsOperation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.actions.QuoteCampaignsOperation").msgclass + QuoteCampaignsOperation::Campaign = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.actions.QuoteCampaignsOperation.Campaign").msgclass + QuoteCampaignsResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.actions.QuoteCampaignsResult").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/common/ad_asset_pb.rb b/lib/google/ads/google_ads/v25/common/ad_asset_pb.rb new file mode 100644 index 000000000..1ae42f465 --- /dev/null +++ b/lib/google/ads/google_ads/v25/common/ad_asset_pb.rb @@ -0,0 +1,36 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/common/ad_asset.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/common/asset_policy_pb' +require 'google/ads/google_ads/v25/enums/asset_performance_label_pb' +require 'google/ads/google_ads/v25/enums/served_asset_field_type_pb' + + +descriptor_data = "\n.google/ads/googleads/v25/common/ad_asset.proto\x12\x1fgoogle.ads.googleads.v25.common\x1a\x32google/ads/googleads/v25/common/asset_policy.proto\x1a\n\x06\x66ields\x18\x08 \x03(\x0b\x32..google.ads.googleads.v25.common.LeadFormField\x12\\\n\x16\x63ustom_question_fields\x18\x17 \x03(\x0b\x32<.google.ads.googleads.v25.common.LeadFormCustomQuestionField\x12Q\n\x10\x64\x65livery_methods\x18\t \x03(\x0b\x32\x37.google.ads.googleads.v25.common.LeadFormDeliveryMethod\x12\x92\x01\n\x1fpost_submit_call_to_action_type\x18\x13 \x01(\x0e\x32i.google.ads.googleads.v25.enums.LeadFormPostSubmitCallToActionTypeEnum.LeadFormPostSubmitCallToActionType\x12#\n\x16\x62\x61\x63kground_image_asset\x18\x14 \x01(\tH\x02\x88\x01\x01\x12g\n\x0e\x64\x65sired_intent\x18\x15 \x01(\x0e\x32O.google.ads.googleads.v25.enums.LeadFormDesiredIntentEnum.LeadFormDesiredIntent\x12\x1e\n\x11\x63ustom_disclosure\x18\x16 \x01(\tH\x03\x88\x01\x01\x42\x17\n\x15_post_submit_headlineB\x1a\n\x18_post_submit_descriptionB\x19\n\x17_background_image_assetB\x14\n\x12_custom_disclosure\"\x87\x02\n\rLeadFormField\x12m\n\ninput_type\x18\x01 \x01(\x0e\x32Y.google.ads.googleads.v25.enums.LeadFormFieldUserInputTypeEnum.LeadFormFieldUserInputType\x12]\n\x15single_choice_answers\x18\x02 \x01(\x0b\x32<.google.ads.googleads.v25.common.LeadFormSingleChoiceAnswersH\x00\x12\x1d\n\x13has_location_answer\x18\x03 \x01(\x08H\x00\x42\t\n\x07\x61nswers\"\xc4\x01\n\x1bLeadFormCustomQuestionField\x12\x1c\n\x14\x63ustom_question_text\x18\x01 \x01(\t\x12]\n\x15single_choice_answers\x18\x02 \x01(\x0b\x32<.google.ads.googleads.v25.common.LeadFormSingleChoiceAnswersH\x00\x12\x1d\n\x13has_location_answer\x18\x03 \x01(\x08H\x00\x42\t\n\x07\x61nswers\".\n\x1bLeadFormSingleChoiceAnswers\x12\x0f\n\x07\x61nswers\x18\x01 \x03(\t\"q\n\x16LeadFormDeliveryMethod\x12\x43\n\x07webhook\x18\x01 \x01(\x0b\x32\x30.google.ads.googleads.v25.common.WebhookDeliveryH\x00\x42\x12\n\x10\x64\x65livery_details\"\xbf\x01\n\x0fWebhookDelivery\x12#\n\x16\x61\x64vertiser_webhook_url\x18\x04 \x01(\tH\x00\x88\x01\x01\x12\x1a\n\rgoogle_secret\x18\x05 \x01(\tH\x01\x88\x01\x01\x12#\n\x16payload_schema_version\x18\x06 \x01(\x03H\x02\x88\x01\x01\x42\x19\n\x17_advertiser_webhook_urlB\x10\n\x0e_google_secretB\x19\n\x17_payload_schema_version\"\x13\n\x11\x42ookOnGoogleAsset\"\xc1\x07\n\x0ePromotionAsset\x12\x1d\n\x10promotion_target\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x84\x01\n\x11\x64iscount_modifier\x18\x02 \x01(\x0e\x32i.google.ads.googleads.v25.enums.PromotionExtensionDiscountModifierEnum.PromotionExtensionDiscountModifier\x12\x1d\n\x15redemption_start_date\x18\x07 \x01(\t\x12\x1b\n\x13redemption_end_date\x18\x08 \x01(\t\x12k\n\x08occasion\x18\t \x01(\x0e\x32Y.google.ads.googleads.v25.enums.PromotionExtensionOccasionEnum.PromotionExtensionOccasion\x12\x15\n\rlanguage_code\x18\n \x01(\t\x12\x12\n\nstart_date\x18\x0b \x01(\t\x12\x10\n\x08\x65nd_date\x18\x0c \x01(\t\x12L\n\x13\x61\x64_schedule_targets\x18\r \x03(\x0b\x32/.google.ads.googleads.v25.common.AdScheduleInfo\x12!\n\x19terms_and_conditions_text\x18\x0e \x01(\t\x12 \n\x18terms_and_conditions_uri\x18\x0f \x01(\t\x12\x15\n\x0bpercent_off\x18\x03 \x01(\x03H\x00\x12\x42\n\x10money_amount_off\x18\x04 \x01(\x0b\x32&.google.ads.googleads.v25.common.MoneyH\x00\x12\x18\n\x0epromotion_code\x18\x05 \x01(\tH\x01\x12\x44\n\x12orders_over_amount\x18\x06 \x01(\x0b\x32&.google.ads.googleads.v25.common.MoneyH\x01\x12W\n\x16promotion_barcode_info\x18\x10 \x01(\x0b\x32\x35.google.ads.googleads.v25.common.PromotionBarcodeInfoH\x01\x12V\n\x16promotion_qr_code_info\x18\x11 \x01(\x0b\x32\x34.google.ads.googleads.v25.common.PromotionQrCodeInfoH\x01\x42\x0f\n\rdiscount_typeB\x13\n\x11promotion_trigger\"\x8c\x01\n\x14PromotionBarcodeInfo\x12[\n\x04type\x18\x01 \x01(\x0e\x32M.google.ads.googleads.v25.enums.PromotionBarcodeTypeEnum.PromotionBarcodeType\x12\x17\n\x0f\x62\x61rcode_content\x18\x02 \x01(\t\".\n\x13PromotionQrCodeInfo\x12\x17\n\x0fqr_code_content\x18\x01 \x01(\t\"\x9d\x01\n\x0c\x43\x61lloutAsset\x12\x19\n\x0c\x63\x61llout_text\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x12\n\nstart_date\x18\x02 \x01(\t\x12\x10\n\x08\x65nd_date\x18\x03 \x01(\t\x12L\n\x13\x61\x64_schedule_targets\x18\x04 \x03(\x0b\x32/.google.ads.googleads.v25.common.AdScheduleInfo\"B\n\x16StructuredSnippetAsset\x12\x13\n\x06header\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x13\n\x06values\x18\x02 \x03(\tB\x03\xe0\x41\x02\"\xc7\x01\n\rSitelinkAsset\x12\x16\n\tlink_text\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x14\n\x0c\x64\x65scription1\x18\x02 \x01(\t\x12\x14\n\x0c\x64\x65scription2\x18\x03 \x01(\t\x12\x12\n\nstart_date\x18\x04 \x01(\t\x12\x10\n\x08\x65nd_date\x18\x05 \x01(\t\x12L\n\x13\x61\x64_schedule_targets\x18\x06 \x03(\x0b\x32/.google.ads.googleads.v25.common.AdScheduleInfo\"6\n\rPageFeedAsset\x12\x15\n\x08page_url\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x0e\n\x06labels\x18\x02 \x03(\t\"\xe8\x02\n\x15\x44ynamicEducationAsset\x12\x17\n\nprogram_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x13\n\x0blocation_id\x18\x02 \x01(\t\x12\x19\n\x0cprogram_name\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x0f\n\x07subject\x18\x04 \x01(\t\x12\x1b\n\x13program_description\x18\x05 \x01(\t\x12\x13\n\x0bschool_name\x18\x06 \x01(\t\x12\x0f\n\x07\x61\x64\x64ress\x18\x07 \x01(\t\x12\x1b\n\x13\x63ontextual_keywords\x18\x08 \x03(\t\x12\x18\n\x10\x61ndroid_app_link\x18\t \x01(\t\x12\x1b\n\x13similar_program_ids\x18\n \x03(\t\x12\x14\n\x0cios_app_link\x18\x0b \x01(\t\x12\x18\n\x10ios_app_store_id\x18\x0c \x01(\x03\x12\x1b\n\x13thumbnail_image_url\x18\r \x01(\t\x12\x11\n\timage_url\x18\x0e \x01(\t\"\xc0\x01\n\x0eMobileAppAsset\x12\x13\n\x06\x61pp_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12[\n\tapp_store\x18\x02 \x01(\x0e\x32\x43.google.ads.googleads.v25.enums.MobileAppVendorEnum.MobileAppVendorB\x03\xe0\x41\x02\x12\x16\n\tlink_text\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x12\n\nstart_date\x18\x04 \x01(\t\x12\x10\n\x08\x65nd_date\x18\x05 \x01(\t\"B\n\x11HotelCalloutAsset\x12\x11\n\x04text\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x1a\n\rlanguage_code\x18\x02 \x01(\tB\x03\xe0\x41\x02\"\xe8\x02\n\tCallAsset\x12\x19\n\x0c\x63ountry_code\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x19\n\x0cphone_number\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x86\x01\n\x1f\x63\x61ll_conversion_reporting_state\x18\x03 \x01(\x0e\x32].google.ads.googleads.v25.enums.CallConversionReportingStateEnum.CallConversionReportingState\x12N\n\x16\x63\x61ll_conversion_action\x18\x04 \x01(\tB.\xfa\x41+\n)googleads.googleapis.com/ConversionAction\x12L\n\x13\x61\x64_schedule_targets\x18\x05 \x03(\x0b\x32/.google.ads.googleads.v25.common.AdScheduleInfo\"\xc7\x02\n\nPriceAsset\x12\\\n\x04type\x18\x01 \x01(\x0e\x32I.google.ads.googleads.v25.enums.PriceExtensionTypeEnum.PriceExtensionTypeB\x03\xe0\x41\x02\x12v\n\x0fprice_qualifier\x18\x02 \x01(\x0e\x32].google.ads.googleads.v25.enums.PriceExtensionPriceQualifierEnum.PriceExtensionPriceQualifier\x12\x1a\n\rlanguage_code\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12G\n\x0fprice_offerings\x18\x04 \x03(\x0b\x32..google.ads.googleads.v25.common.PriceOffering\"\x8f\x02\n\rPriceOffering\x12\x13\n\x06header\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x0b\x64\x65scription\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12:\n\x05price\x18\x03 \x01(\x0b\x32&.google.ads.googleads.v25.common.MoneyB\x03\xe0\x41\x02\x12\x61\n\x04unit\x18\x04 \x01(\x0e\x32S.google.ads.googleads.v25.enums.PriceExtensionPriceUnitEnum.PriceExtensionPriceUnit\x12\x16\n\tfinal_url\x18\x05 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x10\x66inal_mobile_url\x18\x06 \x01(\t\"r\n\x11\x43\x61llToActionAsset\x12]\n\x0e\x63\x61ll_to_action\x18\x01 \x01(\x0e\x32\x45.google.ads.googleads.v25.enums.CallToActionTypeEnum.CallToActionType\"\xf1\x02\n\x16\x44ynamicRealEstateAsset\x12\x17\n\nlisting_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x19\n\x0clisting_name\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x11\n\tcity_name\x18\x03 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x04 \x01(\t\x12\x0f\n\x07\x61\x64\x64ress\x18\x05 \x01(\t\x12\r\n\x05price\x18\x06 \x01(\t\x12\x11\n\timage_url\x18\x07 \x01(\t\x12\x15\n\rproperty_type\x18\x08 \x01(\t\x12\x14\n\x0clisting_type\x18\t \x01(\t\x12\x1b\n\x13\x63ontextual_keywords\x18\n \x03(\t\x12\x17\n\x0f\x66ormatted_price\x18\x0b \x01(\t\x12\x18\n\x10\x61ndroid_app_link\x18\x0c \x01(\t\x12\x14\n\x0cios_app_link\x18\r \x01(\t\x12\x18\n\x10ios_app_store_id\x18\x0e \x01(\x03\x12\x1b\n\x13similar_listing_ids\x18\x0f \x03(\t\"\x92\x03\n\x12\x44ynamicCustomAsset\x12\x0f\n\x02id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x0b\n\x03id2\x18\x02 \x01(\t\x12\x17\n\nitem_title\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x15\n\ritem_subtitle\x18\x04 \x01(\t\x12\x18\n\x10item_description\x18\x05 \x01(\t\x12\x14\n\x0citem_address\x18\x06 \x01(\t\x12\x15\n\ritem_category\x18\x07 \x01(\t\x12\r\n\x05price\x18\x08 \x01(\t\x12\x12\n\nsale_price\x18\t \x01(\t\x12\x17\n\x0f\x66ormatted_price\x18\n \x01(\t\x12\x1c\n\x14\x66ormatted_sale_price\x18\x0b \x01(\t\x12\x11\n\timage_url\x18\x0c \x01(\t\x12\x1b\n\x13\x63ontextual_keywords\x18\r \x03(\t\x12\x18\n\x10\x61ndroid_app_link\x18\x0e \x01(\t\x12\x14\n\x0cios_app_link\x18\x10 \x01(\t\x12\x18\n\x10ios_app_store_id\x18\x11 \x01(\x03\x12\x13\n\x0bsimilar_ids\x18\x0f \x03(\t\"\xad\x03\n\x1c\x44ynamicHotelsAndRentalsAsset\x12\x18\n\x0bproperty_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x1a\n\rproperty_name\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x11\n\timage_url\x18\x03 \x01(\t\x12\x18\n\x10\x64\x65stination_name\x18\x04 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x05 \x01(\t\x12\r\n\x05price\x18\x06 \x01(\t\x12\x12\n\nsale_price\x18\x07 \x01(\t\x12\x13\n\x0bstar_rating\x18\x08 \x01(\x03\x12\x10\n\x08\x63\x61tegory\x18\t \x01(\t\x12\x1b\n\x13\x63ontextual_keywords\x18\n \x03(\t\x12\x0f\n\x07\x61\x64\x64ress\x18\x0b \x01(\t\x12\x18\n\x10\x61ndroid_app_link\x18\x0c \x01(\t\x12\x14\n\x0cios_app_link\x18\r \x01(\t\x12\x18\n\x10ios_app_store_id\x18\x0e \x01(\x03\x12\x17\n\x0f\x66ormatted_price\x18\x0f \x01(\t\x12\x1c\n\x14\x66ormatted_sale_price\x18\x10 \x01(\t\x12\x1c\n\x14similar_property_ids\x18\x11 \x03(\t\"\x93\x03\n\x13\x44ynamicFlightsAsset\x12\x1b\n\x0e\x64\x65stination_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x11\n\torigin_id\x18\x02 \x01(\t\x12\x1f\n\x12\x66light_description\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x11\n\timage_url\x18\x04 \x01(\t\x12\x18\n\x10\x64\x65stination_name\x18\x05 \x01(\t\x12\x13\n\x0borigin_name\x18\x06 \x01(\t\x12\x14\n\x0c\x66light_price\x18\x07 \x01(\t\x12\x19\n\x11\x66light_sale_price\x18\x08 \x01(\t\x12\x17\n\x0f\x66ormatted_price\x18\t \x01(\t\x12\x1c\n\x14\x66ormatted_sale_price\x18\n \x01(\t\x12\x18\n\x10\x61ndroid_app_link\x18\x0b \x01(\t\x12\x14\n\x0cios_app_link\x18\x0c \x01(\t\x12\x18\n\x10ios_app_store_id\x18\r \x01(\x03\x12\x1f\n\x17similar_destination_ids\x18\x0e \x03(\t\x12\x16\n\x0e\x63ustom_mapping\x18\x0f \x01(\t\"\xbd\x01\n\x1a\x44\x65mandGenCarouselCardAsset\x12\x1d\n\x15marketing_image_asset\x18\x01 \x01(\t\x12$\n\x1csquare_marketing_image_asset\x18\x02 \x01(\t\x12&\n\x1eportrait_marketing_image_asset\x18\x03 \x01(\t\x12\x15\n\x08headline\x18\x04 \x01(\tB\x03\xe0\x41\x02\x12\x1b\n\x13\x63\x61ll_to_action_text\x18\x05 \x01(\t\"\xab\x03\n\x12\x44ynamicTravelAsset\x12\x1b\n\x0e\x64\x65stination_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x11\n\torigin_id\x18\x02 \x01(\t\x12\x12\n\x05title\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x10\x64\x65stination_name\x18\x04 \x01(\t\x12\x1b\n\x13\x64\x65stination_address\x18\x05 \x01(\t\x12\x13\n\x0borigin_name\x18\x06 \x01(\t\x12\r\n\x05price\x18\x07 \x01(\t\x12\x12\n\nsale_price\x18\x08 \x01(\t\x12\x17\n\x0f\x66ormatted_price\x18\t \x01(\t\x12\x1c\n\x14\x66ormatted_sale_price\x18\n \x01(\t\x12\x10\n\x08\x63\x61tegory\x18\x0b \x01(\t\x12\x1b\n\x13\x63ontextual_keywords\x18\x0c \x03(\t\x12\x1f\n\x17similar_destination_ids\x18\r \x03(\t\x12\x11\n\timage_url\x18\x0e \x01(\t\x12\x18\n\x10\x61ndroid_app_link\x18\x0f \x01(\t\x12\x14\n\x0cios_app_link\x18\x10 \x01(\t\x12\x18\n\x10ios_app_store_id\x18\x11 \x01(\x03\"\xf9\x02\n\x11\x44ynamicLocalAsset\x12\x14\n\x07\x64\x65\x61l_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x16\n\tdeal_name\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x10\n\x08subtitle\x18\x03 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x04 \x01(\t\x12\r\n\x05price\x18\x05 \x01(\t\x12\x12\n\nsale_price\x18\x06 \x01(\t\x12\x11\n\timage_url\x18\x07 \x01(\t\x12\x0f\n\x07\x61\x64\x64ress\x18\x08 \x01(\t\x12\x10\n\x08\x63\x61tegory\x18\t \x01(\t\x12\x1b\n\x13\x63ontextual_keywords\x18\n \x03(\t\x12\x17\n\x0f\x66ormatted_price\x18\x0b \x01(\t\x12\x1c\n\x14\x66ormatted_sale_price\x18\x0c \x01(\t\x12\x18\n\x10\x61ndroid_app_link\x18\r \x01(\t\x12\x18\n\x10similar_deal_ids\x18\x0e \x03(\t\x12\x14\n\x0cios_app_link\x18\x0f \x01(\t\x12\x18\n\x10ios_app_store_id\x18\x10 \x01(\x03\"\xc9\x02\n\x10\x44ynamicJobsAsset\x12\x13\n\x06job_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x13\n\x0blocation_id\x18\x02 \x01(\t\x12\x16\n\tjob_title\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x14\n\x0cjob_subtitle\x18\x04 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x05 \x01(\t\x12\x11\n\timage_url\x18\x06 \x01(\t\x12\x14\n\x0cjob_category\x18\x07 \x01(\t\x12\x1b\n\x13\x63ontextual_keywords\x18\x08 \x03(\t\x12\x0f\n\x07\x61\x64\x64ress\x18\t \x01(\t\x12\x0e\n\x06salary\x18\n \x01(\t\x12\x18\n\x10\x61ndroid_app_link\x18\x0b \x01(\t\x12\x17\n\x0fsimilar_job_ids\x18\x0c \x03(\t\x12\x14\n\x0cios_app_link\x18\r \x01(\t\x12\x18\n\x10ios_app_store_id\x18\x0e \x01(\x03\"\xf1\x01\n\rLocationAsset\x12\x10\n\x08place_id\x18\x01 \x01(\t\x12\\\n\x1a\x62usiness_profile_locations\x18\x02 \x03(\x0b\x32\x38.google.ads.googleads.v25.common.BusinessProfileLocation\x12p\n\x17location_ownership_type\x18\x03 \x01(\x0e\x32O.google.ads.googleads.v25.enums.LocationOwnershipTypeEnum.LocationOwnershipType\"Q\n\x17\x42usinessProfileLocation\x12\x0e\n\x06labels\x18\x01 \x03(\t\x12\x12\n\nstore_code\x18\x02 \x01(\t\x12\x12\n\nlisting_id\x18\x03 \x01(\x03\"Q\n\x12HotelPropertyAsset\x12\x10\n\x08place_id\x18\x01 \x01(\t\x12\x15\n\rhotel_address\x18\x02 \x01(\t\x12\x12\n\nhotel_name\x18\x03 \x01(\t\"\xc3\x04\n\x14\x42usinessMessageAsset\x12r\n\x10message_provider\x18\x01 \x01(\x0e\x32S.google.ads.googleads.v25.enums.BusinessMessageProviderEnum.BusinessMessageProviderB\x03\xe0\x41\x02\x12\x1c\n\x0fstarter_message\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12]\n\x0e\x63\x61ll_to_action\x18\x03 \x01(\x0b\x32@.google.ads.googleads.v25.common.BusinessMessageCallToActionInfoH\x01\x88\x01\x01\x12U\n\rwhatsapp_info\x18\x05 \x01(\x0b\x32<.google.ads.googleads.v25.common.WhatsappBusinessMessageInfoH\x00\x12h\n\x17\x66\x61\x63\x65\x62ook_messenger_info\x18\x06 \x01(\x0b\x32\x45.google.ads.googleads.v25.common.FacebookMessengerBusinessMessageInfoH\x00\x12M\n\tzalo_info\x18\x07 \x01(\x0b\x32\x38.google.ads.googleads.v25.common.ZaloBusinessMessageInfoH\x00\x42\x17\n\x15message_provider_dataB\x11\n\x0f_call_to_action\"S\n\x1bWhatsappBusinessMessageInfo\x12\x19\n\x0c\x63ountry_code\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x19\n\x0cphone_number\x18\x02 \x01(\tB\x03\xe0\x41\x02\">\n$FacebookMessengerBusinessMessageInfo\x12\x16\n\tpage_name\x18\x01 \x01(\tB\x03\xe0\x41\x02\"L\n\x17ZaloBusinessMessageInfo\x12\x0f\n\x05oa_id\x18\x01 \x01(\x03H\x00\x12\x15\n\x0b\x63ustom_name\x18\x02 \x01(\tH\x00\x42\t\n\x07zalo_id\"\xd7\x01\n\x1f\x42usinessMessageCallToActionInfo\x12\x8a\x01\n\x18\x63\x61ll_to_action_selection\x18\x01 \x01(\x0e\x32\x63.google.ads.googleads.v25.enums.BusinessMessageCallToActionTypeEnum.BusinessMessageCallToActionTypeB\x03\xe0\x41\x02\x12\'\n\x1a\x63\x61ll_to_action_description\x18\x02 \x01(\tB\x03\xe0\x41\x02\"-\n\x10\x41ppDeepLinkAsset\x12\x19\n\x11\x61pp_deep_link_uri\x18\x01 \x01(\t\"^\n\x15YouTubeVideoListAsset\x12\x45\n\x0eyoutube_videos\x18\x01 \x03(\x0b\x32-.google.ads.googleads.v25.common.AdVideoAssetB\xef\x01\n#com.google.ads.googleads.v25.commonB\x0f\x41ssetTypesProtoP\x01ZEgoogle.golang.org/genproto/googleapis/ads/googleads/v25/common;common\xa2\x02\x03GAA\xaa\x02\x1fGoogle.Ads.GoogleAds.V25.Common\xca\x02\x1fGoogle\\Ads\\GoogleAds\\V25\\Common\xea\x02#Google::Ads::GoogleAds::V25::Commonb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Common + YoutubeVideoAsset = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.YoutubeVideoAsset").msgclass + MediaBundleAsset = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.MediaBundleAsset").msgclass + ImageAsset = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.ImageAsset").msgclass + ImageDimension = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.ImageDimension").msgclass + TextAsset = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.TextAsset").msgclass + LeadFormAsset = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.LeadFormAsset").msgclass + LeadFormField = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.LeadFormField").msgclass + LeadFormCustomQuestionField = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.LeadFormCustomQuestionField").msgclass + LeadFormSingleChoiceAnswers = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.LeadFormSingleChoiceAnswers").msgclass + LeadFormDeliveryMethod = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.LeadFormDeliveryMethod").msgclass + WebhookDelivery = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.WebhookDelivery").msgclass + BookOnGoogleAsset = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.BookOnGoogleAsset").msgclass + PromotionAsset = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.PromotionAsset").msgclass + PromotionBarcodeInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.PromotionBarcodeInfo").msgclass + PromotionQrCodeInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.PromotionQrCodeInfo").msgclass + CalloutAsset = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.CalloutAsset").msgclass + StructuredSnippetAsset = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.StructuredSnippetAsset").msgclass + SitelinkAsset = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.SitelinkAsset").msgclass + PageFeedAsset = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.PageFeedAsset").msgclass + DynamicEducationAsset = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.DynamicEducationAsset").msgclass + MobileAppAsset = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.MobileAppAsset").msgclass + HotelCalloutAsset = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.HotelCalloutAsset").msgclass + CallAsset = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.CallAsset").msgclass + PriceAsset = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.PriceAsset").msgclass + PriceOffering = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.PriceOffering").msgclass + CallToActionAsset = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.CallToActionAsset").msgclass + DynamicRealEstateAsset = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.DynamicRealEstateAsset").msgclass + DynamicCustomAsset = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.DynamicCustomAsset").msgclass + DynamicHotelsAndRentalsAsset = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.DynamicHotelsAndRentalsAsset").msgclass + DynamicFlightsAsset = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.DynamicFlightsAsset").msgclass + DemandGenCarouselCardAsset = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.DemandGenCarouselCardAsset").msgclass + DynamicTravelAsset = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.DynamicTravelAsset").msgclass + DynamicLocalAsset = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.DynamicLocalAsset").msgclass + DynamicJobsAsset = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.DynamicJobsAsset").msgclass + LocationAsset = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.LocationAsset").msgclass + BusinessProfileLocation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.BusinessProfileLocation").msgclass + HotelPropertyAsset = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.HotelPropertyAsset").msgclass + BusinessMessageAsset = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.BusinessMessageAsset").msgclass + WhatsappBusinessMessageInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.WhatsappBusinessMessageInfo").msgclass + FacebookMessengerBusinessMessageInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.FacebookMessengerBusinessMessageInfo").msgclass + ZaloBusinessMessageInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.ZaloBusinessMessageInfo").msgclass + BusinessMessageCallToActionInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.BusinessMessageCallToActionInfo").msgclass + AppDeepLinkAsset = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.AppDeepLinkAsset").msgclass + YouTubeVideoListAsset = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.YouTubeVideoListAsset").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/common/asset_usage_pb.rb b/lib/google/ads/google_ads/v25/common/asset_usage_pb.rb new file mode 100644 index 000000000..ecf76f1f6 --- /dev/null +++ b/lib/google/ads/google_ads/v25/common/asset_usage_pb.rb @@ -0,0 +1,25 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/common/asset_usage.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/enums/served_asset_field_type_pb' + + +descriptor_data = "\n1google/ads/googleads/v25/common/asset_usage.proto\x12\x1fgoogle.ads.googleads.v25.common\x1a.google.ads.googleads.v25.common.YouTubeVideoAttributeMetadataH\x00\x12]\n\x19lineup_attribute_metadata\x18\x0e \x01(\x0b\x32\x38.google.ads.googleads.v25.common.LineupAttributeMetadataH\x00\x12\x61\n\x1blocation_attribute_metadata\x18\x07 \x01(\x0b\x32:.google.ads.googleads.v25.common.LocationAttributeMetadataH\x00\x12j\n user_interest_attribute_metadata\x18\x0b \x01(\x0b\x32>.google.ads.googleads.v25.common.UserInterestAttributeMetadataH\x00\x12n\n\"knowledge_graph_attribute_metadata\x18\x0c \x01(\x0b\x32@.google.ads.googleads.v25.common.KnowledgeGraphAttributeMetadataH\x00\x12\x62\n\x1cuser_list_attribute_metadata\x18\x0f \x01(\x0b\x32:.google.ads.googleads.v25.common.UserListAttributeMetadataH\x00\x42\x14\n\x12\x64imension_metadata\"\xd8\x07\n\x19\x41udienceInsightsAttribute\x12\x42\n\tage_range\x18\x01 \x01(\x0b\x32-.google.ads.googleads.v25.common.AgeRangeInfoH\x00\x12=\n\x06gender\x18\x02 \x01(\x0b\x32+.google.ads.googleads.v25.common.GenderInfoH\x00\x12\x41\n\x08location\x18\x03 \x01(\x0b\x32-.google.ads.googleads.v25.common.LocationInfoH\x00\x12J\n\ruser_interest\x18\x04 \x01(\x0b\x32\x31.google.ads.googleads.v25.common.UserInterestInfoH\x00\x12I\n\x06\x65ntity\x18\x05 \x01(\x0b\x32\x37.google.ads.googleads.v25.common.AudienceInsightsEntityH\x00\x12M\n\x08\x63\x61tegory\x18\x06 \x01(\x0b\x32\x39.google.ads.googleads.v25.common.AudienceInsightsCategoryH\x00\x12I\n\x06lineup\x18\r \x01(\x0b\x32\x37.google.ads.googleads.v25.common.AudienceInsightsLineupH\x00\x12N\n\x0fparental_status\x18\x08 \x01(\x0b\x32\x33.google.ads.googleads.v25.common.ParentalStatusInfoH\x00\x12H\n\x0cincome_range\x18\t \x01(\x0b\x32\x30.google.ads.googleads.v25.common.IncomeRangeInfoH\x00\x12N\n\x0fyoutube_channel\x18\n \x01(\x0b\x32\x33.google.ads.googleads.v25.common.YouTubeChannelInfoH\x00\x12J\n\ryoutube_video\x18\x0b \x01(\x0b\x32\x31.google.ads.googleads.v25.common.YouTubeVideoInfoH\x00\x12=\n\x06\x64\x65vice\x18\x0c \x01(\x0b\x32+.google.ads.googleads.v25.common.DeviceInfoH\x00\x12\x42\n\tuser_list\x18\x0e \x01(\x0b\x32-.google.ads.googleads.v25.common.UserListInfoH\x00\x42\x0b\n\tattribute\"A\n\x16\x41udienceInsightsEntity\x12\'\n\x1aknowledge_graph_machine_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\"4\n\x18\x41udienceInsightsCategory\x12\x18\n\x0b\x63\x61tegory_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\"0\n\x16\x41udienceInsightsLineup\x12\x16\n\tlineup_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\";\n\x1fYouTubeChannelAttributeMetadata\x12\x18\n\x10subscriber_count\x18\x01 \x01(\x03\"\xc9\x02\n\x1dYouTubeVideoAttributeMetadata\x12\x15\n\rthumbnail_url\x18\x01 \x01(\t\x12\x11\n\tvideo_url\x18\x02 \x01(\t\x12\x13\n\x0bviews_count\x18\x03 \x01(\x03\x12\x13\n\x0blikes_count\x18\x04 \x01(\x03\x12\x16\n\x0e\x63omments_count\x18\x05 \x01(\x03\x12g\n\x10video_properties\x18\x06 \x03(\x0e\x32M.google.ads.googleads.v25.enums.YouTubeVideoPropertyEnum.YouTubeVideoProperty\x12\x14\n\x0cpublish_date\x18\x07 \x01(\t\x12\x12\n\nchannel_id\x18\x08 \x01(\t\x12\x14\n\x0c\x63hannel_name\x18\t \x01(\t\x12\x13\n\x0b\x63hannel_url\x18\n \x01(\t\"\xee\x04\n\x17LineupAttributeMetadata\x12H\n\x11inventory_country\x18\x01 \x01(\x0b\x32-.google.ads.googleads.v25.common.LocationInfo\x12%\n\x18median_monthly_inventory\x18\x02 \x01(\x03H\x00\x88\x01\x01\x12&\n\x19\x63hannel_count_lower_bound\x18\x03 \x01(\x03H\x01\x88\x01\x01\x12&\n\x19\x63hannel_count_upper_bound\x18\x04 \x01(\x03H\x02\x88\x01\x01\x12_\n\x0fsample_channels\x18\x05 \x03(\x0b\x32\x46.google.ads.googleads.v25.common.LineupAttributeMetadata.SampleChannel\x1a\xd7\x01\n\rSampleChannel\x12L\n\x0fyoutube_channel\x18\x01 \x01(\x0b\x32\x33.google.ads.googleads.v25.common.YouTubeChannelInfo\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12\x62\n\x18youtube_channel_metadata\x18\x03 \x01(\x0b\x32@.google.ads.googleads.v25.common.YouTubeChannelAttributeMetadataB\x1b\n\x19_median_monthly_inventoryB\x1c\n\x1a_channel_count_lower_boundB\x1c\n\x1a_channel_count_upper_bound\"d\n\x19LocationAttributeMetadata\x12G\n\x10\x63ountry_location\x18\x01 \x01(\x0b\x32-.google.ads.googleads.v25.common.LocationInfo\"B\n\x1dUserInterestAttributeMetadata\x12!\n\x19user_interest_description\x18\x01 \x01(\t\"\x96\x02\n\x1fKnowledgeGraphAttributeMetadata\x12\x92\x01\n\x13\x65ntity_capabilities\x18\x01 \x03(\x0e\x32u.google.ads.googleads.v25.enums.InsightsKnowledgeGraphEntityCapabilitiesEnum.InsightsKnowledgeGraphEntityCapabilities\x12^\n\x12related_categories\x18\x02 \x03(\x0b\x32\x42.google.ads.googleads.v25.common.AudienceInsightsAttributeMetadata\"r\n\x19UserListAttributeMetadata\x12U\n\x0euser_list_type\x18\x01 \x01(\x0e\x32=.google.ads.googleads.v25.enums.UserListTypeEnum.UserListType\"\x80\x01\n&AudienceInsightsAttributeMetadataGroup\x12V\n\nattributes\x18\x01 \x03(\x0b\x32\x42.google.ads.googleads.v25.common.AudienceInsightsAttributeMetadata\"u\n\x1eInsightsAudienceAttributeGroup\x12S\n\nattributes\x18\x01 \x03(\x0b\x32:.google.ads.googleads.v25.common.AudienceInsightsAttributeB\x03\xe0\x41\x02\x42\xfe\x01\n#com.google.ads.googleads.v25.commonB\x1e\x41udienceInsightsAttributeProtoP\x01ZEgoogle.golang.org/genproto/googleapis/ads/googleads/v25/common;common\xa2\x02\x03GAA\xaa\x02\x1fGoogle.Ads.GoogleAds.V25.Common\xca\x02\x1fGoogle\\Ads\\GoogleAds\\V25\\Common\xea\x02#Google::Ads::GoogleAds::V25::Commonb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Common + AudienceInsightsAttributeMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.AudienceInsightsAttributeMetadata").msgclass + AudienceInsightsAttribute = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.AudienceInsightsAttribute").msgclass + AudienceInsightsEntity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.AudienceInsightsEntity").msgclass + AudienceInsightsCategory = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.AudienceInsightsCategory").msgclass + AudienceInsightsLineup = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.AudienceInsightsLineup").msgclass + YouTubeChannelAttributeMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.YouTubeChannelAttributeMetadata").msgclass + YouTubeVideoAttributeMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.YouTubeVideoAttributeMetadata").msgclass + LineupAttributeMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.LineupAttributeMetadata").msgclass + LineupAttributeMetadata::SampleChannel = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.LineupAttributeMetadata.SampleChannel").msgclass + LocationAttributeMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.LocationAttributeMetadata").msgclass + UserInterestAttributeMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.UserInterestAttributeMetadata").msgclass + KnowledgeGraphAttributeMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.KnowledgeGraphAttributeMetadata").msgclass + UserListAttributeMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.UserListAttributeMetadata").msgclass + AudienceInsightsAttributeMetadataGroup = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.AudienceInsightsAttributeMetadataGroup").msgclass + InsightsAudienceAttributeGroup = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.InsightsAudienceAttributeGroup").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/common/audiences_pb.rb b/lib/google/ads/google_ads/v25/common/audiences_pb.rb new file mode 100644 index 000000000..3a59cd6b1 --- /dev/null +++ b/lib/google/ads/google_ads/v25/common/audiences_pb.rb @@ -0,0 +1,42 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/common/audiences.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/enums/gender_type_pb' +require 'google/ads/google_ads/v25/enums/income_range_type_pb' +require 'google/ads/google_ads/v25/enums/parental_status_type_pb' +require 'google/api/resource_pb' + + +descriptor_data = "\n/google/ads/googleads/v25/common/audiences.proto\x12\x1fgoogle.ads.googleads.v25.common\x1a\x30google/ads/googleads/v25/enums/gender_type.proto\x1a\x36google/ads/googleads/v25/enums/income_range_type.proto\x1a\x39google/ads/googleads/v25/enums/parental_status_type.proto\x1a\x19google/api/resource.proto\"\xa6\x03\n\x11\x41udienceDimension\x12<\n\x03\x61ge\x18\x01 \x01(\x0b\x32-.google.ads.googleads.v25.common.AgeDimensionH\x00\x12\x42\n\x06gender\x18\x02 \x01(\x0b\x32\x30.google.ads.googleads.v25.common.GenderDimensionH\x00\x12U\n\x10household_income\x18\x03 \x01(\x0b\x32\x39.google.ads.googleads.v25.common.HouseholdIncomeDimensionH\x00\x12S\n\x0fparental_status\x18\x04 \x01(\x0b\x32\x38.google.ads.googleads.v25.common.ParentalStatusDimensionH\x00\x12V\n\x11\x61udience_segments\x18\x05 \x01(\x0b\x32\x39.google.ads.googleads.v25.common.AudienceSegmentDimensionH\x00\x42\x0b\n\tdimension\"c\n\x1a\x41udienceExclusionDimension\x12\x45\n\nexclusions\x18\x01 \x03(\x0b\x32\x31.google.ads.googleads.v25.common.ExclusionSegment\"d\n\x10\x45xclusionSegment\x12\x45\n\tuser_list\x18\x01 \x01(\x0b\x32\x30.google.ads.googleads.v25.common.UserListSegmentH\x00\x42\t\n\x07segment\"\x8b\x01\n\x0c\x41geDimension\x12?\n\nage_ranges\x18\x01 \x03(\x0b\x32+.google.ads.googleads.v25.common.AgeSegment\x12!\n\x14include_undetermined\x18\x02 \x01(\x08H\x00\x88\x01\x01\x42\x17\n\x15_include_undetermined\"P\n\nAgeSegment\x12\x14\n\x07min_age\x18\x01 \x01(\x05H\x00\x88\x01\x01\x12\x14\n\x07max_age\x18\x02 \x01(\x05H\x01\x88\x01\x01\x42\n\n\x08_min_ageB\n\n\x08_max_age\"\x99\x01\n\x0fGenderDimension\x12J\n\x07genders\x18\x01 \x03(\x0e\x32\x39.google.ads.googleads.v25.enums.GenderTypeEnum.GenderType\x12!\n\x14include_undetermined\x18\x02 \x01(\x08H\x00\x88\x01\x01\x42\x17\n\x15_include_undetermined\"\xb2\x01\n\x18HouseholdIncomeDimension\x12Z\n\rincome_ranges\x18\x01 \x03(\x0e\x32\x43.google.ads.googleads.v25.enums.IncomeRangeTypeEnum.IncomeRangeType\x12!\n\x14include_undetermined\x18\x02 \x01(\x08H\x00\x88\x01\x01\x42\x17\n\x15_include_undetermined\"\xbb\x01\n\x17ParentalStatusDimension\x12\x64\n\x11parental_statuses\x18\x01 \x03(\x0e\x32I.google.ads.googleads.v25.enums.ParentalStatusTypeEnum.ParentalStatusType\x12!\n\x14include_undetermined\x18\x02 \x01(\x08H\x00\x88\x01\x01\x42\x17\n\x15_include_undetermined\"^\n\x18\x41udienceSegmentDimension\x12\x42\n\x08segments\x18\x01 \x03(\x0b\x32\x30.google.ads.googleads.v25.common.AudienceSegment\"\xab\x03\n\x0f\x41udienceSegment\x12\x45\n\tuser_list\x18\x01 \x01(\x0b\x32\x30.google.ads.googleads.v25.common.UserListSegmentH\x00\x12M\n\ruser_interest\x18\x02 \x01(\x0b\x32\x34.google.ads.googleads.v25.common.UserInterestSegmentH\x00\x12G\n\nlife_event\x18\x03 \x01(\x0b\x32\x31.google.ads.googleads.v25.common.LifeEventSegmentH\x00\x12[\n\x14\x64\x65tailed_demographic\x18\x04 \x01(\x0b\x32;.google.ads.googleads.v25.common.DetailedDemographicSegmentH\x00\x12Q\n\x0f\x63ustom_audience\x18\x05 \x01(\x0b\x32\x36.google.ads.googleads.v25.common.CustomAudienceSegmentH\x00\x42\t\n\x07segment\"7\n\x0fUserListSegment\x12\x16\n\tuser_list\x18\x01 \x01(\tH\x00\x88\x01\x01\x42\x0c\n\n_user_list\"U\n\x13UserInterestSegment\x12#\n\x16user_interest_category\x18\x01 \x01(\tH\x00\x88\x01\x01\x42\x19\n\x17_user_interest_category\"c\n\x10LifeEventSegment\x12@\n\nlife_event\x18\x01 \x01(\tB\'\xfa\x41$\n\"googleads.googleapis.com/LifeEventH\x00\x88\x01\x01\x42\r\n\x0b_life_event\"\x8b\x01\n\x1a\x44\x65tailedDemographicSegment\x12T\n\x14\x64\x65tailed_demographic\x18\x01 \x01(\tB1\xfa\x41.\n,googleads.googleapis.com/DetailedDemographicH\x00\x88\x01\x01\x42\x17\n\x15_detailed_demographic\"I\n\x15\x43ustomAudienceSegment\x12\x1c\n\x0f\x63ustom_audience\x18\x01 \x01(\tH\x00\x88\x01\x01\x42\x12\n\x10_custom_audienceB\xee\x01\n#com.google.ads.googleads.v25.commonB\x0e\x41udiencesProtoP\x01ZEgoogle.golang.org/genproto/googleapis/ads/googleads/v25/common;common\xa2\x02\x03GAA\xaa\x02\x1fGoogle.Ads.GoogleAds.V25.Common\xca\x02\x1fGoogle\\Ads\\GoogleAds\\V25\\Common\xea\x02#Google::Ads::GoogleAds::V25::Commonb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Common + AudienceDimension = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.AudienceDimension").msgclass + AudienceExclusionDimension = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.AudienceExclusionDimension").msgclass + ExclusionSegment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.ExclusionSegment").msgclass + AgeDimension = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.AgeDimension").msgclass + AgeSegment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.AgeSegment").msgclass + GenderDimension = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.GenderDimension").msgclass + HouseholdIncomeDimension = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.HouseholdIncomeDimension").msgclass + ParentalStatusDimension = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.ParentalStatusDimension").msgclass + AudienceSegmentDimension = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.AudienceSegmentDimension").msgclass + AudienceSegment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.AudienceSegment").msgclass + UserListSegment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.UserListSegment").msgclass + UserInterestSegment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.UserInterestSegment").msgclass + LifeEventSegment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.LifeEventSegment").msgclass + DetailedDemographicSegment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.DetailedDemographicSegment").msgclass + CustomAudienceSegment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.CustomAudienceSegment").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/common/bidding_pb.rb b/lib/google/ads/google_ads/v25/common/bidding_pb.rb new file mode 100644 index 000000000..e51fae985 --- /dev/null +++ b/lib/google/ads/google_ads/v25/common/bidding_pb.rb @@ -0,0 +1,46 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/common/bidding.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/enums/fixed_cpm_goal_pb' +require 'google/ads/google_ads/v25/enums/fixed_cpm_target_frequency_time_unit_pb' +require 'google/ads/google_ads/v25/enums/target_frequency_time_unit_pb' +require 'google/ads/google_ads/v25/enums/target_impression_share_location_pb' + + +descriptor_data = "\n-google/ads/googleads/v25/common/bidding.proto\x12\x1fgoogle.ads.googleads.v25.common\x1a\x33google/ads/googleads/v25/enums/fixed_cpm_goal.proto\x1aIgoogle/ads/googleads/v25/enums/fixed_cpm_target_frequency_time_unit.proto\x1a?google/ads/googleads/v25/enums/target_frequency_time_unit.proto\x1a\x45google/ads/googleads/v25/enums/target_impression_share_location.proto\"L\n\nCommission\x12#\n\x16\x63ommission_rate_micros\x18\x02 \x01(\x03H\x00\x88\x01\x01\x42\x19\n\x17_commission_rate_micros\"\r\n\x0b\x45nhancedCpc\"\x0b\n\tManualCpa\"G\n\tManualCpc\x12!\n\x14\x65nhanced_cpc_enabled\x18\x02 \x01(\x08H\x00\x88\x01\x01\x42\x17\n\x15_enhanced_cpc_enabled\"\x0b\n\tManualCpm\"\x0b\n\tManualCpv\"n\n\x13MaximizeConversions\x12\x1e\n\x16\x63pc_bid_ceiling_micros\x18\x02 \x01(\x03\x12\x1c\n\x14\x63pc_bid_floor_micros\x18\x03 \x01(\x03\x12\x19\n\x11target_cpa_micros\x18\x04 \x01(\x03\"\xc8\x01\n\x17MaximizeConversionValue\x12\x13\n\x0btarget_roas\x18\x02 \x01(\x01\x12\x1e\n\x16\x63pc_bid_ceiling_micros\x18\x03 \x01(\x03\x12\x1c\n\x14\x63pc_bid_floor_micros\x18\x04 \x01(\x03\x12\x31\n$target_roas_tolerance_percent_millis\x18\x05 \x01(\x03H\x00\x88\x01\x01\x42\'\n%_target_roas_tolerance_percent_millis\"\xbd\x01\n\tTargetCpa\x12\x1e\n\x11target_cpa_micros\x18\x04 \x01(\x03H\x00\x88\x01\x01\x12#\n\x16\x63pc_bid_ceiling_micros\x18\x05 \x01(\x03H\x01\x88\x01\x01\x12!\n\x14\x63pc_bid_floor_micros\x18\x06 \x01(\x03H\x02\x88\x01\x01\x42\x14\n\x12_target_cpa_microsB\x19\n\x17_cpc_bid_ceiling_microsB\x17\n\x15_cpc_bid_floor_micros\"s\n\tTargetCpm\x12^\n\x15target_frequency_goal\x18\x01 \x01(\x0b\x32=.google.ads.googleads.v25.common.TargetCpmTargetFrequencyGoalH\x00\x42\x06\n\x04goal\"\x9c\x01\n\x1cTargetCpmTargetFrequencyGoal\x12\x14\n\x0ctarget_count\x18\x01 \x01(\x03\x12\x66\n\ttime_unit\x18\x02 \x01(\x0e\x32S.google.ads.googleads.v25.enums.TargetFrequencyTimeUnitEnum.TargetFrequencyTimeUnit\"\x8e\x02\n\x15TargetImpressionShare\x12q\n\x08location\x18\x01 \x01(\x0e\x32_.google.ads.googleads.v25.enums.TargetImpressionShareLocationEnum.TargetImpressionShareLocation\x12%\n\x18location_fraction_micros\x18\x04 \x01(\x03H\x00\x88\x01\x01\x12#\n\x16\x63pc_bid_ceiling_micros\x18\x05 \x01(\x03H\x01\x88\x01\x01\x42\x1b\n\x19_location_fraction_microsB\x19\n\x17_cpc_bid_ceiling_micros\"\x8e\x02\n\nTargetRoas\x12\x18\n\x0btarget_roas\x18\x04 \x01(\x01H\x00\x88\x01\x01\x12#\n\x16\x63pc_bid_ceiling_micros\x18\x05 \x01(\x03H\x01\x88\x01\x01\x12!\n\x14\x63pc_bid_floor_micros\x18\x06 \x01(\x03H\x02\x88\x01\x01\x12\x31\n$target_roas_tolerance_percent_millis\x18\x07 \x01(\x03H\x03\x88\x01\x01\x42\x0e\n\x0c_target_roasB\x19\n\x17_cpc_bid_ceiling_microsB\x17\n\x15_cpc_bid_floor_microsB\'\n%_target_roas_tolerance_percent_millis\"\x8b\x01\n\x0bTargetSpend\x12$\n\x13target_spend_micros\x18\x03 \x01(\x03\x42\x02\x18\x01H\x00\x88\x01\x01\x12#\n\x16\x63pc_bid_ceiling_micros\x18\x04 \x01(\x03H\x01\x88\x01\x01\x42\x16\n\x14_target_spend_microsB\x19\n\x17_cpc_bid_ceiling_micros\"\x88\x01\n\nPercentCpc\x12#\n\x16\x63pc_bid_ceiling_micros\x18\x03 \x01(\x03H\x00\x88\x01\x01\x12!\n\x14\x65nhanced_cpc_enabled\x18\x04 \x01(\x08H\x01\x88\x01\x01\x42\x19\n\x17_cpc_bid_ceiling_microsB\x17\n\x15_enhanced_cpc_enabled\"\xc7\x01\n\x08\x46ixedCpm\x12K\n\x04goal\x18\x01 \x01(\x0e\x32=.google.ads.googleads.v25.enums.FixedCpmGoalEnum.FixedCpmGoal\x12\x61\n\x15target_frequency_info\x18\x02 \x01(\x0b\x32@.google.ads.googleads.v25.common.FixedCpmTargetFrequencyGoalInfoH\x00\x42\x0b\n\tgoal_info\"\xaf\x01\n\x1f\x46ixedCpmTargetFrequencyGoalInfo\x12\x14\n\x0ctarget_count\x18\x01 \x01(\x03\x12v\n\ttime_unit\x18\x02 \x01(\x0e\x32\x63.google.ads.googleads.v25.enums.FixedCpmTargetFrequencyTimeUnitEnum.FixedCpmTargetFrequencyTimeUnit\"\x0b\n\tTargetCpv\"&\n\tTargetCpc\x12\x19\n\x11target_cpc_micros\x18\x01 \x01(\x03\x42\xec\x01\n#com.google.ads.googleads.v25.commonB\x0c\x42iddingProtoP\x01ZEgoogle.golang.org/genproto/googleapis/ads/googleads/v25/common;common\xa2\x02\x03GAA\xaa\x02\x1fGoogle.Ads.GoogleAds.V25.Common\xca\x02\x1fGoogle\\Ads\\GoogleAds\\V25\\Common\xea\x02#Google::Ads::GoogleAds::V25::Commonb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Common + Commission = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.Commission").msgclass + EnhancedCpc = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.EnhancedCpc").msgclass + ManualCpa = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.ManualCpa").msgclass + ManualCpc = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.ManualCpc").msgclass + ManualCpm = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.ManualCpm").msgclass + ManualCpv = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.ManualCpv").msgclass + MaximizeConversions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.MaximizeConversions").msgclass + MaximizeConversionValue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.MaximizeConversionValue").msgclass + TargetCpa = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.TargetCpa").msgclass + TargetCpm = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.TargetCpm").msgclass + TargetCpmTargetFrequencyGoal = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.TargetCpmTargetFrequencyGoal").msgclass + TargetImpressionShare = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.TargetImpressionShare").msgclass + TargetRoas = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.TargetRoas").msgclass + TargetSpend = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.TargetSpend").msgclass + PercentCpc = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.PercentCpc").msgclass + FixedCpm = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.FixedCpm").msgclass + FixedCpmTargetFrequencyGoalInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.FixedCpmTargetFrequencyGoalInfo").msgclass + TargetCpv = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.TargetCpv").msgclass + TargetCpc = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.TargetCpc").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/common/campaign_goal_settings_pb.rb b/lib/google/ads/google_ads/v25/common/campaign_goal_settings_pb.rb new file mode 100644 index 000000000..2f38ed4c2 --- /dev/null +++ b/lib/google/ads/google_ads/v25/common/campaign_goal_settings_pb.rb @@ -0,0 +1,29 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/common/campaign_goal_settings.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/common/goal_common_pb' +require 'google/ads/google_ads/v25/enums/customer_lifecycle_optimization_mode_pb' + + +descriptor_data = "\n.google.ads.googleads.v25.common.ProductChannelExclusivityInfoH\x00\x12R\n\x11product_condition\x18\n \x01(\x0b\x32\x35.google.ads.googleads.v25.common.ProductConditionInfoH\x00\x12_\n\x18product_custom_attribute\x18\x10 \x01(\x0b\x32;.google.ads.googleads.v25.common.ProductCustomAttributeInfoH\x00\x12M\n\x0fproduct_item_id\x18\x0b \x01(\x0b\x32\x32.google.ads.googleads.v25.common.ProductItemIdInfoH\x00\x12H\n\x0cproduct_type\x18\x0c \x01(\x0b\x32\x30.google.ads.googleads.v25.common.ProductTypeInfoH\x00\x12P\n\x10product_grouping\x18\x11 \x01(\x0b\x32\x34.google.ads.googleads.v25.common.ProductGroupingInfoH\x00\x12L\n\x0eproduct_labels\x18\x12 \x01(\x0b\x32\x32.google.ads.googleads.v25.common.ProductLabelsInfoH\x00\x12_\n\x18product_legacy_condition\x18\x13 \x01(\x0b\x32;.google.ads.googleads.v25.common.ProductLegacyConditionInfoH\x00\x12Q\n\x11product_type_full\x18\x14 \x01(\x0b\x32\x34.google.ads.googleads.v25.common.ProductTypeFullInfoH\x00\x12\x46\n\x0b\x61\x63tivity_id\x18\x15 \x01(\x0b\x32/.google.ads.googleads.v25.common.ActivityIdInfoH\x00\x12N\n\x0f\x61\x63tivity_rating\x18\x16 \x01(\x0b\x32\x33.google.ads.googleads.v25.common.ActivityRatingInfoH\x00\x12P\n\x10\x61\x63tivity_country\x18\x17 \x01(\x0b\x32\x34.google.ads.googleads.v25.common.ActivityCountryInfoH\x00\x12L\n\x0e\x61\x63tivity_state\x18\x19 \x01(\x0b\x32\x32.google.ads.googleads.v25.common.ActivityStateInfoH\x00\x12J\n\ractivity_city\x18\x1a \x01(\x0b\x32\x31.google.ads.googleads.v25.common.ActivityCityInfoH\x00\x12\x61\n\x19unknown_listing_dimension\x18\x0e \x01(\x0b\x32<.google.ads.googleads.v25.common.UnknownListingDimensionInfoH\x00\x42\x0b\n\tdimension\"+\n\x0bHotelIdInfo\x12\x12\n\x05value\x18\x02 \x01(\tH\x00\x88\x01\x01\x42\x08\n\x06_value\".\n\x0eHotelClassInfo\x12\x12\n\x05value\x18\x02 \x01(\x03H\x00\x88\x01\x01\x42\x08\n\x06_value\"\\\n\x16HotelCountryRegionInfo\x12%\n\x18\x63ountry_region_criterion\x18\x02 \x01(\tH\x00\x88\x01\x01\x42\x1b\n\x19_country_region_criterion\"B\n\x0eHotelStateInfo\x12\x1c\n\x0fstate_criterion\x18\x02 \x01(\tH\x00\x88\x01\x01\x42\x12\n\x10_state_criterion\"?\n\rHotelCityInfo\x12\x1b\n\x0e\x63ity_criterion\x18\x02 \x01(\tH\x00\x88\x01\x01\x42\x11\n\x0f_city_criterion\"\x9d\x01\n\x13ProductCategoryInfo\x12\x18\n\x0b\x63\x61tegory_id\x18\x01 \x01(\x03H\x00\x88\x01\x01\x12\\\n\x05level\x18\x02 \x01(\x0e\x32M.google.ads.googleads.v25.enums.ProductCategoryLevelEnum.ProductCategoryLevelB\x0e\n\x0c_category_id\"0\n\x10ProductBrandInfo\x12\x12\n\x05value\x18\x02 \x01(\tH\x00\x88\x01\x01\x42\x08\n\x06_value\"h\n\x12ProductChannelInfo\x12R\n\x07\x63hannel\x18\x01 \x01(\x0e\x32\x41.google.ads.googleads.v25.enums.ProductChannelEnum.ProductChannel\"\x95\x01\n\x1dProductChannelExclusivityInfo\x12t\n\x13\x63hannel_exclusivity\x18\x01 \x01(\x0e\x32W.google.ads.googleads.v25.enums.ProductChannelExclusivityEnum.ProductChannelExclusivity\"p\n\x14ProductConditionInfo\x12X\n\tcondition\x18\x01 \x01(\x0e\x32\x45.google.ads.googleads.v25.enums.ProductConditionEnum.ProductCondition\"\xa6\x01\n\x1aProductCustomAttributeInfo\x12\x12\n\x05value\x18\x03 \x01(\tH\x00\x88\x01\x01\x12j\n\x05index\x18\x02 \x01(\x0e\x32[.google.ads.googleads.v25.enums.ProductCustomAttributeIndexEnum.ProductCustomAttributeIndexB\x08\n\x06_value\"1\n\x11ProductItemIdInfo\x12\x12\n\x05value\x18\x02 \x01(\tH\x00\x88\x01\x01\x42\x08\n\x06_value\"\x85\x01\n\x0fProductTypeInfo\x12\x12\n\x05value\x18\x03 \x01(\tH\x00\x88\x01\x01\x12T\n\x05level\x18\x02 \x01(\x0e\x32\x45.google.ads.googleads.v25.enums.ProductTypeLevelEnum.ProductTypeLevelB\x08\n\x06_value\"3\n\x13ProductGroupingInfo\x12\x12\n\x05value\x18\x01 \x01(\tH\x00\x88\x01\x01\x42\x08\n\x06_value\"1\n\x11ProductLabelsInfo\x12\x12\n\x05value\x18\x01 \x01(\tH\x00\x88\x01\x01\x42\x08\n\x06_value\":\n\x1aProductLegacyConditionInfo\x12\x12\n\x05value\x18\x01 \x01(\tH\x00\x88\x01\x01\x42\x08\n\x06_value\"3\n\x13ProductTypeFullInfo\x12\x12\n\x05value\x18\x01 \x01(\tH\x00\x88\x01\x01\x42\x08\n\x06_value\"\x1d\n\x1bUnknownListingDimensionInfo\"}\n\x1aHotelDateSelectionTypeInfo\x12_\n\x04type\x18\x01 \x01(\x0e\x32Q.google.ads.googleads.v25.enums.HotelDateSelectionTypeEnum.HotelDateSelectionType\"g\n\x1dHotelAdvanceBookingWindowInfo\x12\x15\n\x08min_days\x18\x03 \x01(\x03H\x00\x88\x01\x01\x12\x15\n\x08max_days\x18\x04 \x01(\x03H\x01\x88\x01\x01\x42\x0b\n\t_min_daysB\x0b\n\t_max_days\"g\n\x15HotelLengthOfStayInfo\x12\x17\n\nmin_nights\x18\x03 \x01(\x03H\x00\x88\x01\x01\x12\x17\n\nmax_nights\x18\x04 \x01(\x03H\x01\x88\x01\x01\x42\r\n\x0b_min_nightsB\r\n\x0b_max_nights\"A\n\x19HotelCheckInDateRangeInfo\x12\x12\n\nstart_date\x18\x01 \x01(\t\x12\x10\n\x08\x65nd_date\x18\x02 \x01(\t\"c\n\x13HotelCheckInDayInfo\x12L\n\x0b\x64\x61y_of_week\x18\x01 \x01(\x0e\x32\x37.google.ads.googleads.v25.enums.DayOfWeekEnum.DayOfWeek\".\n\x0e\x41\x63tivityIdInfo\x12\x12\n\x05value\x18\x01 \x01(\tH\x00\x88\x01\x01\x42\x08\n\x06_value\"2\n\x12\x41\x63tivityRatingInfo\x12\x12\n\x05value\x18\x01 \x01(\x03H\x00\x88\x01\x01\x42\x08\n\x06_value\"3\n\x13\x41\x63tivityCountryInfo\x12\x12\n\x05value\x18\x01 \x01(\tH\x00\x88\x01\x01\x42\x08\n\x06_value\"1\n\x11\x41\x63tivityStateInfo\x12\x12\n\x05value\x18\x01 \x01(\tH\x00\x88\x01\x01\x42\x08\n\x06_value\"0\n\x10\x41\x63tivityCityInfo\x12\x12\n\x05value\x18\x01 \x01(\tH\x00\x88\x01\x01\x42\x08\n\x06_value\"h\n\x13InteractionTypeInfo\x12Q\n\x04type\x18\x01 \x01(\x0e\x32\x43.google.ads.googleads.v25.enums.InteractionTypeEnum.InteractionType\"\xd2\x02\n\x0e\x41\x64ScheduleInfo\x12S\n\x0cstart_minute\x18\x01 \x01(\x0e\x32=.google.ads.googleads.v25.enums.MinuteOfHourEnum.MinuteOfHour\x12Q\n\nend_minute\x18\x02 \x01(\x0e\x32=.google.ads.googleads.v25.enums.MinuteOfHourEnum.MinuteOfHour\x12\x17\n\nstart_hour\x18\x06 \x01(\x05H\x00\x88\x01\x01\x12\x15\n\x08\x65nd_hour\x18\x07 \x01(\x05H\x01\x88\x01\x01\x12L\n\x0b\x64\x61y_of_week\x18\x05 \x01(\x0e\x32\x37.google.ads.googleads.v25.enums.DayOfWeekEnum.DayOfWeekB\r\n\x0b_start_hourB\x0b\n\t_end_hour\"[\n\x0c\x41geRangeInfo\x12K\n\x04type\x18\x01 \x01(\x0e\x32=.google.ads.googleads.v25.enums.AgeRangeTypeEnum.AgeRangeType\"U\n\nGenderInfo\x12G\n\x04type\x18\x01 \x01(\x0e\x32\x39.google.ads.googleads.v25.enums.GenderTypeEnum.GenderType\"d\n\x0fIncomeRangeInfo\x12Q\n\x04type\x18\x01 \x01(\x0e\x32\x43.google.ads.googleads.v25.enums.IncomeRangeTypeEnum.IncomeRangeType\"m\n\x12ParentalStatusInfo\x12W\n\x04type\x18\x01 \x01(\x0e\x32I.google.ads.googleads.v25.enums.ParentalStatusTypeEnum.ParentalStatusType\"6\n\x10YouTubeVideoInfo\x12\x15\n\x08video_id\x18\x02 \x01(\tH\x00\x88\x01\x01\x42\x0b\n\t_video_id\"<\n\x12YouTubeChannelInfo\x12\x17\n\nchannel_id\x18\x02 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_channel_id\"4\n\x0cUserListInfo\x12\x16\n\tuser_list\x18\x02 \x01(\tH\x00\x88\x01\x01\x42\x0c\n\n_user_list\"\x95\x02\n\rProximityInfo\x12@\n\tgeo_point\x18\x01 \x01(\x0b\x32-.google.ads.googleads.v25.common.GeoPointInfo\x12\x13\n\x06radius\x18\x05 \x01(\x01H\x00\x88\x01\x01\x12\x63\n\x0cradius_units\x18\x03 \x01(\x0e\x32M.google.ads.googleads.v25.enums.ProximityRadiusUnitsEnum.ProximityRadiusUnits\x12=\n\x07\x61\x64\x64ress\x18\x04 \x01(\x0b\x32,.google.ads.googleads.v25.common.AddressInfoB\t\n\x07_radius\"\x9c\x01\n\x0cGeoPointInfo\x12\'\n\x1alongitude_in_micro_degrees\x18\x03 \x01(\x05H\x00\x88\x01\x01\x12&\n\x19latitude_in_micro_degrees\x18\x04 \x01(\x05H\x01\x88\x01\x01\x42\x1d\n\x1b_longitude_in_micro_degreesB\x1c\n\x1a_latitude_in_micro_degrees\"\xc7\x02\n\x0b\x41\x64\x64ressInfo\x12\x18\n\x0bpostal_code\x18\x08 \x01(\tH\x00\x88\x01\x01\x12\x1a\n\rprovince_code\x18\t \x01(\tH\x01\x88\x01\x01\x12\x19\n\x0c\x63ountry_code\x18\n \x01(\tH\x02\x88\x01\x01\x12\x1a\n\rprovince_name\x18\x0b \x01(\tH\x03\x88\x01\x01\x12\x1b\n\x0estreet_address\x18\x0c \x01(\tH\x04\x88\x01\x01\x12\x1c\n\x0fstreet_address2\x18\r \x01(\tH\x05\x88\x01\x01\x12\x16\n\tcity_name\x18\x0e \x01(\tH\x06\x88\x01\x01\x42\x0e\n\x0c_postal_codeB\x10\n\x0e_province_codeB\x0f\n\r_country_codeB\x10\n\x0e_province_nameB\x11\n\x0f_street_addressB\x12\n\x10_street_address2B\x0c\n\n_city_name\"v\n\tTopicInfo\x12H\n\x0etopic_constant\x18\x03 \x01(\tB+\xfa\x41(\n&googleads.googleapis.com/TopicConstantH\x00\x88\x01\x01\x12\x0c\n\x04path\x18\x04 \x03(\tB\x11\n\x0f_topic_constant\"D\n\x0cLanguageInfo\x12\x1e\n\x11language_constant\x18\x02 \x01(\tH\x00\x88\x01\x01\x42\x14\n\x12_language_constant\"5\n\x0bIpBlockInfo\x12\x17\n\nip_address\x18\x02 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_ip_address\"g\n\x10\x43ontentLabelInfo\x12S\n\x04type\x18\x01 \x01(\x0e\x32\x45.google.ads.googleads.v25.enums.ContentLabelTypeEnum.ContentLabelType\"p\n\x0b\x43\x61rrierInfo\x12L\n\x10\x63\x61rrier_constant\x18\x02 \x01(\tB-\xfa\x41*\n(googleads.googleapis.com/CarrierConstantH\x00\x88\x01\x01\x42\x13\n\x11_carrier_constant\"R\n\x10UserInterestInfo\x12#\n\x16user_interest_category\x18\x02 \x01(\tH\x00\x88\x01\x01\x42\x19\n\x17_user_interest_category\"\xe9\x01\n\x0bWebpageInfo\x12\x1b\n\x0e\x63riterion_name\x18\x03 \x01(\tH\x00\x88\x01\x01\x12I\n\nconditions\x18\x02 \x03(\x0b\x32\x35.google.ads.googleads.v25.common.WebpageConditionInfo\x12\x1b\n\x13\x63overage_percentage\x18\x04 \x01(\x01\x12\x42\n\x06sample\x18\x05 \x01(\x0b\x32\x32.google.ads.googleads.v25.common.WebpageSampleInfoB\x11\n\x0f_criterion_name\"\x89\x02\n\x14WebpageConditionInfo\x12\x64\n\x07operand\x18\x01 \x01(\x0e\x32S.google.ads.googleads.v25.enums.WebpageConditionOperandEnum.WebpageConditionOperand\x12g\n\x08operator\x18\x02 \x01(\x0e\x32U.google.ads.googleads.v25.enums.WebpageConditionOperatorEnum.WebpageConditionOperator\x12\x15\n\x08\x61rgument\x18\x04 \x01(\tH\x00\x88\x01\x01\x42\x0b\n\t_argument\"9\n\x0fWebpageListInfo\x12\x17\n\nshared_set\x18\x01 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_shared_set\"(\n\x11WebpageSampleInfo\x12\x13\n\x0bsample_urls\x18\x01 \x03(\t\"\xb0\x01\n\x1aOperatingSystemVersionInfo\x12l\n!operating_system_version_constant\x18\x02 \x01(\tB<\xfa\x41\x39\n7googleads.googleapis.com/OperatingSystemVersionConstantH\x00\x88\x01\x01\x42$\n\"_operating_system_version_constant\"p\n\x13\x41ppPaymentModelInfo\x12Y\n\x04type\x18\x01 \x01(\x0e\x32K.google.ads.googleads.v25.enums.AppPaymentModelTypeEnum.AppPaymentModelType\"\x86\x01\n\x10MobileDeviceInfo\x12W\n\x16mobile_device_constant\x18\x02 \x01(\tB2\xfa\x41/\n-googleads.googleapis.com/MobileDeviceConstantH\x00\x88\x01\x01\x42\x19\n\x17_mobile_device_constant\"F\n\x12\x43ustomAffinityInfo\x12\x1c\n\x0f\x63ustom_affinity\x18\x02 \x01(\tH\x00\x88\x01\x01\x42\x12\n\x10_custom_affinity\"@\n\x10\x43ustomIntentInfo\x12\x1a\n\rcustom_intent\x18\x02 \x01(\tH\x00\x88\x01\x01\x42\x10\n\x0e_custom_intent\"\xdd\x02\n\x11LocationGroupInfo\x12\x1c\n\x14geo_target_constants\x18\x06 \x03(\t\x12\x13\n\x06radius\x18\x07 \x01(\x03H\x00\x88\x01\x01\x12k\n\x0cradius_units\x18\x04 \x01(\x0e\x32U.google.ads.googleads.v25.enums.LocationGroupRadiusUnitsEnum.LocationGroupRadiusUnits\x12\x16\n\x0e\x66\x65\x65\x64_item_sets\x18\x08 \x03(\t\x12\x35\n(enable_customer_level_location_asset_set\x18\t \x01(\x08H\x01\x88\x01\x01\x12!\n\x19location_group_asset_sets\x18\n \x03(\tB\t\n\x07_radiusB+\n)_enable_customer_level_location_asset_set\"-\n\x12\x43ustomAudienceInfo\x12\x17\n\x0f\x63ustom_audience\x18\x01 \x01(\t\"a\n\x14\x43ombinedAudienceInfo\x12I\n\x11\x63ombined_audience\x18\x01 \x01(\tB.\xfa\x41+\n)googleads.googleapis.com/CombinedAudience\" \n\x0c\x41udienceInfo\x12\x10\n\x08\x61udience\x18\x01 \x01(\t\"\x9c\x01\n\x10KeywordThemeInfo\x12T\n\x16keyword_theme_constant\x18\x01 \x01(\tB2\xfa\x41/\n-googleads.googleapis.com/KeywordThemeConstantH\x00\x12!\n\x17\x66ree_form_keyword_theme\x18\x02 \x01(\tH\x00\x42\x0f\n\rkeyword_theme\"(\n\x12LocalServiceIdInfo\x12\x12\n\nservice_id\x18\x01 \x01(\t\"\x1f\n\x0fSearchThemeInfo\x12\x0c\n\x04text\x18\x01 \x01(\t\"\x87\x03\n\tBrandInfo\x12\x1e\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x03H\x00\x88\x01\x01\x12\x16\n\tentity_id\x18\x01 \x01(\tH\x01\x88\x01\x01\x12\x1d\n\x0bprimary_url\x18\x03 \x01(\tB\x03\xe0\x41\x03H\x02\x88\x01\x01\x12\x7f\n\x10rejection_reason\x18\x04 \x01(\x0e\x32[.google.ads.googleads.v25.enums.BrandRequestRejectionReasonEnum.BrandRequestRejectionReasonB\x03\xe0\x41\x03H\x03\x88\x01\x01\x12S\n\x06status\x18\x05 \x01(\x0e\x32\x39.google.ads.googleads.v25.enums.BrandStateEnum.BrandStateB\x03\xe0\x41\x03H\x04\x88\x01\x01\x42\x0f\n\r_display_nameB\x0c\n\n_entity_idB\x0e\n\x0c_primary_urlB\x13\n\x11_rejection_reasonB\t\n\x07_status\"7\n\rBrandListInfo\x12\x17\n\nshared_set\x18\x01 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_shared_set\"=\n\rLifeEventInfo\x12\x1a\n\rlife_event_id\x18\x01 \x01(\x03H\x00\x88\x01\x01\x42\x10\n\x0e_life_event_id\"[\n\x17\x45xtendedDemographicInfo\x12$\n\x17\x65xtended_demographic_id\x18\x01 \x01(\x03H\x00\x88\x01\x01\x42\x1a\n\x18_extended_demographic_id\"C\n\x0fVideoLineupInfo\x12\x1c\n\x0fvideo_lineup_id\x18\x01 \x01(\x03H\x00\x88\x01\x01\x42\x12\n\x10_video_lineup_id\";\n\x11PlacementListInfo\x12\x17\n\nshared_set\x18\x01 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_shared_set\"J\n VerticalAdsItemGroupRuleListInfo\x12\x17\n\nshared_set\x18\x01 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_shared_set\"\x85\x02\n\x1cVerticalAdsItemGroupRuleInfo\x12\x13\n\titem_code\x18\x01 \x01(\tH\x00\x12\x1e\n\x14\x63ountry_criterion_id\x18\x02 \x01(\tH\x00\x12\x1d\n\x13region_criterion_id\x18\x03 \x01(\tH\x00\x12\x1b\n\x11\x63ity_criterion_id\x18\x04 \x01(\tH\x00\x12\x15\n\x0bhotel_class\x18\x06 \x01(\x03H\x00\x12\x15\n\x0buser_rating\x18\x07 \x01(\x03H\x00\x12\x0f\n\x05venue\x18\x08 \x01(\tH\x00\x12(\n\x1e\x65vent_participant_display_name\x18\t \x01(\tH\x00\x42\x0b\n\tdimension\"<\n\x12RetailFilterBundle\x12\x17\n\nshared_set\x18\x01 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_shared_set\"\xa0\x01\n\x0cRetailFilter\x12M\n\nexpression\x18\x01 \x01(\x0b\x32\x37.google.ads.googleads.v25.common.RetailFilterExpressionH\x00\x12\x39\n\x03tag\x18\x02 \x01(\x0b\x32*.google.ads.googleads.v25.common.RetailTagH\x00\x42\x06\n\x04node\"4\n\x16RetailFilterExpression\x12\x11\n\x04name\x18\x01 \x01(\tH\x00\x88\x01\x01\x42\x07\n\x05_name\"[\n\tRetailTag\x12\x12\n\x05value\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x1c\n\x0f\x65xpression_name\x18\x02 \x01(\tH\x01\x88\x01\x01\x42\x08\n\x06_valueB\x12\n\x10_expression_nameB\xed\x01\n#com.google.ads.googleads.v25.commonB\rCriteriaProtoP\x01ZEgoogle.golang.org/genproto/googleapis/ads/googleads/v25/common;common\xa2\x02\x03GAA\xaa\x02\x1fGoogle.Ads.GoogleAds.V25.Common\xca\x02\x1fGoogle\\Ads\\GoogleAds\\V25\\Common\xea\x02#Google::Ads::GoogleAds::V25::Commonb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Common + KeywordInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.KeywordInfo").msgclass + PlacementInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.PlacementInfo").msgclass + NegativeKeywordListInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.NegativeKeywordListInfo").msgclass + MobileAppCategoryInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.MobileAppCategoryInfo").msgclass + MobileApplicationInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.MobileApplicationInfo").msgclass + LocationInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.LocationInfo").msgclass + DeviceInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.DeviceInfo").msgclass + ListingGroupInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.ListingGroupInfo").msgclass + ListingDimensionPath = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.ListingDimensionPath").msgclass + ListingScopeInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.ListingScopeInfo").msgclass + ListingDimensionInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.ListingDimensionInfo").msgclass + HotelIdInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.HotelIdInfo").msgclass + HotelClassInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.HotelClassInfo").msgclass + HotelCountryRegionInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.HotelCountryRegionInfo").msgclass + HotelStateInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.HotelStateInfo").msgclass + HotelCityInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.HotelCityInfo").msgclass + ProductCategoryInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.ProductCategoryInfo").msgclass + ProductBrandInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.ProductBrandInfo").msgclass + ProductChannelInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.ProductChannelInfo").msgclass + ProductChannelExclusivityInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.ProductChannelExclusivityInfo").msgclass + ProductConditionInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.ProductConditionInfo").msgclass + ProductCustomAttributeInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.ProductCustomAttributeInfo").msgclass + ProductItemIdInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.ProductItemIdInfo").msgclass + ProductTypeInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.ProductTypeInfo").msgclass + ProductGroupingInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.ProductGroupingInfo").msgclass + ProductLabelsInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.ProductLabelsInfo").msgclass + ProductLegacyConditionInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.ProductLegacyConditionInfo").msgclass + ProductTypeFullInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.ProductTypeFullInfo").msgclass + UnknownListingDimensionInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.UnknownListingDimensionInfo").msgclass + HotelDateSelectionTypeInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.HotelDateSelectionTypeInfo").msgclass + HotelAdvanceBookingWindowInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.HotelAdvanceBookingWindowInfo").msgclass + HotelLengthOfStayInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.HotelLengthOfStayInfo").msgclass + HotelCheckInDateRangeInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.HotelCheckInDateRangeInfo").msgclass + HotelCheckInDayInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.HotelCheckInDayInfo").msgclass + ActivityIdInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.ActivityIdInfo").msgclass + ActivityRatingInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.ActivityRatingInfo").msgclass + ActivityCountryInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.ActivityCountryInfo").msgclass + ActivityStateInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.ActivityStateInfo").msgclass + ActivityCityInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.ActivityCityInfo").msgclass + InteractionTypeInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.InteractionTypeInfo").msgclass + AdScheduleInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.AdScheduleInfo").msgclass + AgeRangeInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.AgeRangeInfo").msgclass + GenderInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.GenderInfo").msgclass + IncomeRangeInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.IncomeRangeInfo").msgclass + ParentalStatusInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.ParentalStatusInfo").msgclass + YouTubeVideoInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.YouTubeVideoInfo").msgclass + YouTubeChannelInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.YouTubeChannelInfo").msgclass + UserListInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.UserListInfo").msgclass + ProximityInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.ProximityInfo").msgclass + GeoPointInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.GeoPointInfo").msgclass + AddressInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.AddressInfo").msgclass + TopicInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.TopicInfo").msgclass + LanguageInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.LanguageInfo").msgclass + IpBlockInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.IpBlockInfo").msgclass + ContentLabelInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.ContentLabelInfo").msgclass + CarrierInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.CarrierInfo").msgclass + UserInterestInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.UserInterestInfo").msgclass + WebpageInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.WebpageInfo").msgclass + WebpageConditionInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.WebpageConditionInfo").msgclass + WebpageListInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.WebpageListInfo").msgclass + WebpageSampleInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.WebpageSampleInfo").msgclass + OperatingSystemVersionInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.OperatingSystemVersionInfo").msgclass + AppPaymentModelInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.AppPaymentModelInfo").msgclass + MobileDeviceInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.MobileDeviceInfo").msgclass + CustomAffinityInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.CustomAffinityInfo").msgclass + CustomIntentInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.CustomIntentInfo").msgclass + LocationGroupInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.LocationGroupInfo").msgclass + CustomAudienceInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.CustomAudienceInfo").msgclass + CombinedAudienceInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.CombinedAudienceInfo").msgclass + AudienceInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.AudienceInfo").msgclass + KeywordThemeInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.KeywordThemeInfo").msgclass + LocalServiceIdInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.LocalServiceIdInfo").msgclass + SearchThemeInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.SearchThemeInfo").msgclass + BrandInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.BrandInfo").msgclass + BrandListInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.BrandListInfo").msgclass + LifeEventInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.LifeEventInfo").msgclass + ExtendedDemographicInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.ExtendedDemographicInfo").msgclass + VideoLineupInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.VideoLineupInfo").msgclass + PlacementListInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.PlacementListInfo").msgclass + VerticalAdsItemGroupRuleListInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.VerticalAdsItemGroupRuleListInfo").msgclass + VerticalAdsItemGroupRuleInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.VerticalAdsItemGroupRuleInfo").msgclass + RetailFilterBundle = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.RetailFilterBundle").msgclass + RetailFilter = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.RetailFilter").msgclass + RetailFilterExpression = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.RetailFilterExpression").msgclass + RetailTag = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.RetailTag").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/common/criterion_category_availability_pb.rb b/lib/google/ads/google_ads/v25/common/criterion_category_availability_pb.rb new file mode 100644 index 000000000..819689283 --- /dev/null +++ b/lib/google/ads/google_ads/v25/common/criterion_category_availability_pb.rb @@ -0,0 +1,30 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/common/criterion_category_availability.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/enums/advertising_channel_sub_type_pb' +require 'google/ads/google_ads/v25/enums/advertising_channel_type_pb' +require 'google/ads/google_ads/v25/enums/criterion_category_channel_availability_mode_pb' +require 'google/ads/google_ads/v25/enums/criterion_category_locale_availability_mode_pb' + + +descriptor_data = "\nEgoogle/ads/googleads/v25/common/criterion_category_availability.proto\x12\x1fgoogle.ads.googleads.v25.common\x1a\x41google/ads/googleads/v25/enums/advertising_channel_sub_type.proto\x1a=google/ads/googleads/v25/enums/advertising_channel_type.proto\x1aQgoogle/ads/googleads/v25/enums/criterion_category_channel_availability_mode.proto\x1aPgoogle/ads/googleads/v25/enums/criterion_category_locale_availability_mode.proto\"\xcd\x01\n\x1d\x43riterionCategoryAvailability\x12V\n\x07\x63hannel\x18\x01 \x01(\x0b\x32\x45.google.ads.googleads.v25.common.CriterionCategoryChannelAvailability\x12T\n\x06locale\x18\x02 \x03(\x0b\x32\x44.google.ads.googleads.v25.common.CriterionCategoryLocaleAvailability\"\x81\x04\n$CriterionCategoryChannelAvailability\x12\x90\x01\n\x11\x61vailability_mode\x18\x01 \x01(\x0e\x32u.google.ads.googleads.v25.enums.CriterionCategoryChannelAvailabilityModeEnum.CriterionCategoryChannelAvailabilityMode\x12s\n\x18\x61\x64vertising_channel_type\x18\x02 \x01(\x0e\x32Q.google.ads.googleads.v25.enums.AdvertisingChannelTypeEnum.AdvertisingChannelType\x12}\n\x1c\x61\x64vertising_channel_sub_type\x18\x03 \x03(\x0e\x32W.google.ads.googleads.v25.enums.AdvertisingChannelSubTypeEnum.AdvertisingChannelSubType\x12-\n include_default_channel_sub_type\x18\x05 \x01(\x08H\x00\x88\x01\x01\x42#\n!_include_default_channel_sub_type\"\x90\x02\n#CriterionCategoryLocaleAvailability\x12\x8e\x01\n\x11\x61vailability_mode\x18\x01 \x01(\x0e\x32s.google.ads.googleads.v25.enums.CriterionCategoryLocaleAvailabilityModeEnum.CriterionCategoryLocaleAvailabilityMode\x12\x19\n\x0c\x63ountry_code\x18\x04 \x01(\tH\x00\x88\x01\x01\x12\x1a\n\rlanguage_code\x18\x05 \x01(\tH\x01\x88\x01\x01\x42\x0f\n\r_country_codeB\x10\n\x0e_language_codeB\x82\x02\n#com.google.ads.googleads.v25.commonB\"CriterionCategoryAvailabilityProtoP\x01ZEgoogle.golang.org/genproto/googleapis/ads/googleads/v25/common;common\xa2\x02\x03GAA\xaa\x02\x1fGoogle.Ads.GoogleAds.V25.Common\xca\x02\x1fGoogle\\Ads\\GoogleAds\\V25\\Common\xea\x02#Google::Ads::GoogleAds::V25::Commonb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Common + CriterionCategoryAvailability = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.CriterionCategoryAvailability").msgclass + CriterionCategoryChannelAvailability = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.CriterionCategoryChannelAvailability").msgclass + CriterionCategoryLocaleAvailability = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.CriterionCategoryLocaleAvailability").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/common/custom_parameter_pb.rb b/lib/google/ads/google_ads/v25/common/custom_parameter_pb.rb new file mode 100644 index 000000000..4e850aeb5 --- /dev/null +++ b/lib/google/ads/google_ads/v25/common/custom_parameter_pb.rb @@ -0,0 +1,23 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/common/custom_parameter.proto + +require 'google/protobuf' + + +descriptor_data = "\n6google/ads/googleads/v25/common/custom_parameter.proto\x12\x1fgoogle.ads.googleads.v25.common\"I\n\x0f\x43ustomParameter\x12\x10\n\x03key\x18\x03 \x01(\tH\x00\x88\x01\x01\x12\x12\n\x05value\x18\x04 \x01(\tH\x01\x88\x01\x01\x42\x06\n\x04_keyB\x08\n\x06_valueB\xf4\x01\n#com.google.ads.googleads.v25.commonB\x14\x43ustomParameterProtoP\x01ZEgoogle.golang.org/genproto/googleapis/ads/googleads/v25/common;common\xa2\x02\x03GAA\xaa\x02\x1fGoogle.Ads.GoogleAds.V25.Common\xca\x02\x1fGoogle\\Ads\\GoogleAds\\V25\\Common\xea\x02#Google::Ads::GoogleAds::V25::Commonb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Common + CustomParameter = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.CustomParameter").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/common/customizer_value_pb.rb b/lib/google/ads/google_ads/v25/common/customizer_value_pb.rb new file mode 100644 index 000000000..3d62d59e4 --- /dev/null +++ b/lib/google/ads/google_ads/v25/common/customizer_value_pb.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/common/customizer_value.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/enums/customizer_attribute_type_pb' +require 'google/api/field_behavior_pb' + + +descriptor_data = "\n6google/ads/googleads/v25/common/customizer_value.proto\x12\x1fgoogle.ads.googleads.v25.common\x1a>google/ads/googleads/v25/enums/customizer_attribute_type.proto\x1a\x1fgoogle/api/field_behavior.proto\"\x94\x01\n\x0f\x43ustomizerValue\x12\x66\n\x04type\x18\x01 \x01(\x0e\x32S.google.ads.googleads.v25.enums.CustomizerAttributeTypeEnum.CustomizerAttributeTypeB\x03\xe0\x41\x02\x12\x19\n\x0cstring_value\x18\x02 \x01(\tB\x03\xe0\x41\x02\x42\xf4\x01\n#com.google.ads.googleads.v25.commonB\x14\x43ustomizerValueProtoP\x01ZEgoogle.golang.org/genproto/googleapis/ads/googleads/v25/common;common\xa2\x02\x03GAA\xaa\x02\x1fGoogle.Ads.GoogleAds.V25.Common\xca\x02\x1fGoogle\\Ads\\GoogleAds\\V25\\Common\xea\x02#Google::Ads::GoogleAds::V25::Commonb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Common + CustomizerValue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.CustomizerValue").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/common/dates_pb.rb b/lib/google/ads/google_ads/v25/common/dates_pb.rb new file mode 100644 index 000000000..f4d6a81b2 --- /dev/null +++ b/lib/google/ads/google_ads/v25/common/dates_pb.rb @@ -0,0 +1,27 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/common/dates.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/enums/month_of_year_pb' + + +descriptor_data = "\n+google/ads/googleads/v25/common/dates.proto\x12\x1fgoogle.ads.googleads.v25.common\x1a\x32google/ads/googleads/v25/enums/month_of_year.proto\"W\n\tDateRange\x12\x17\n\nstart_date\x18\x03 \x01(\tH\x00\x88\x01\x01\x12\x15\n\x08\x65nd_date\x18\x04 \x01(\tH\x01\x88\x01\x01\x42\r\n\x0b_start_dateB\x0b\n\t_end_date\"\x84\x01\n\x0eYearMonthRange\x12\x39\n\x05start\x18\x01 \x01(\x0b\x32*.google.ads.googleads.v25.common.YearMonth\x12\x37\n\x03\x65nd\x18\x02 \x01(\x0b\x32*.google.ads.googleads.v25.common.YearMonth\"e\n\tYearMonth\x12\x0c\n\x04year\x18\x01 \x01(\x03\x12J\n\x05month\x18\x02 \x01(\x0e\x32;.google.ads.googleads.v25.enums.MonthOfYearEnum.MonthOfYearB\xea\x01\n#com.google.ads.googleads.v25.commonB\nDatesProtoP\x01ZEgoogle.golang.org/genproto/googleapis/ads/googleads/v25/common;common\xa2\x02\x03GAA\xaa\x02\x1fGoogle.Ads.GoogleAds.V25.Common\xca\x02\x1fGoogle\\Ads\\GoogleAds\\V25\\Common\xea\x02#Google::Ads::GoogleAds::V25::Commonb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Common + DateRange = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.DateRange").msgclass + YearMonthRange = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.YearMonthRange").msgclass + YearMonth = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.YearMonth").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/common/experiment_types_pb.rb b/lib/google/ads/google_ads/v25/common/experiment_types_pb.rb new file mode 100644 index 000000000..d437f2a9a --- /dev/null +++ b/lib/google/ads/google_ads/v25/common/experiment_types_pb.rb @@ -0,0 +1,27 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/common/experiment_types.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/enums/optimize_assets_experiment_subtype_pb' +require 'google/ads/google_ads/v25/enums/video_experiment_subtype_pb' + + +descriptor_data = "\n6google/ads/googleads/v25/common/experiment_types.proto\x12\x1fgoogle.ads.googleads.v25.common\x1aGgoogle/ads/googleads/v25/enums/optimize_assets_experiment_subtype.proto\x1a=google/ads/googleads/v25/enums/video_experiment_subtype.proto\"\x8a\x01\n\x13VideoExperimentInfo\x12s\n\x18video_experiment_subtype\x18\x01 \x01(\x0e\x32Q.google.ads.googleads.v25.enums.VideoExperimentSubtypeEnum.VideoExperimentSubtype\"\xb0\x01\n\x1cOptimizeAssetsExperimentInfo\x12\x8f\x01\n\"optimize_assets_experiment_subtype\x18\x01 \x01(\x0e\x32\x63.google.ads.googleads.v25.enums.OptimizeAssetsExperimentSubtypeEnum.OptimizeAssetsExperimentSubtypeB\xf4\x01\n#com.google.ads.googleads.v25.commonB\x14\x45xperimentTypesProtoP\x01ZEgoogle.golang.org/genproto/googleapis/ads/googleads/v25/common;common\xa2\x02\x03GAA\xaa\x02\x1fGoogle.Ads.GoogleAds.V25.Common\xca\x02\x1fGoogle\\Ads\\GoogleAds\\V25\\Common\xea\x02#Google::Ads::GoogleAds::V25::Commonb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Common + VideoExperimentInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.VideoExperimentInfo").msgclass + OptimizeAssetsExperimentInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.OptimizeAssetsExperimentInfo").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/common/extensions_pb.rb b/lib/google/ads/google_ads/v25/common/extensions_pb.rb new file mode 100644 index 000000000..3cb1dee83 --- /dev/null +++ b/lib/google/ads/google_ads/v25/common/extensions_pb.rb @@ -0,0 +1,30 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/common/extensions.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/common/custom_parameter_pb' +require 'google/ads/google_ads/v25/enums/call_conversion_reporting_state_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' + + +descriptor_data = "\n0google/ads/googleads/v25/common/extensions.proto\x12\x1fgoogle.ads.googleads.v25.common\x1a\x36google/ads/googleads/v25/common/custom_parameter.proto\x1a\x44google/ads/googleads/v25/enums/call_conversion_reporting_state.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\xc3\x03\n\x0c\x43\x61llFeedItem\x12\x19\n\x0cphone_number\x18\x07 \x01(\tH\x00\x88\x01\x01\x12\x19\n\x0c\x63ountry_code\x18\x08 \x01(\tH\x01\x88\x01\x01\x12\"\n\x15\x63\x61ll_tracking_enabled\x18\t \x01(\x08H\x02\x88\x01\x01\x12#\n\x16\x63\x61ll_conversion_action\x18\n \x01(\tH\x03\x88\x01\x01\x12.\n!call_conversion_tracking_disabled\x18\x0b \x01(\x08H\x04\x88\x01\x01\x12\x86\x01\n\x1f\x63\x61ll_conversion_reporting_state\x18\x06 \x01(\x0e\x32].google.ads.googleads.v25.enums.CallConversionReportingStateEnum.CallConversionReportingStateB\x0f\n\r_phone_numberB\x0f\n\r_country_codeB\x18\n\x16_call_tracking_enabledB\x19\n\x17_call_conversion_actionB$\n\"_call_conversion_tracking_disabled\"=\n\x0f\x43\x61lloutFeedItem\x12\x19\n\x0c\x63\x61llout_text\x18\x02 \x01(\tH\x00\x88\x01\x01\x42\x0f\n\r_callout_text\"\xe6\x02\n\x10SitelinkFeedItem\x12\x16\n\tlink_text\x18\t \x01(\tH\x00\x88\x01\x01\x12\x12\n\x05line1\x18\n \x01(\tH\x01\x88\x01\x01\x12\x12\n\x05line2\x18\x0b \x01(\tH\x02\x88\x01\x01\x12\x12\n\nfinal_urls\x18\x0c \x03(\t\x12\x19\n\x11\x66inal_mobile_urls\x18\r \x03(\t\x12\"\n\x15tracking_url_template\x18\x0e \x01(\tH\x03\x88\x01\x01\x12O\n\x15url_custom_parameters\x18\x07 \x03(\x0b\x32\x30.google.ads.googleads.v25.common.CustomParameter\x12\x1d\n\x10\x66inal_url_suffix\x18\x0f \x01(\tH\x04\x88\x01\x01\x42\x0c\n\n_link_textB\x08\n\x06_line1B\x08\n\x06_line2B\x18\n\x16_tracking_url_templateB\x13\n\x11_final_url_suffixB\xef\x01\n#com.google.ads.googleads.v25.commonB\x0f\x45xtensionsProtoP\x01ZEgoogle.golang.org/genproto/googleapis/ads/googleads/v25/common;common\xa2\x02\x03GAA\xaa\x02\x1fGoogle.Ads.GoogleAds.V25.Common\xca\x02\x1fGoogle\\Ads\\GoogleAds\\V25\\Common\xea\x02#Google::Ads::GoogleAds::V25::Commonb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Common + CallFeedItem = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.CallFeedItem").msgclass + CalloutFeedItem = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.CalloutFeedItem").msgclass + SitelinkFeedItem = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.SitelinkFeedItem").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/common/feed_common_pb.rb b/lib/google/ads/google_ads/v25/common/feed_common_pb.rb new file mode 100644 index 000000000..c05518b39 --- /dev/null +++ b/lib/google/ads/google_ads/v25/common/feed_common_pb.rb @@ -0,0 +1,23 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/common/feed_common.proto + +require 'google/protobuf' + + +descriptor_data = "\n1google/ads/googleads/v25/common/feed_common.proto\x12\x1fgoogle.ads.googleads.v25.common\"c\n\x05Money\x12\x1a\n\rcurrency_code\x18\x03 \x01(\tH\x00\x88\x01\x01\x12\x1a\n\ramount_micros\x18\x04 \x01(\x03H\x01\x88\x01\x01\x42\x10\n\x0e_currency_codeB\x10\n\x0e_amount_microsB\xef\x01\n#com.google.ads.googleads.v25.commonB\x0f\x46\x65\x65\x64\x43ommonProtoP\x01ZEgoogle.golang.org/genproto/googleapis/ads/googleads/v25/common;common\xa2\x02\x03GAA\xaa\x02\x1fGoogle.Ads.GoogleAds.V25.Common\xca\x02\x1fGoogle\\Ads\\GoogleAds\\V25\\Common\xea\x02#Google::Ads::GoogleAds::V25::Commonb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Common + Money = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.Money").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/common/final_app_url_pb.rb b/lib/google/ads/google_ads/v25/common/final_app_url_pb.rb new file mode 100644 index 000000000..fd00f7225 --- /dev/null +++ b/lib/google/ads/google_ads/v25/common/final_app_url_pb.rb @@ -0,0 +1,25 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/common/final_app_url.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/enums/app_url_operating_system_type_pb' + + +descriptor_data = "\n3google/ads/googleads/v25/common/final_app_url.proto\x12\x1fgoogle.ads.googleads.v25.common\x1a\x42google/ads/googleads/v25/enums/app_url_operating_system_type.proto\"\x91\x01\n\x0b\x46inalAppUrl\x12h\n\x07os_type\x18\x01 \x01(\x0e\x32W.google.ads.googleads.v25.enums.AppUrlOperatingSystemTypeEnum.AppUrlOperatingSystemType\x12\x10\n\x03url\x18\x03 \x01(\tH\x00\x88\x01\x01\x42\x06\n\x04_urlB\xf0\x01\n#com.google.ads.googleads.v25.commonB\x10\x46inalAppUrlProtoP\x01ZEgoogle.golang.org/genproto/googleapis/ads/googleads/v25/common;common\xa2\x02\x03GAA\xaa\x02\x1fGoogle.Ads.GoogleAds.V25.Common\xca\x02\x1fGoogle\\Ads\\GoogleAds\\V25\\Common\xea\x02#Google::Ads::GoogleAds::V25::Commonb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Common + FinalAppUrl = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.FinalAppUrl").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/common/frequency_cap_pb.rb b/lib/google/ads/google_ads/v25/common/frequency_cap_pb.rb new file mode 100644 index 000000000..2e4f679b0 --- /dev/null +++ b/lib/google/ads/google_ads/v25/common/frequency_cap_pb.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/common/frequency_cap.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/enums/frequency_cap_event_type_pb' +require 'google/ads/google_ads/v25/enums/frequency_cap_level_pb' +require 'google/ads/google_ads/v25/enums/frequency_cap_time_unit_pb' + + +descriptor_data = "\n3google/ads/googleads/v25/common/frequency_cap.proto\x12\x1fgoogle.ads.googleads.v25.common\x1a=google/ads/googleads/v25/enums/frequency_cap_event_type.proto\x1a\x38google/ads/googleads/v25/enums/frequency_cap_level.proto\x1a\n0auction_insight_search_top_impression_percentage\x18\x87\x02 \x01(\x01H\x1c\x88\x01\x01\x12\x1a\n\x0c\x61verage_cost\x18\xcb\x01 \x01(\x01H\x1d\x88\x01\x01\x12\x19\n\x0b\x61verage_cpc\x18\xcc\x01 \x01(\x01H\x1e\x88\x01\x01\x12\x19\n\x0b\x61verage_cpe\x18\xcd\x01 \x01(\x01H\x1f\x88\x01\x01\x12\x19\n\x0b\x61verage_cpm\x18\xce\x01 \x01(\x01H \x88\x01\x01\x12\"\n\x14trueview_average_cpv\x18\x95\x03 \x01(\x01H!\x88\x01\x01\x12 \n\x12\x61verage_page_views\x18\xd0\x01 \x01(\x01H\"\x88\x01\x01\x12\"\n\x14\x61verage_time_on_site\x18\xd1\x01 \x01(\x01H#\x88\x01\x01\x12\'\n\x19\x62\x65nchmark_average_max_cpc\x18\xd2\x01 \x01(\x01H$\x88\x01\x01\x12.\n biddable_app_install_conversions\x18\xfe\x01 \x01(\x01H%\x88\x01\x01\x12\x33\n%biddable_app_post_install_conversions\x18\xff\x01 \x01(\x01H&\x88\x01\x01\x12:\n,biddable_cohort_app_post_install_conversions\x18\xfa\x02 \x01(\x01H\'\x88\x01\x01\x12\x1b\n\rbenchmark_ctr\x18\xd3\x01 \x01(\x01H(\x88\x01\x01\x12\x19\n\x0b\x62ounce_rate\x18\xd4\x01 \x01(\x01H)\x88\x01\x01\x12\x14\n\x06\x63licks\x18\x83\x01 \x01(\x03H*\x88\x01\x01\x12\x1c\n\x0e\x63ontrol_clicks\x18\xbb\x03 \x01(\x03H+\x88\x01\x01\x12\x1d\n\x0f\x63ombined_clicks\x18\x9c\x01 \x01(\x03H,\x88\x01\x01\x12\'\n\x19\x63ombined_clicks_per_query\x18\x9d\x01 \x01(\x01H-\x88\x01\x01\x12\x1e\n\x10\x63ombined_queries\x18\x9e\x01 \x01(\x03H.\x88\x01\x01\x12\x32\n$content_budget_lost_impression_share\x18\x9f\x01 \x01(\x01H/\x88\x01\x01\x12&\n\x18\x63ontent_impression_share\x18\xa0\x01 \x01(\x01H0\x88\x01\x01\x12\x38\n*conversion_last_received_request_date_time\x18\xa1\x01 \x01(\tH1\x88\x01\x01\x12-\n\x1f\x63onversion_last_conversion_date\x18\xa2\x01 \x01(\tH2\x88\x01\x01\x12\x30\n\"content_rank_lost_impression_share\x18\xa3\x01 \x01(\x01H3\x88\x01\x01\x12\x30\n\"conversions_from_interactions_rate\x18\xa4\x01 \x01(\x01H4\x88\x01\x01\x12\x1f\n\x11\x63onversions_value\x18\xa5\x01 \x01(\x01H5\x88\x01\x01\x12\x32\n$conversions_value_by_conversion_date\x18\xf2\x01 \x01(\x01H6\x88\x01\x01\x12)\n\x1bnew_customer_lifetime_value\x18\xa5\x02 \x01(\x01H7\x88\x01\x01\x12(\n\x1a\x63onversions_value_per_cost\x18\xa6\x01 \x01(\x01H8\x88\x01\x01\x12\x41\n3conversions_from_interactions_value_per_interaction\x18\xa7\x01 \x01(\x01H9\x88\x01\x01\x12\x19\n\x0b\x63onversions\x18\xa8\x01 \x01(\x01H:\x88\x01\x01\x12,\n\x1e\x63onversions_by_conversion_date\x18\xf3\x01 \x01(\x01H;\x88\x01\x01\x12\x19\n\x0b\x63ost_micros\x18\xa9\x01 \x01(\x03H<\x88\x01\x01\x12&\n\x18\x63ost_per_all_conversions\x18\xaa\x01 \x01(\x01H=\x88\x01\x01\x12!\n\x13\x63ost_per_conversion\x18\xab\x01 \x01(\x01H>\x88\x01\x01\x12:\n,cost_per_current_model_attributed_conversion\x18\xac\x01 \x01(\x01H?\x88\x01\x01\x12&\n\x18\x63ross_device_conversions\x18\xad\x01 \x01(\x01H@\x88\x01\x01\x12\x39\n+cross_device_conversions_by_conversion_date\x18\xf4\x02 \x01(\x01HA\x88\x01\x01\x12,\n\x1e\x63ross_device_conversions_value\x18\xfd\x01 \x01(\x01HB\x88\x01\x01\x12\x33\n%cross_device_conversions_value_micros\x18\xb8\x02 \x01(\x03HC\x88\x01\x01\x12?\n1cross_device_conversions_value_by_conversion_date\x18\xf5\x02 \x01(\x01HD\x88\x01\x01\x12\x11\n\x03\x63tr\x18\xae\x01 \x01(\x01HE\x88\x01\x01\x12\x32\n$current_model_attributed_conversions\x18\xaf\x01 \x01(\x01HF\x88\x01\x01\x12I\n;current_model_attributed_conversions_from_interactions_rate\x18\xb0\x01 \x01(\x01HG\x88\x01\x01\x12Z\nLcurrent_model_attributed_conversions_from_interactions_value_per_interaction\x18\xb1\x01 \x01(\x01HH\x88\x01\x01\x12\x38\n*current_model_attributed_conversions_value\x18\xb2\x01 \x01(\x01HI\x88\x01\x01\x12\x41\n3current_model_attributed_conversions_value_per_cost\x18\xb3\x01 \x01(\x01HJ\x88\x01\x01\x12\x1d\n\x0f\x65ngagement_rate\x18\xb4\x01 \x01(\x01HK\x88\x01\x01\x12\x19\n\x0b\x65ngagements\x18\xb5\x01 \x01(\x03HL\x88\x01\x01\x12-\n\x1fhotel_average_lead_value_micros\x18\xd5\x01 \x01(\x01HM\x88\x01\x01\x12*\n\x1chotel_commission_rate_micros\x18\x80\x02 \x01(\x03HN\x88\x01\x01\x12,\n\x1ehotel_expected_commission_cost\x18\x81\x02 \x01(\x01HO\x88\x01\x01\x12/\n!hotel_price_difference_percentage\x18\xd6\x01 \x01(\x01HP\x88\x01\x01\x12(\n\x1ahotel_eligible_impressions\x18\xd7\x01 \x01(\x03HQ\x88\x01\x01\x12t\n!historical_creative_quality_score\x18P \x01(\x0e\x32I.google.ads.googleads.v25.enums.QualityScoreBucketEnum.QualityScoreBucket\x12x\n%historical_landing_page_quality_score\x18Q \x01(\x0e\x32I.google.ads.googleads.v25.enums.QualityScoreBucketEnum.QualityScoreBucket\x12&\n\x18historical_quality_score\x18\xd8\x01 \x01(\x03HR\x88\x01\x01\x12r\n\x1fhistorical_search_predicted_ctr\x18S \x01(\x0e\x32I.google.ads.googleads.v25.enums.QualityScoreBucketEnum.QualityScoreBucket\x12\x1c\n\x0egmail_forwards\x18\xd9\x01 \x01(\x03HS\x88\x01\x01\x12\x19\n\x0bgmail_saves\x18\xda\x01 \x01(\x03HT\x88\x01\x01\x12$\n\x16gmail_secondary_clicks\x18\xdb\x01 \x01(\x03HU\x88\x01\x01\x12*\n\x1cimpressions_from_store_reach\x18\xdc\x01 \x01(\x03HV\x88\x01\x01\x12\x19\n\x0bimpressions\x18\xdd\x01 \x01(\x03HW\x88\x01\x01\x12\x1e\n\x10interaction_rate\x18\xde\x01 \x01(\x01HX\x88\x01\x01\x12\x1a\n\x0cinteractions\x18\xdf\x01 \x01(\x03HY\x88\x01\x01\x12n\n\x17interaction_event_types\x18\x64 \x03(\x0e\x32M.google.ads.googleads.v25.enums.InteractionEventTypeEnum.InteractionEventType\x12 \n\x12invalid_click_rate\x18\xe0\x01 \x01(\x01HZ\x88\x01\x01\x12\x1c\n\x0einvalid_clicks\x18\xe1\x01 \x01(\x03H[\x88\x01\x01\x12(\n\x1ageneral_invalid_click_rate\x18\xf2\x02 \x01(\x01H\\\x88\x01\x01\x12$\n\x16general_invalid_clicks\x18\xf3\x02 \x01(\x03H]\x88\x01\x01\x12\x1b\n\rmessage_chats\x18\xe2\x01 \x01(\x03H^\x88\x01\x01\x12!\n\x13message_impressions\x18\xe3\x01 \x01(\x03H_\x88\x01\x01\x12\x1f\n\x11message_chat_rate\x18\xe4\x01 \x01(\x01H`\x88\x01\x01\x12/\n!mobile_friendly_clicks_percentage\x18\xe5\x01 \x01(\x01Ha\x88\x01\x01\x12\'\n\x19optimization_score_uplift\x18\xf7\x01 \x01(\x01Hb\x88\x01\x01\x12$\n\x16optimization_score_url\x18\xf8\x01 \x01(\tHc\x88\x01\x01\x12\x1c\n\x0eorganic_clicks\x18\xe6\x01 \x01(\x03Hd\x88\x01\x01\x12&\n\x18organic_clicks_per_query\x18\xe7\x01 \x01(\x01He\x88\x01\x01\x12!\n\x13organic_impressions\x18\xe8\x01 \x01(\x03Hf\x88\x01\x01\x12+\n\x1dorganic_impressions_per_query\x18\xe9\x01 \x01(\x01Hg\x88\x01\x01\x12\x1d\n\x0forganic_queries\x18\xea\x01 \x01(\x03Hh\x88\x01\x01\x12\"\n\x14percent_new_visitors\x18\xeb\x01 \x01(\x01Hi\x88\x01\x01\x12\x19\n\x0bphone_calls\x18\xec\x01 \x01(\x03Hj\x88\x01\x01\x12\x1f\n\x11phone_impressions\x18\xed\x01 \x01(\x03Hk\x88\x01\x01\x12 \n\x12phone_through_rate\x18\xee\x01 \x01(\x01Hl\x88\x01\x01\x12\x1a\n\x0crelative_ctr\x18\xef\x01 \x01(\x01Hm\x88\x01\x01\x12\x32\n$search_absolute_top_impression_share\x18\x88\x01 \x01(\x01Hn\x88\x01\x01\x12>\n0search_budget_lost_absolute_top_impression_share\x18\x89\x01 \x01(\x01Ho\x88\x01\x01\x12\x31\n#search_budget_lost_impression_share\x18\x8a\x01 \x01(\x01Hp\x88\x01\x01\x12\x35\n\'search_budget_lost_top_impression_share\x18\x8b\x01 \x01(\x01Hq\x88\x01\x01\x12 \n\x12search_click_share\x18\x8c\x01 \x01(\x01Hr\x88\x01\x01\x12\x31\n#search_exact_match_impression_share\x18\x8d\x01 \x01(\x01Hs\x88\x01\x01\x12%\n\x17search_impression_share\x18\x8e\x01 \x01(\x01Ht\x88\x01\x01\x12<\n.search_rank_lost_absolute_top_impression_share\x18\x8f\x01 \x01(\x01Hu\x88\x01\x01\x12/\n!search_rank_lost_impression_share\x18\x90\x01 \x01(\x01Hv\x88\x01\x01\x12\x33\n%search_rank_lost_top_impression_share\x18\x91\x01 \x01(\x01Hw\x88\x01\x01\x12)\n\x1bsearch_top_impression_share\x18\x92\x01 \x01(\x01Hx\x88\x01\x01\x12O\n\rsearch_volume\x18\xa7\x02 \x01(\x0b\x32\x32.google.ads.googleads.v25.common.SearchVolumeRangeHy\x88\x01\x01\x12\x19\n\x0bspeed_score\x18\x93\x01 \x01(\x03Hz\x88\x01\x01\x12\'\n\x19\x61verage_target_cpa_micros\x18\xa2\x02 \x01(\x03H{\x88\x01\x01\x12!\n\x13\x61verage_target_roas\x18\xfa\x01 \x01(\x01H|\x88\x01\x01\x12\'\n\x19top_impression_percentage\x18\x94\x01 \x01(\x01H}\x88\x01\x01\x12>\n0valid_accelerated_mobile_pages_clicks_percentage\x18\x95\x01 \x01(\x01H~\x88\x01\x01\x12\'\n\x19value_per_all_conversions\x18\x96\x01 \x01(\x01H\x7f\x88\x01\x01\x12;\n,value_per_all_conversions_by_conversion_date\x18\xf4\x01 \x01(\x01H\x80\x01\x88\x01\x01\x12#\n\x14value_per_conversion\x18\x97\x01 \x01(\x01H\x81\x01\x88\x01\x01\x12\x37\n(value_per_conversions_by_conversion_date\x18\xf5\x01 \x01(\x01H\x82\x01\x88\x01\x01\x12<\n-value_per_current_model_attributed_conversion\x18\x98\x01 \x01(\x01H\x83\x01\x88\x01\x01\x12\'\n\x18video_quartile_p100_rate\x18\x84\x01 \x01(\x01H\x84\x01\x88\x01\x01\x12&\n\x17video_quartile_p25_rate\x18\x85\x01 \x01(\x01H\x85\x01\x88\x01\x01\x12&\n\x17video_quartile_p50_rate\x18\x86\x01 \x01(\x01H\x86\x01\x88\x01\x01\x12&\n\x17video_quartile_p75_rate\x18\x87\x01 \x01(\x01H\x87\x01\x88\x01\x01\x12\'\n\x18video_trueview_view_rate\x18\x96\x03 \x01(\x01H\x88\x01\x88\x01\x01\x12#\n\x14video_trueview_views\x18\x97\x03 \x01(\x03H\x89\x01\x88\x01\x01\x12\'\n\x18view_through_conversions\x18\x9b\x01 \x01(\x03H\x8a\x01\x88\x01\x01\x12\x1f\n\x16sk_ad_network_installs\x18\xf6\x01 \x01(\x03\x12(\n\x1fsk_ad_network_total_conversions\x18\xa4\x02 \x01(\x03\x12#\n\x1apublisher_purchased_clicks\x18\x88\x02 \x01(\x03\x12!\n\x18publisher_organic_clicks\x18\x89\x02 \x01(\x03\x12!\n\x18publisher_unknown_clicks\x18\x8a\x02 \x01(\x03\x12@\n1all_conversions_from_location_asset_click_to_call\x18\x8b\x02 \x01(\x01H\x8b\x01\x88\x01\x01\x12=\n.all_conversions_from_location_asset_directions\x18\x8c\x02 \x01(\x01H\x8c\x01\x88\x01\x01\x12\x37\n(all_conversions_from_location_asset_menu\x18\x8d\x02 \x01(\x01H\x8d\x01\x88\x01\x01\x12\x38\n)all_conversions_from_location_asset_order\x18\x8e\x02 \x01(\x01H\x8e\x01\x88\x01\x01\x12\x43\n4all_conversions_from_location_asset_other_engagement\x18\x8f\x02 \x01(\x01H\x8f\x01\x88\x01\x01\x12?\n0all_conversions_from_location_asset_store_visits\x18\x90\x02 \x01(\x01H\x90\x01\x88\x01\x01\x12:\n+all_conversions_from_location_asset_website\x18\x91\x02 \x01(\x01H\x91\x01\x88\x01\x01\x12\x43\n4eligible_impressions_from_location_asset_store_reach\x18\x92\x02 \x01(\x03H\x92\x01\x88\x01\x01\x12I\n:view_through_conversions_from_location_asset_click_to_call\x18\x93\x02 \x01(\x01H\x93\x01\x88\x01\x01\x12\x46\n7view_through_conversions_from_location_asset_directions\x18\x94\x02 \x01(\x01H\x94\x01\x88\x01\x01\x12@\n1view_through_conversions_from_location_asset_menu\x18\x95\x02 \x01(\x01H\x95\x01\x88\x01\x01\x12\x41\n2view_through_conversions_from_location_asset_order\x18\x96\x02 \x01(\x01H\x96\x01\x88\x01\x01\x12L\n=view_through_conversions_from_location_asset_other_engagement\x18\x97\x02 \x01(\x01H\x97\x01\x88\x01\x01\x12H\n9view_through_conversions_from_location_asset_store_visits\x18\x98\x02 \x01(\x01H\x98\x01\x88\x01\x01\x12\x43\n4view_through_conversions_from_location_asset_website\x18\x99\x02 \x01(\x01H\x99\x01\x88\x01\x01\x12\x15\n\x06orders\x18\xa8\x02 \x01(\x01H\x9a\x01\x88\x01\x01\x12)\n\x1a\x61verage_order_value_micros\x18\xa9\x02 \x01(\x03H\x9b\x01\x88\x01\x01\x12 \n\x11\x61verage_cart_size\x18\xaa\x02 \x01(\x01H\x9c\x01\x88\x01\x01\x12(\n\x19\x63ost_of_goods_sold_micros\x18\xab\x02 \x01(\x03H\x9d\x01\x88\x01\x01\x12\"\n\x13gross_profit_micros\x18\xac\x02 \x01(\x03H\x9e\x01\x88\x01\x01\x12\"\n\x13gross_profit_margin\x18\xad\x02 \x01(\x01H\x9f\x01\x88\x01\x01\x12\x1d\n\x0erevenue_micros\x18\xae\x02 \x01(\x03H\xa0\x01\x88\x01\x01\x12\x19\n\nunits_sold\x18\xaf\x02 \x01(\x01H\xa1\x01\x88\x01\x01\x12\x33\n$cross_sell_cost_of_goods_sold_micros\x18\xb0\x02 \x01(\x03H\xa2\x01\x88\x01\x01\x12-\n\x1e\x63ross_sell_gross_profit_micros\x18\xb1\x02 \x01(\x03H\xa3\x01\x88\x01\x01\x12(\n\x19\x63ross_sell_revenue_micros\x18\xb2\x02 \x01(\x03H\xa4\x01\x88\x01\x01\x12$\n\x15\x63ross_sell_units_sold\x18\xb3\x02 \x01(\x01H\xa5\x01\x88\x01\x01\x12-\n\x1elead_cost_of_goods_sold_micros\x18\xb4\x02 \x01(\x03H\xa6\x01\x88\x01\x01\x12\'\n\x18lead_gross_profit_micros\x18\xb5\x02 \x01(\x03H\xa7\x01\x88\x01\x01\x12\"\n\x13lead_revenue_micros\x18\xb6\x02 \x01(\x03H\xa8\x01\x88\x01\x01\x12\x1e\n\x0flead_units_sold\x18\xb7\x02 \x01(\x01H\xa9\x01\x88\x01\x01\x12\x1b\n\x0cunique_users\x18\xbf\x02 \x01(\x03H\xaa\x01\x88\x01\x01\x12\x34\n%average_impression_frequency_per_user\x18\xc0\x02 \x01(\x01H\xab\x01\x88\x01\x01\x12$\n\x15linked_entities_count\x18\xd5\x02 \x01(\x03H\xac\x01\x88\x01\x01\x12\x1f\n\x16linked_sample_entities\x18\xd6\x02 \x03(\t\x12\'\n\x18\x61sset_pinned_total_count\x18\xdc\x02 \x01(\x03H\xad\x01\x88\x01\x01\x12:\n+asset_pinned_as_headline_position_one_count\x18\xdd\x02 \x01(\x03H\xae\x01\x88\x01\x01\x12:\n+asset_pinned_as_headline_position_two_count\x18\xde\x02 \x01(\x03H\xaf\x01\x88\x01\x01\x12<\n-asset_pinned_as_headline_position_three_count\x18\xdf\x02 \x01(\x03H\xb0\x01\x88\x01\x01\x12=\n.asset_pinned_as_description_position_one_count\x18\xe0\x02 \x01(\x03H\xb1\x01\x88\x01\x01\x12=\n.asset_pinned_as_description_position_two_count\x18\xe1\x02 \x01(\x03H\xb2\x01\x88\x01\x01\x12\x43\n4store_visits_last_click_model_attributed_conversions\x18\xed\x02 \x01(\x01H\xb3\x01\x88\x01\x01\x12+\n\x1cresults_conversions_purchase\x18\xee\x02 \x01(\x01H\xb4\x01\x88\x01\x01\x12/\n video_trueview_view_rate_in_feed\x18\x98\x03 \x01(\x01H\xb5\x01\x88\x01\x01\x12\x31\n\"video_trueview_view_rate_in_stream\x18\x99\x03 \x01(\x01H\xb6\x01\x88\x01\x01\x12.\n\x1fvideo_trueview_view_rate_shorts\x18\x9a\x03 \x01(\x01H\xb7\x01\x88\x01\x01\x12#\n\x14\x63oviewed_impressions\x18\xfc\x02 \x01(\x03H\xb8\x01\x88\x01\x01\x12\"\n\x13primary_impressions\x18\xfd\x02 \x01(\x03H\xb9\x01\x88\x01\x01\x12\x45\n6platform_comparable_conversions_from_interactions_rate\x18\xfe\x02 \x01(\x01H\xba\x01\x88\x01\x01\x12.\n\x1fplatform_comparable_conversions\x18\xff\x02 \x01(\x01H\xbb\x01\x88\x01\x01\x12\x34\n%platform_comparable_conversions_value\x18\x80\x03 \x01(\x01H\xbc\x01\x88\x01\x01\x12=\n.platform_comparable_conversions_value_per_cost\x18\x81\x03 \x01(\x01H\xbd\x01\x88\x01\x01\x12\x41\n2platform_comparable_conversions_by_conversion_date\x18\x82\x03 \x01(\x01H\xbe\x01\x88\x01\x01\x12G\n8platform_comparable_conversions_value_by_conversion_date\x18\x83\x03 \x01(\x01H\xbf\x01\x88\x01\x01\x12V\nGplatform_comparable_conversions_from_interactions_value_per_interaction\x18\x84\x03 \x01(\x01H\xc0\x01\x88\x01\x01\x12\x36\n\'cost_per_platform_comparable_conversion\x18\x85\x03 \x01(\x01H\xc1\x01\x88\x01\x01\x12\x37\n(value_per_platform_comparable_conversion\x18\x86\x03 \x01(\x01H\xc2\x01\x88\x01\x01\x12K\n\n/conversion_value_per_cost_change_point_estimate\x18\xc9\x03 \x01(\x01H\xfc\x01\x88\x01\x01\x12\"\n\x13\x63ontrol_cost_micros\x18\xca\x03 \x01(\x03H\xfd\x01\x88\x01\x01\x12*\n\x1b\x63ost_micros_margin_of_error\x18\xcb\x03 \x01(\x01H\xfe\x01\x88\x01\x01\x12\"\n\x13\x63ost_micros_p_value\x18\xcc\x03 \x01(\x01H\xff\x01\x88\x01\x01\x12\x30\n!cost_micros_change_point_estimate\x18\xcd\x03 \x01(\x01H\x80\x02\x88\x01\x01\x12\"\n\x13\x63ontrol_impressions\x18\xce\x03 \x01(\x03H\x81\x02\x88\x01\x01\x12*\n\x1bimpressions_margin_of_error\x18\xcf\x03 \x01(\x01H\x82\x02\x88\x01\x01\x12\"\n\x13impressions_p_value\x18\xd0\x03 \x01(\x01H\x83\x02\x88\x01\x01\x12)\n\x1aimpressions_point_estimate\x18\xd1\x03 \x01(\x01H\x84\x02\x88\x01\x01\x12%\n\x16\x63licks_margin_of_error\x18\xd2\x03 \x01(\x01H\x85\x02\x88\x01\x01\x12\x1d\n\x0e\x63licks_p_value\x18\xd3\x03 \x01(\x01H\x86\x02\x88\x01\x01\x12$\n\x15\x63licks_point_estimate\x18\xd4\x03 \x01(\x01H\x87\x02\x88\x01\x01\x12\'\n\x18\x63ontrol_conversion_value\x18\xd5\x03 \x01(\x01H\x88\x02\x88\x01\x01\x12/\n conversion_value_margin_of_error\x18\xd6\x03 \x01(\x01H\x89\x02\x88\x01\x01\x12\'\n\x18\x63onversion_value_p_value\x18\xd7\x03 \x01(\x01H\x8a\x02\x88\x01\x01\x12\x35\n&conversion_value_change_point_estimate\x18\xd8\x03 \x01(\x01H\x8b\x02\x88\x01\x01\x12\x1f\n\x10youtube_comments\x18\x90\x04 \x01(\x03H\x8c\x02\x88\x01\x01\x12\x1c\n\ryoutube_likes\x18\x91\x04 \x01(\x03H\x8d\x02\x88\x01\x01\x12\x1d\n\x0eyoutube_shares\x18\x92\x04 \x01(\x03H\x8e\x02\x88\x01\x01\x42%\n#_absolute_top_impression_percentageB\x12\n\x10_active_view_cpmB\x12\n\x10_active_view_ctrB\x1a\n\x18_active_view_impressionsB\x1c\n\x1a_active_view_measurabilityB%\n#_active_view_measurable_cost_microsB%\n#_active_view_measurable_impressionsB\x1a\n\x18_active_view_viewabilityB)\n\'_all_conversions_from_interactions_rateB\x18\n\x16_all_conversions_valueB+\n)_all_conversions_value_by_conversion_dateB\"\n _all_new_customer_lifetime_valueB\x12\n\x10_all_conversionsB%\n#_all_conversions_by_conversion_dateB!\n\x1f_all_conversions_value_per_costB%\n#_all_conversions_from_click_to_callB\"\n _all_conversions_from_directionsB:\n8_all_conversions_from_interactions_value_per_interactionB\x1c\n\x1a_all_conversions_from_menuB\x1d\n\x1b_all_conversions_from_orderB(\n&_all_conversions_from_other_engagementB#\n!_all_conversions_from_store_visitB%\n#_all_conversions_from_store_websiteB<\n:_auction_insight_search_absolute_top_impression_percentageB*\n(_auction_insight_search_impression_shareB*\n(_auction_insight_search_outranking_shareB&\n$_auction_insight_search_overlap_rateB-\n+_auction_insight_search_position_above_rateB3\n1_auction_insight_search_top_impression_percentageB\x0f\n\r_average_costB\x0e\n\x0c_average_cpcB\x0e\n\x0c_average_cpeB\x0e\n\x0c_average_cpmB\x17\n\x15_trueview_average_cpvB\x15\n\x13_average_page_viewsB\x17\n\x15_average_time_on_siteB\x1c\n\x1a_benchmark_average_max_cpcB#\n!_biddable_app_install_conversionsB(\n&_biddable_app_post_install_conversionsB/\n-_biddable_cohort_app_post_install_conversionsB\x10\n\x0e_benchmark_ctrB\x0e\n\x0c_bounce_rateB\t\n\x07_clicksB\x11\n\x0f_control_clicksB\x12\n\x10_combined_clicksB\x1c\n\x1a_combined_clicks_per_queryB\x13\n\x11_combined_queriesB\'\n%_content_budget_lost_impression_shareB\x1b\n\x19_content_impression_shareB-\n+_conversion_last_received_request_date_timeB\"\n _conversion_last_conversion_dateB%\n#_content_rank_lost_impression_shareB%\n#_conversions_from_interactions_rateB\x14\n\x12_conversions_valueB\'\n%_conversions_value_by_conversion_dateB\x1e\n\x1c_new_customer_lifetime_valueB\x1d\n\x1b_conversions_value_per_costB6\n4_conversions_from_interactions_value_per_interactionB\x0e\n\x0c_conversionsB!\n\x1f_conversions_by_conversion_dateB\x0e\n\x0c_cost_microsB\x1b\n\x19_cost_per_all_conversionsB\x16\n\x14_cost_per_conversionB/\n-_cost_per_current_model_attributed_conversionB\x1b\n\x19_cross_device_conversionsB.\n,_cross_device_conversions_by_conversion_dateB!\n\x1f_cross_device_conversions_valueB(\n&_cross_device_conversions_value_microsB4\n2_cross_device_conversions_value_by_conversion_dateB\x06\n\x04_ctrB\'\n%_current_model_attributed_conversionsB>\n<_current_model_attributed_conversions_from_interactions_rateBO\nM_current_model_attributed_conversions_from_interactions_value_per_interactionB-\n+_current_model_attributed_conversions_valueB6\n4_current_model_attributed_conversions_value_per_costB\x12\n\x10_engagement_rateB\x0e\n\x0c_engagementsB\"\n _hotel_average_lead_value_microsB\x1f\n\x1d_hotel_commission_rate_microsB!\n\x1f_hotel_expected_commission_costB$\n\"_hotel_price_difference_percentageB\x1d\n\x1b_hotel_eligible_impressionsB\x1b\n\x19_historical_quality_scoreB\x11\n\x0f_gmail_forwardsB\x0e\n\x0c_gmail_savesB\x19\n\x17_gmail_secondary_clicksB\x1f\n\x1d_impressions_from_store_reachB\x0e\n\x0c_impressionsB\x13\n\x11_interaction_rateB\x0f\n\r_interactionsB\x15\n\x13_invalid_click_rateB\x11\n\x0f_invalid_clicksB\x1d\n\x1b_general_invalid_click_rateB\x19\n\x17_general_invalid_clicksB\x10\n\x0e_message_chatsB\x16\n\x14_message_impressionsB\x14\n\x12_message_chat_rateB$\n\"_mobile_friendly_clicks_percentageB\x1c\n\x1a_optimization_score_upliftB\x19\n\x17_optimization_score_urlB\x11\n\x0f_organic_clicksB\x1b\n\x19_organic_clicks_per_queryB\x16\n\x14_organic_impressionsB \n\x1e_organic_impressions_per_queryB\x12\n\x10_organic_queriesB\x17\n\x15_percent_new_visitorsB\x0e\n\x0c_phone_callsB\x14\n\x12_phone_impressionsB\x15\n\x13_phone_through_rateB\x0f\n\r_relative_ctrB\'\n%_search_absolute_top_impression_shareB3\n1_search_budget_lost_absolute_top_impression_shareB&\n$_search_budget_lost_impression_shareB*\n(_search_budget_lost_top_impression_shareB\x15\n\x13_search_click_shareB&\n$_search_exact_match_impression_shareB\x1a\n\x18_search_impression_shareB1\n/_search_rank_lost_absolute_top_impression_shareB$\n\"_search_rank_lost_impression_shareB(\n&_search_rank_lost_top_impression_shareB\x1e\n\x1c_search_top_impression_shareB\x10\n\x0e_search_volumeB\x0e\n\x0c_speed_scoreB\x1c\n\x1a_average_target_cpa_microsB\x16\n\x14_average_target_roasB\x1c\n\x1a_top_impression_percentageB3\n1_valid_accelerated_mobile_pages_clicks_percentageB\x1c\n\x1a_value_per_all_conversionsB/\n-_value_per_all_conversions_by_conversion_dateB\x17\n\x15_value_per_conversionB+\n)_value_per_conversions_by_conversion_dateB0\n._value_per_current_model_attributed_conversionB\x1b\n\x19_video_quartile_p100_rateB\x1a\n\x18_video_quartile_p25_rateB\x1a\n\x18_video_quartile_p50_rateB\x1a\n\x18_video_quartile_p75_rateB\x1b\n\x19_video_trueview_view_rateB\x17\n\x15_video_trueview_viewsB\x1b\n\x19_view_through_conversionsB4\n2_all_conversions_from_location_asset_click_to_callB1\n/_all_conversions_from_location_asset_directionsB+\n)_all_conversions_from_location_asset_menuB,\n*_all_conversions_from_location_asset_orderB7\n5_all_conversions_from_location_asset_other_engagementB3\n1_all_conversions_from_location_asset_store_visitsB.\n,_all_conversions_from_location_asset_websiteB7\n5_eligible_impressions_from_location_asset_store_reachB=\n;_view_through_conversions_from_location_asset_click_to_callB:\n8_view_through_conversions_from_location_asset_directionsB4\n2_view_through_conversions_from_location_asset_menuB5\n3_view_through_conversions_from_location_asset_orderB@\n>_view_through_conversions_from_location_asset_other_engagementB<\n:_view_through_conversions_from_location_asset_store_visitsB7\n5_view_through_conversions_from_location_asset_websiteB\t\n\x07_ordersB\x1d\n\x1b_average_order_value_microsB\x14\n\x12_average_cart_sizeB\x1c\n\x1a_cost_of_goods_sold_microsB\x16\n\x14_gross_profit_microsB\x16\n\x14_gross_profit_marginB\x11\n\x0f_revenue_microsB\r\n\x0b_units_soldB\'\n%_cross_sell_cost_of_goods_sold_microsB!\n\x1f_cross_sell_gross_profit_microsB\x1c\n\x1a_cross_sell_revenue_microsB\x18\n\x16_cross_sell_units_soldB!\n\x1f_lead_cost_of_goods_sold_microsB\x1b\n\x19_lead_gross_profit_microsB\x16\n\x14_lead_revenue_microsB\x12\n\x10_lead_units_soldB\x0f\n\r_unique_usersB(\n&_average_impression_frequency_per_userB\x18\n\x16_linked_entities_countB\x1b\n\x19_asset_pinned_total_countB.\n,_asset_pinned_as_headline_position_one_countB.\n,_asset_pinned_as_headline_position_two_countB0\n._asset_pinned_as_headline_position_three_countB1\n/_asset_pinned_as_description_position_one_countB1\n/_asset_pinned_as_description_position_two_countB7\n5_store_visits_last_click_model_attributed_conversionsB\x1f\n\x1d_results_conversions_purchaseB#\n!_video_trueview_view_rate_in_feedB%\n#_video_trueview_view_rate_in_streamB\"\n _video_trueview_view_rate_shortsB\x17\n\x15_coviewed_impressionsB\x16\n\x14_primary_impressionsB9\n7_platform_comparable_conversions_from_interactions_rateB\"\n _platform_comparable_conversionsB(\n&_platform_comparable_conversions_valueB1\n/_platform_comparable_conversions_value_per_costB5\n3_platform_comparable_conversions_by_conversion_dateB;\n9_platform_comparable_conversions_value_by_conversion_dateBJ\nH_platform_comparable_conversions_from_interactions_value_per_interactionB*\n(_cost_per_platform_comparable_conversionB+\n)_value_per_platform_comparable_conversionB?\n=_value_per_platform_comparable_conversions_by_conversion_dateB=\n;_cost_converted_currency_per_platform_comparable_conversionB\x18\n\x16_unique_users_two_plusB\x1a\n\x18_unique_users_three_plusB\x19\n\x17_unique_users_four_plusB\x19\n\x17_unique_users_five_plusB\x18\n\x16_unique_users_ten_plusB\x13\n\x11_value_adjustmentB\x17\n\x15_all_value_adjustmentB\x1f\n\x1d_clicks_unique_query_clustersB$\n\"_conversions_unique_query_clustersB$\n\"_impressions_unique_query_clustersB#\n!_video_watch_time_duration_millisB+\n)_average_video_watch_time_duration_millisB\x06\n\x04_svrB0\n._active_view_audibility_measurable_impressionsB5\n3_active_view_audibility_measurable_impressions_rateB=\n;_active_view_audibility_invalid_measurable_impressions_rateBB\n@_active_view_audibility_invalid_givt_measurable_impressions_rateB\"\n _active_view_audible_impressionsB\'\n%_active_view_audible_impressions_rateB.\n,_active_view_audible_two_seconds_impressionsB3\n1_active_view_audible_two_seconds_impressions_rateB1\n/_active_view_audible_thirty_seconds_impressionsB6\n4_active_view_audible_thirty_seconds_impressions_rateB(\n&_active_view_audible_quartile_p25_rateB(\n&_active_view_audible_quartile_p50_rateB(\n&_active_view_audible_quartile_p75_rateB)\n\'_active_view_audible_quartile_p100_rateB;\n9_biddable_indirect_install_first_in_app_conversion_microsB\x18\n\x16_all_average_cart_sizeB!\n\x1f_all_average_order_value_microsB \n\x1e_all_cost_of_goods_sold_microsB+\n)_all_cross_sell_cost_of_goods_sold_microsB%\n#_all_cross_sell_gross_profit_microsB \n\x1e_all_cross_sell_revenue_microsB\x1c\n\x1a_all_cross_sell_units_soldB\x1a\n\x18_all_gross_profit_marginB\x1a\n\x18_all_gross_profit_microsB%\n#_all_lead_cost_of_goods_sold_microsB\x1f\n\x1d_all_lead_gross_profit_microsB\x1a\n\x18_all_lead_revenue_microsB\x16\n\x14_all_lead_units_soldB\r\n\x0b_all_ordersB\x15\n\x13_all_revenue_microsB\x11\n\x0f_all_units_soldB\x1e\n\x1c_control_cost_per_conversionB&\n$_cost_per_conversion_margin_of_errorB\x1e\n\x1c_cost_per_conversion_p_valueB,\n*_cost_per_conversion_change_point_estimateB\x16\n\x14_control_conversionsB.\n,_conversions_absolute_change_margin_of_errorB&\n$_conversions_absolute_change_p_valueB-\n+_conversions_absolute_change_point_estimateB$\n\"_control_conversion_value_per_costB,\n*_conversion_value_per_cost_margin_of_errorB$\n\"_conversion_value_per_cost_p_valueB2\n0_conversion_value_per_cost_change_point_estimateB\x16\n\x14_control_cost_microsB\x1e\n\x1c_cost_micros_margin_of_errorB\x16\n\x14_cost_micros_p_valueB$\n\"_cost_micros_change_point_estimateB\x16\n\x14_control_impressionsB\x1e\n\x1c_impressions_margin_of_errorB\x16\n\x14_impressions_p_valueB\x1d\n\x1b_impressions_point_estimateB\x19\n\x17_clicks_margin_of_errorB\x11\n\x0f_clicks_p_valueB\x18\n\x16_clicks_point_estimateB\x1b\n\x19_control_conversion_valueB#\n!_conversion_value_margin_of_errorB\x1b\n\x19_conversion_value_p_valueB)\n\'_conversion_value_change_point_estimateB\x13\n\x11_youtube_commentsB\x10\n\x0e_youtube_likesB\x11\n\x0f_youtube_shares\"G\n\x11SearchVolumeRange\x12\x10\n\x03min\x18\x01 \x01(\x03H\x00\x88\x01\x01\x12\x10\n\x03max\x18\x02 \x01(\x03H\x01\x88\x01\x01\x42\x06\n\x04_minB\x06\n\x04_maxB\xec\x01\n#com.google.ads.googleads.v25.commonB\x0cMetricsProtoP\x01ZEgoogle.golang.org/genproto/googleapis/ads/googleads/v25/common;common\xa2\x02\x03GAA\xaa\x02\x1fGoogle.Ads.GoogleAds.V25.Common\xca\x02\x1fGoogle\\Ads\\GoogleAds\\V25\\Common\xea\x02#Google::Ads::GoogleAds::V25::Commonb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Common + Metrics = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.Metrics").msgclass + SearchVolumeRange = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.SearchVolumeRange").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/common/offline_user_data_pb.rb b/lib/google/ads/google_ads/v25/common/offline_user_data_pb.rb new file mode 100644 index 000000000..42fb0423b --- /dev/null +++ b/lib/google/ads/google_ads/v25/common/offline_user_data_pb.rb @@ -0,0 +1,39 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/common/offline_user_data.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/common/consent_pb' +require 'google/ads/google_ads/v25/enums/user_identifier_source_pb' +require 'google/api/field_behavior_pb' + + +descriptor_data = "\n7google/ads/googleads/v25/common/offline_user_data.proto\x12\x1fgoogle.ads.googleads.v25.common\x1a-google/ads/googleads/v25/common/consent.proto\x1a;google/ads/googleads/v25/enums/user_identifier_source.proto\x1a\x1fgoogle/api/field_behavior.proto\"\xd0\x02\n\x16OfflineUserAddressInfo\x12\x1e\n\x11hashed_first_name\x18\x07 \x01(\tH\x00\x88\x01\x01\x12\x1d\n\x10hashed_last_name\x18\x08 \x01(\tH\x01\x88\x01\x01\x12\x11\n\x04\x63ity\x18\t \x01(\tH\x02\x88\x01\x01\x12\x12\n\x05state\x18\n \x01(\tH\x03\x88\x01\x01\x12\x19\n\x0c\x63ountry_code\x18\x0b \x01(\tH\x04\x88\x01\x01\x12\x18\n\x0bpostal_code\x18\x0c \x01(\tH\x05\x88\x01\x01\x12\"\n\x15hashed_street_address\x18\r \x01(\tH\x06\x88\x01\x01\x42\x14\n\x12_hashed_first_nameB\x13\n\x11_hashed_last_nameB\x07\n\x05_cityB\x08\n\x06_stateB\x0f\n\r_country_codeB\x0e\n\x0c_postal_codeB\x18\n\x16_hashed_street_address\"\xc9\x02\n\x0eUserIdentifier\x12m\n\x16user_identifier_source\x18\x06 \x01(\x0e\x32M.google.ads.googleads.v25.enums.UserIdentifierSourceEnum.UserIdentifierSource\x12\x16\n\x0chashed_email\x18\x07 \x01(\tH\x00\x12\x1d\n\x13hashed_phone_number\x18\x08 \x01(\tH\x00\x12\x13\n\tmobile_id\x18\t \x01(\tH\x00\x12\x1d\n\x13third_party_user_id\x18\n \x01(\tH\x00\x12O\n\x0c\x61\x64\x64ress_info\x18\x05 \x01(\x0b\x32\x37.google.ads.googleads.v25.common.OfflineUserAddressInfoH\x00\x42\x0c\n\nidentifier\"\xe0\x03\n\x14TransactionAttribute\x12\"\n\x15transaction_date_time\x18\x08 \x01(\tH\x00\x88\x01\x01\x12&\n\x19transaction_amount_micros\x18\t \x01(\x01H\x01\x88\x01\x01\x12\x1a\n\rcurrency_code\x18\n \x01(\tH\x02\x88\x01\x01\x12\x1e\n\x11\x63onversion_action\x18\x0b \x01(\tH\x03\x88\x01\x01\x12\x15\n\x08order_id\x18\x0c \x01(\tH\x04\x88\x01\x01\x12H\n\x0fstore_attribute\x18\x06 \x01(\x0b\x32/.google.ads.googleads.v25.common.StoreAttribute\x12\x19\n\x0c\x63ustom_value\x18\r \x01(\tH\x05\x88\x01\x01\x12\x46\n\x0eitem_attribute\x18\x0e \x01(\x0b\x32..google.ads.googleads.v25.common.ItemAttributeB\x18\n\x16_transaction_date_timeB\x1c\n\x1a_transaction_amount_microsB\x10\n\x0e_currency_codeB\x14\n\x12_conversion_actionB\x0b\n\t_order_idB\x0f\n\r_custom_value\"8\n\x0eStoreAttribute\x12\x17\n\nstore_code\x18\x02 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_store_code\"\x89\x01\n\rItemAttribute\x12\x0f\n\x07item_id\x18\x01 \x01(\t\x12\x18\n\x0bmerchant_id\x18\x02 \x01(\x03H\x00\x88\x01\x01\x12\x14\n\x0c\x63ountry_code\x18\x03 \x01(\t\x12\x15\n\rlanguage_code\x18\x04 \x01(\t\x12\x10\n\x08quantity\x18\x05 \x01(\x03\x42\x0e\n\x0c_merchant_id\"\xbf\x02\n\x08UserData\x12I\n\x10user_identifiers\x18\x01 \x03(\x0b\x32/.google.ads.googleads.v25.common.UserIdentifier\x12T\n\x15transaction_attribute\x18\x02 \x01(\x0b\x32\x35.google.ads.googleads.v25.common.TransactionAttribute\x12\x46\n\x0euser_attribute\x18\x03 \x01(\x0b\x32..google.ads.googleads.v25.common.UserAttribute\x12>\n\x07\x63onsent\x18\x04 \x01(\x0b\x32(.google.ads.googleads.v25.common.ConsentH\x00\x88\x01\x01\x42\n\n\x08_consent\"\x8c\x04\n\rUserAttribute\x12\"\n\x15lifetime_value_micros\x18\x01 \x01(\x03H\x00\x88\x01\x01\x12\"\n\x15lifetime_value_bucket\x18\x02 \x01(\x05H\x01\x88\x01\x01\x12\x1f\n\x17last_purchase_date_time\x18\x03 \x01(\t\x12\x1e\n\x16\x61verage_purchase_count\x18\x04 \x01(\x05\x12%\n\x1d\x61verage_purchase_value_micros\x18\x05 \x01(\x03\x12\x1d\n\x15\x61\x63quisition_date_time\x18\x06 \x01(\t\x12O\n\x10shopping_loyalty\x18\x07 \x01(\x0b\x32\x30.google.ads.googleads.v25.common.ShoppingLoyaltyH\x02\x88\x01\x01\x12\x1c\n\x0flifecycle_stage\x18\x08 \x01(\tB\x03\xe0\x41\x01\x12%\n\x18\x66irst_purchase_date_time\x18\t \x01(\tB\x03\xe0\x41\x01\x12M\n\x0f\x65vent_attribute\x18\n \x03(\x0b\x32/.google.ads.googleads.v25.common.EventAttributeB\x03\xe0\x41\x01\x42\x18\n\x16_lifetime_value_microsB\x18\n\x16_lifetime_value_bucketB\x13\n\x11_shopping_loyalty\"\x94\x01\n\x0e\x45ventAttribute\x12\x12\n\x05\x65vent\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x1c\n\x0f\x65vent_date_time\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12P\n\x0eitem_attribute\x18\x03 \x03(\x0b\x32\x33.google.ads.googleads.v25.common.EventItemAttributeB\x03\xe0\x41\x02\"*\n\x12\x45ventItemAttribute\x12\x14\n\x07item_id\x18\x01 \x01(\tB\x03\xe0\x41\x01\"=\n\x0fShoppingLoyalty\x12\x19\n\x0cloyalty_tier\x18\x01 \x01(\tH\x00\x88\x01\x01\x42\x0f\n\r_loyalty_tier\"\x91\x01\n\x1d\x43ustomerMatchUserListMetadata\x12\x16\n\tuser_list\x18\x02 \x01(\tH\x00\x88\x01\x01\x12>\n\x07\x63onsent\x18\x03 \x01(\x0b\x32(.google.ads.googleads.v25.common.ConsentH\x01\x88\x01\x01\x42\x0c\n\n_user_listB\n\n\x08_consent\"\x97\x02\n\x12StoreSalesMetadata\x12\x1d\n\x10loyalty_fraction\x18\x05 \x01(\x01H\x00\x88\x01\x01\x12(\n\x1btransaction_upload_fraction\x18\x06 \x01(\x01H\x01\x88\x01\x01\x12\x17\n\ncustom_key\x18\x07 \x01(\tH\x02\x88\x01\x01\x12[\n\x14third_party_metadata\x18\x03 \x01(\x0b\x32=.google.ads.googleads.v25.common.StoreSalesThirdPartyMetadataB\x13\n\x11_loyalty_fractionB\x1e\n\x1c_transaction_upload_fractionB\r\n\x0b_custom_key\"\x98\x03\n\x1cStoreSalesThirdPartyMetadata\x12(\n\x1b\x61\x64vertiser_upload_date_time\x18\x07 \x01(\tH\x00\x88\x01\x01\x12\'\n\x1avalid_transaction_fraction\x18\x08 \x01(\x01H\x01\x88\x01\x01\x12#\n\x16partner_match_fraction\x18\t \x01(\x01H\x02\x88\x01\x01\x12$\n\x17partner_upload_fraction\x18\n \x01(\x01H\x03\x88\x01\x01\x12\"\n\x15\x62ridge_map_version_id\x18\x0b \x01(\tH\x04\x88\x01\x01\x12\x17\n\npartner_id\x18\x0c \x01(\x03H\x05\x88\x01\x01\x42\x1e\n\x1c_advertiser_upload_date_timeB\x1d\n\x1b_valid_transaction_fractionB\x19\n\x17_partner_match_fractionB\x1a\n\x18_partner_upload_fractionB\x18\n\x16_bridge_map_version_idB\r\n\x0b_partner_idB\xf4\x01\n#com.google.ads.googleads.v25.commonB\x14OfflineUserDataProtoP\x01ZEgoogle.golang.org/genproto/googleapis/ads/googleads/v25/common;common\xa2\x02\x03GAA\xaa\x02\x1fGoogle.Ads.GoogleAds.V25.Common\xca\x02\x1fGoogle\\Ads\\GoogleAds\\V25\\Common\xea\x02#Google::Ads::GoogleAds::V25::Commonb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Common + OfflineUserAddressInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.OfflineUserAddressInfo").msgclass + UserIdentifier = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.UserIdentifier").msgclass + TransactionAttribute = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.TransactionAttribute").msgclass + StoreAttribute = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.StoreAttribute").msgclass + ItemAttribute = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.ItemAttribute").msgclass + UserData = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.UserData").msgclass + UserAttribute = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.UserAttribute").msgclass + EventAttribute = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.EventAttribute").msgclass + EventItemAttribute = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.EventItemAttribute").msgclass + ShoppingLoyalty = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.ShoppingLoyalty").msgclass + CustomerMatchUserListMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.CustomerMatchUserListMetadata").msgclass + StoreSalesMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.StoreSalesMetadata").msgclass + StoreSalesThirdPartyMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.StoreSalesThirdPartyMetadata").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/common/policy_pb.rb b/lib/google/ads/google_ads/v25/common/policy_pb.rb new file mode 100644 index 000000000..e0e412061 --- /dev/null +++ b/lib/google/ads/google_ads/v25/common/policy_pb.rb @@ -0,0 +1,40 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/common/policy.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/enums/policy_topic_entry_type_pb' +require 'google/ads/google_ads/v25/enums/policy_topic_evidence_destination_mismatch_url_type_pb' +require 'google/ads/google_ads/v25/enums/policy_topic_evidence_destination_not_working_device_pb' +require 'google/ads/google_ads/v25/enums/policy_topic_evidence_destination_not_working_dns_error_type_pb' + + +descriptor_data = "\n,google/ads/googleads/v25/common/policy.proto\x12\x1fgoogle.ads.googleads.v25.common\x1a\x88\x01\x01\x12,\n\x1eproduct_sold_custom_attribute1\x18\xae\x01 \x01(\tH?\x88\x01\x01\x12,\n\x1eproduct_sold_custom_attribute2\x18\xaf\x01 \x01(\tH@\x88\x01\x01\x12,\n\x1eproduct_sold_custom_attribute3\x18\xb0\x01 \x01(\tHA\x88\x01\x01\x12,\n\x1eproduct_sold_custom_attribute4\x18\xb1\x01 \x01(\tHB\x88\x01\x01\x12\"\n\x14product_sold_item_id\x18\xb2\x01 \x01(\tHC\x88\x01\x01\x12 \n\x12product_sold_title\x18\xb3\x01 \x01(\tHD\x88\x01\x01\x12\"\n\x14product_sold_type_l1\x18\xb4\x01 \x01(\tHE\x88\x01\x01\x12\"\n\x14product_sold_type_l2\x18\xb5\x01 \x01(\tHF\x88\x01\x01\x12\"\n\x14product_sold_type_l3\x18\xb6\x01 \x01(\tHG\x88\x01\x01\x12\"\n\x14product_sold_type_l4\x18\xb7\x01 \x01(\tHH\x88\x01\x01\x12\"\n\x14product_sold_type_l5\x18\xb8\x01 \x01(\tHI\x88\x01\x01\x12\x1d\n\x10product_store_id\x18j \x01(\tHJ\x88\x01\x01\x12\x1a\n\rproduct_title\x18k \x01(\tHK\x88\x01\x01\x12\x1c\n\x0fproduct_type_l1\x18l \x01(\tHL\x88\x01\x01\x12\x1c\n\x0fproduct_type_l2\x18m \x01(\tHM\x88\x01\x01\x12\x1c\n\x0fproduct_type_l3\x18n \x01(\tHN\x88\x01\x01\x12\x1c\n\x0fproduct_type_l4\x18o \x01(\tHO\x88\x01\x01\x12\x1c\n\x0fproduct_type_l5\x18p \x01(\tHP\x88\x01\x01\x12\x15\n\x07quarter\x18\x80\x01 \x01(\tHQ\x88\x01\x01\x12%\n\x17travel_destination_city\x18\xc1\x01 \x01(\tHR\x88\x01\x01\x12(\n\x1atravel_destination_country\x18\xc2\x01 \x01(\tHS\x88\x01\x01\x12\'\n\x19travel_destination_region\x18\xc3\x01 \x01(\tHT\x88\x01\x01\x12:\n,vertical_ads_event_participant_display_names\x18\xcd\x01 \x01(\tHU\x88\x01\x01\x12&\n\x18vertical_ads_hotel_class\x18\xce\x01 \x01(\x03HV\x88\x01\x01\x12\"\n\x14vertical_ads_listing\x18\xcf\x01 \x01(\tHW\x88\x01\x01\x12(\n\x1avertical_ads_listing_brand\x18\xd0\x01 \x01(\tHX\x88\x01\x01\x12\'\n\x19vertical_ads_listing_city\x18\xd1\x01 \x01(\tHY\x88\x01\x01\x12*\n\x1cvertical_ads_listing_country\x18\xd2\x01 \x01(\tHZ\x88\x01\x01\x12)\n\x1bvertical_ads_listing_region\x18\xd3\x01 \x01(\tH[\x88\x01\x01\x12.\n vertical_ads_listing_user_rating\x18\xdc\x01 \x01(\x03H\\\x88\x01\x01\x12(\n\x1avertical_ads_listing_venue\x18\xdd\x01 \x01(\tH]\x88\x01\x01\x12*\n\x1cvertical_ads_partner_account\x18\xd4\x01 \x01(\x03H^\x88\x01\x01\x12\x80\x01\n\x15vertical_ads_vertical\x18\xd5\x01 \x01(\x0e\x32[.google.ads.googleads.v25.enums.VerticalAdsItemVerticalTypeEnum.VerticalAdsItemVerticalTypeH_\x88\x01\x01\x12g\n\x13recommendation_type\x18\x8c\x01 \x01(\x0e\x32I.google.ads.googleads.v25.enums.RecommendationTypeEnum.RecommendationType\x12\x84\x01\n\x1fsearch_engine_results_page_type\x18\x46 \x01(\x0e\x32[.google.ads.googleads.v25.enums.SearchEngineResultsPageTypeEnum.SearchEngineResultsPageType\x12 \n\x12search_subcategory\x18\x9b\x01 \x01(\tH`\x88\x01\x01\x12\x19\n\x0bsearch_term\x18\x9c\x01 \x01(\tHa\x88\x01\x01\x12k\n\x16search_term_match_type\x18\x16 \x01(\x0e\x32K.google.ads.googleads.v25.enums.SearchTermMatchTypeEnum.SearchTermMatchType\x12L\n\nmatch_type\x18\xc7\x01 \x01(\x0e\x32\x37.google.ads.googleads.v25.enums.MatchTypeEnum.MatchType\x12;\n\x04slot\x18\x17 \x01(\x0e\x32-.google.ads.googleads.v25.enums.SlotEnum.Slot\x12\x9d\x01\n\'conversion_value_rule_primary_dimension\x18\x8a\x01 \x01(\x0e\x32k.google.ads.googleads.v25.enums.ConversionValueRulePrimaryDimensionEnum.ConversionValueRulePrimaryDimension\x12\x15\n\x07webpage\x18\x81\x01 \x01(\tHb\x88\x01\x01\x12\x12\n\x04week\x18\x82\x01 \x01(\tHc\x88\x01\x01\x12\x12\n\x04year\x18\x83\x01 \x01(\x05Hd\x88\x01\x01\x12\x31\n#sk_ad_network_fine_conversion_value\x18\x89\x01 \x01(\x03He\x88\x01\x01\x12?\n1sk_ad_network_redistributed_fine_conversion_value\x18\xbe\x01 \x01(\x03Hf\x88\x01\x01\x12m\n\x17sk_ad_network_user_type\x18\x8d\x01 \x01(\x0e\x32K.google.ads.googleads.v25.enums.SkAdNetworkUserTypeEnum.SkAdNetworkUserType\x12w\n\x1bsk_ad_network_ad_event_type\x18\x8e\x01 \x01(\x0e\x32Q.google.ads.googleads.v25.enums.SkAdNetworkAdEventTypeEnum.SkAdNetworkAdEventType\x12]\n\x18sk_ad_network_source_app\x18\x8f\x01 \x01(\x0b\x32\x35.google.ads.googleads.v25.common.SkAdNetworkSourceAppHg\x88\x01\x01\x12\x88\x01\n sk_ad_network_attribution_credit\x18\x90\x01 \x01(\x0e\x32].google.ads.googleads.v25.enums.SkAdNetworkAttributionCreditEnum.SkAdNetworkAttributionCredit\x12\x95\x01\n%sk_ad_network_coarse_conversion_value\x18\x97\x01 \x01(\x0e\x32\x65.google.ads.googleads.v25.enums.SkAdNetworkCoarseConversionValueEnum.SkAdNetworkCoarseConversionValue\x12)\n\x1bsk_ad_network_source_domain\x18\x98\x01 \x01(\tHh\x88\x01\x01\x12s\n\x19sk_ad_network_source_type\x18\x99\x01 \x01(\x0e\x32O.google.ads.googleads.v25.enums.SkAdNetworkSourceTypeEnum.SkAdNetworkSourceType\x12\x33\n%sk_ad_network_postback_sequence_index\x18\x9a\x01 \x01(\x03Hi\x88\x01\x01\x12#\n\x15sk_ad_network_version\x18\xc0\x01 \x01(\tHj\x88\x01\x01\x12_\n\x18\x61sset_interaction_target\x18\x8b\x01 \x01(\x0b\x32\x37.google.ads.googleads.v25.common.AssetInteractionTargetHk\x88\x01\x01\x12\xa8\x01\n\x1enew_versus_returning_customers\x18\xa0\x01 \x01(\x0e\x32\x7f.google.ads.googleads.v25.enums.ConvertingUserPriorEngagementTypeAndLtvBucketEnum.ConvertingUserPriorEngagementTypeAndLtvBucket\x12Z\n\x12\x61\x64justed_age_range\x18\xc4\x01 \x01(\x0e\x32=.google.ads.googleads.v25.enums.AgeRangeTypeEnum.AgeRangeType\x12S\n\x0f\x61\x64justed_gender\x18\xc5\x01 \x01(\x0e\x32\x39.google.ads.googleads.v25.enums.GenderTypeEnum.GenderType\x12r\n\x18search_term_match_source\x18\xc6\x01 \x01(\x0e\x32O.google.ads.googleads.v25.enums.SearchTermMatchSourceEnum.SearchTermMatchSource\x12~\n\x1csearch_term_targeting_status\x18\xc9\x01 \x01(\x0e\x32W.google.ads.googleads.v25.enums.SearchTermTargetingStatusEnum.SearchTermTargetingStatus\x12#\n\x15\x61\x64_using_product_data\x18\xca\x01 \x01(\x08Hl\x88\x01\x01\x12\x1c\n\x0e\x61\x64_using_video\x18\xcb\x01 \x01(\x08Hm\x88\x01\x01\x42\x16\n\x14_activity_account_idB\x10\n\x0e_activity_cityB\x13\n\x11_activity_countryB\x12\n\x10_activity_ratingB\x11\n\x0f_activity_stateB\x17\n\x15_external_activity_idB\x0b\n\t_ad_groupB\x0e\n\x0c_asset_groupB\x19\n\x17_auction_insight_domainB\x0b\n\t_campaignB\x14\n\x12_conversion_actionB\x19\n\x17_conversion_action_nameB\x18\n\x16_conversion_adjustmentB\x07\n\x05_dateB\x15\n\x13_geo_target_airportB\x14\n\x12_geo_target_cantonB\x12\n\x10_geo_target_cityB\x15\n\x13_geo_target_countryB\x14\n\x12_geo_target_countyB\x16\n\x14_geo_target_districtB\x13\n\x11_geo_target_metroB$\n\"_geo_target_most_specific_locationB\x19\n\x17_geo_target_postal_codeB\x16\n\x14_geo_target_provinceB\x14\n\x12_geo_target_regionB\x13\n\x11_geo_target_stateB\x1c\n\x1a_hotel_booking_window_daysB\x12\n\x10_hotel_center_idB\x16\n\x14_hotel_check_in_dateB\r\n\x0b_hotel_cityB\x0e\n\x0c_hotel_classB\x10\n\x0e_hotel_countryB\x17\n\x15_hotel_length_of_stayB\x15\n\x13_hotel_rate_rule_idB\x0e\n\x0c_hotel_stateB\x07\n\x05_hourB \n\x1e_interaction_on_this_extensionB\x08\n\x06_monthB\x13\n\x11_partner_hotel_idB\x18\n\x16_product_aggregator_idB\x1a\n\x18_product_category_level1B\x1a\n\x18_product_category_level2B\x1a\n\x18_product_category_level3B\x1a\n\x18_product_category_level4B\x1a\n\x18_product_category_level5B\x10\n\x0e_product_brandB\x12\n\x10_product_countryB\x1c\n\x1a_product_custom_attribute0B\x1c\n\x1a_product_custom_attribute1B\x1c\n\x1a_product_custom_attribute2B\x1c\n\x1a_product_custom_attribute3B\x1c\n\x1a_product_custom_attribute4B\x15\n\x13_product_feed_labelB\x12\n\x10_product_item_idB\x13\n\x11_product_languageB\x16\n\x14_product_merchant_idB\x1f\n\x1d_product_sold_category_level1B\x1f\n\x1d_product_sold_category_level2B\x1f\n\x1d_product_sold_category_level3B\x1f\n\x1d_product_sold_category_level4B\x1f\n\x1d_product_sold_category_level5B\x15\n\x13_product_sold_brandB!\n\x1f_product_sold_custom_attribute0B!\n\x1f_product_sold_custom_attribute1B!\n\x1f_product_sold_custom_attribute2B!\n\x1f_product_sold_custom_attribute3B!\n\x1f_product_sold_custom_attribute4B\x17\n\x15_product_sold_item_idB\x15\n\x13_product_sold_titleB\x17\n\x15_product_sold_type_l1B\x17\n\x15_product_sold_type_l2B\x17\n\x15_product_sold_type_l3B\x17\n\x15_product_sold_type_l4B\x17\n\x15_product_sold_type_l5B\x13\n\x11_product_store_idB\x10\n\x0e_product_titleB\x12\n\x10_product_type_l1B\x12\n\x10_product_type_l2B\x12\n\x10_product_type_l3B\x12\n\x10_product_type_l4B\x12\n\x10_product_type_l5B\n\n\x08_quarterB\x1a\n\x18_travel_destination_cityB\x1d\n\x1b_travel_destination_countryB\x1c\n\x1a_travel_destination_regionB/\n-_vertical_ads_event_participant_display_namesB\x1b\n\x19_vertical_ads_hotel_classB\x17\n\x15_vertical_ads_listingB\x1d\n\x1b_vertical_ads_listing_brandB\x1c\n\x1a_vertical_ads_listing_cityB\x1f\n\x1d_vertical_ads_listing_countryB\x1e\n\x1c_vertical_ads_listing_regionB#\n!_vertical_ads_listing_user_ratingB\x1d\n\x1b_vertical_ads_listing_venueB\x1f\n\x1d_vertical_ads_partner_accountB\x18\n\x16_vertical_ads_verticalB\x15\n\x13_search_subcategoryB\x0e\n\x0c_search_termB\n\n\x08_webpageB\x07\n\x05_weekB\x07\n\x05_yearB&\n$_sk_ad_network_fine_conversion_valueB4\n2_sk_ad_network_redistributed_fine_conversion_valueB\x1b\n\x19_sk_ad_network_source_appB\x1e\n\x1c_sk_ad_network_source_domainB(\n&_sk_ad_network_postback_sequence_indexB\x18\n\x16_sk_ad_network_versionB\x1b\n\x19_asset_interaction_targetB\x18\n\x16_ad_using_product_dataB\x11\n\x0f_ad_using_video\"}\n\x07Keyword\x12\x1f\n\x12\x61\x64_group_criterion\x18\x03 \x01(\tH\x00\x88\x01\x01\x12:\n\x04info\x18\x02 \x01(\x0b\x32,.google.ads.googleads.v25.common.KeywordInfoB\x15\n\x13_ad_group_criterion\"\xba\x01\n\x1f\x42udgetCampaignAssociationStatus\x12\x15\n\x08\x63\x61mpaign\x18\x01 \x01(\tH\x00\x88\x01\x01\x12s\n\x06status\x18\x02 \x01(\x0e\x32\x63.google.ads.googleads.v25.enums.BudgetCampaignAssociationStatusEnum.BudgetCampaignAssociationStatusB\x0b\n\t_campaign\"J\n\x16\x41ssetInteractionTarget\x12\r\n\x05\x61sset\x18\x01 \x01(\t\x12!\n\x19interaction_on_this_asset\x18\x02 \x01(\x08\"`\n\x14SkAdNetworkSourceApp\x12(\n\x1bsk_ad_network_source_app_id\x18\x01 \x01(\tH\x00\x88\x01\x01\x42\x1e\n\x1c_sk_ad_network_source_app_idB\xed\x01\n#com.google.ads.googleads.v25.commonB\rSegmentsProtoP\x01ZEgoogle.golang.org/genproto/googleapis/ads/googleads/v25/common;common\xa2\x02\x03GAA\xaa\x02\x1fGoogle.Ads.GoogleAds.V25.Common\xca\x02\x1fGoogle\\Ads\\GoogleAds\\V25\\Common\xea\x02#Google::Ads::GoogleAds::V25::Commonb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Common + Segments = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.Segments").msgclass + Keyword = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.Keyword").msgclass + BudgetCampaignAssociationStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.BudgetCampaignAssociationStatus").msgclass + AssetInteractionTarget = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.AssetInteractionTarget").msgclass + SkAdNetworkSourceApp = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.SkAdNetworkSourceApp").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/common/simulation_pb.rb b/lib/google/ads/google_ads/v25/common/simulation_pb.rb new file mode 100644 index 000000000..20d862c2e --- /dev/null +++ b/lib/google/ads/google_ads/v25/common/simulation_pb.rb @@ -0,0 +1,36 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/common/simulation.proto + +require 'google/protobuf' + + +descriptor_data = "\n0google/ads/googleads/v25/common/simulation.proto\x12\x1fgoogle.ads.googleads.v25.common\"c\n\x19\x43pcBidSimulationPointList\x12\x46\n\x06points\x18\x01 \x03(\x0b\x32\x36.google.ads.googleads.v25.common.CpcBidSimulationPoint\"c\n\x19\x43pvBidSimulationPointList\x12\x46\n\x06points\x18\x01 \x03(\x0b\x32\x36.google.ads.googleads.v25.common.CpvBidSimulationPoint\"i\n\x1cTargetCpaSimulationPointList\x12I\n\x06points\x18\x01 \x03(\x0b\x32\x39.google.ads.googleads.v25.common.TargetCpaSimulationPoint\"k\n\x1dTargetRoasSimulationPointList\x12J\n\x06points\x18\x01 \x03(\x0b\x32:.google.ads.googleads.v25.common.TargetRoasSimulationPoint\"q\n PercentCpcBidSimulationPointList\x12M\n\x06points\x18\x01 \x03(\x0b\x32=.google.ads.googleads.v25.common.PercentCpcBidSimulationPoint\"c\n\x19\x42udgetSimulationPointList\x12\x46\n\x06points\x18\x01 \x03(\x0b\x32\x36.google.ads.googleads.v25.common.BudgetSimulationPoint\"\x81\x01\n(TargetImpressionShareSimulationPointList\x12U\n\x06points\x18\x01 \x03(\x0b\x32\x45.google.ads.googleads.v25.common.TargetImpressionShareSimulationPoint\"\xcc\x03\n\x15\x43pcBidSimulationPoint\x12%\n\x1drequired_budget_amount_micros\x18\x11 \x01(\x03\x12!\n\x14\x62iddable_conversions\x18\t \x01(\x01H\x01\x88\x01\x01\x12\'\n\x1a\x62iddable_conversions_value\x18\n \x01(\x01H\x02\x88\x01\x01\x12\x13\n\x06\x63licks\x18\x0b \x01(\x03H\x03\x88\x01\x01\x12\x18\n\x0b\x63ost_micros\x18\x0c \x01(\x03H\x04\x88\x01\x01\x12\x18\n\x0bimpressions\x18\r \x01(\x03H\x05\x88\x01\x01\x12!\n\x14top_slot_impressions\x18\x0e \x01(\x03H\x06\x88\x01\x01\x12\x18\n\x0e\x63pc_bid_micros\x18\x0f \x01(\x03H\x00\x12\"\n\x18\x63pc_bid_scaling_modifier\x18\x10 \x01(\x01H\x00\x42\x1a\n\x18\x63pc_simulation_key_valueB\x17\n\x15_biddable_conversionsB\x1d\n\x1b_biddable_conversions_valueB\t\n\x07_clicksB\x0e\n\x0c_cost_microsB\x0e\n\x0c_impressionsB\x17\n\x15_top_slot_impressions\"\xb9\x01\n\x15\x43pvBidSimulationPoint\x12\x1b\n\x0e\x63pv_bid_micros\x18\x05 \x01(\x03H\x00\x88\x01\x01\x12\x18\n\x0b\x63ost_micros\x18\x06 \x01(\x03H\x01\x88\x01\x01\x12\x18\n\x0bimpressions\x18\x07 \x01(\x03H\x02\x88\x01\x01\x12\x12\n\x05views\x18\x08 \x01(\x03H\x03\x88\x01\x01\x42\x11\n\x0f_cpv_bid_microsB\x0e\n\x0c_cost_microsB\x0e\n\x0c_impressionsB\x08\n\x06_views\"\xb6\x04\n\x18TargetCpaSimulationPoint\x12%\n\x1drequired_budget_amount_micros\x18\x13 \x01(\x03\x12!\n\x14\x62iddable_conversions\x18\t \x01(\x01H\x01\x88\x01\x01\x12\'\n\x1a\x62iddable_conversions_value\x18\n \x01(\x01H\x02\x88\x01\x01\x12\x14\n\x0c\x61pp_installs\x18\x0f \x01(\x01\x12\x16\n\x0ein_app_actions\x18\x10 \x01(\x01\x12\x13\n\x06\x63licks\x18\x0b \x01(\x03H\x03\x88\x01\x01\x12\x18\n\x0b\x63ost_micros\x18\x0c \x01(\x03H\x04\x88\x01\x01\x12\x18\n\x0bimpressions\x18\r \x01(\x03H\x05\x88\x01\x01\x12!\n\x14top_slot_impressions\x18\x0e \x01(\x03H\x06\x88\x01\x01\x12\x19\n\x0cinteractions\x18\x14 \x01(\x03H\x07\x88\x01\x01\x12\x1b\n\x11target_cpa_micros\x18\x11 \x01(\x03H\x00\x12%\n\x1btarget_cpa_scaling_modifier\x18\x12 \x01(\x01H\x00\x42!\n\x1ftarget_cpa_simulation_key_valueB\x17\n\x15_biddable_conversionsB\x1d\n\x1b_biddable_conversions_valueB\t\n\x07_clicksB\x0e\n\x0c_cost_microsB\x0e\n\x0c_impressionsB\x17\n\x15_top_slot_impressionsB\x0f\n\r_interactions\"\xa0\x03\n\x19TargetRoasSimulationPoint\x12\x18\n\x0btarget_roas\x18\x08 \x01(\x01H\x00\x88\x01\x01\x12%\n\x1drequired_budget_amount_micros\x18\x0f \x01(\x03\x12!\n\x14\x62iddable_conversions\x18\t \x01(\x01H\x01\x88\x01\x01\x12\'\n\x1a\x62iddable_conversions_value\x18\n \x01(\x01H\x02\x88\x01\x01\x12\x13\n\x06\x63licks\x18\x0b \x01(\x03H\x03\x88\x01\x01\x12\x18\n\x0b\x63ost_micros\x18\x0c \x01(\x03H\x04\x88\x01\x01\x12\x18\n\x0bimpressions\x18\r \x01(\x03H\x05\x88\x01\x01\x12!\n\x14top_slot_impressions\x18\x0e \x01(\x03H\x06\x88\x01\x01\x42\x0e\n\x0c_target_roasB\x17\n\x15_biddable_conversionsB\x1d\n\x1b_biddable_conversions_valueB\t\n\x07_clicksB\x0e\n\x0c_cost_microsB\x0e\n\x0c_impressionsB\x17\n\x15_top_slot_impressions\"\x92\x03\n\x1cPercentCpcBidSimulationPoint\x12#\n\x16percent_cpc_bid_micros\x18\x01 \x01(\x03H\x00\x88\x01\x01\x12!\n\x14\x62iddable_conversions\x18\x02 \x01(\x01H\x01\x88\x01\x01\x12\'\n\x1a\x62iddable_conversions_value\x18\x03 \x01(\x01H\x02\x88\x01\x01\x12\x13\n\x06\x63licks\x18\x04 \x01(\x03H\x03\x88\x01\x01\x12\x18\n\x0b\x63ost_micros\x18\x05 \x01(\x03H\x04\x88\x01\x01\x12\x18\n\x0bimpressions\x18\x06 \x01(\x03H\x05\x88\x01\x01\x12!\n\x14top_slot_impressions\x18\x07 \x01(\x03H\x06\x88\x01\x01\x42\x19\n\x17_percent_cpc_bid_microsB\x17\n\x15_biddable_conversionsB\x1d\n\x1b_biddable_conversions_valueB\t\n\x07_clicksB\x0e\n\x0c_cost_microsB\x0e\n\x0c_impressionsB\x17\n\x15_top_slot_impressions\"\x8e\x02\n\x15\x42udgetSimulationPoint\x12\x1c\n\x14\x62udget_amount_micros\x18\x01 \x01(\x03\x12\'\n\x1frequired_cpc_bid_ceiling_micros\x18\x02 \x01(\x03\x12\x1c\n\x14\x62iddable_conversions\x18\x03 \x01(\x01\x12\"\n\x1a\x62iddable_conversions_value\x18\x04 \x01(\x01\x12\x0e\n\x06\x63licks\x18\x05 \x01(\x03\x12\x13\n\x0b\x63ost_micros\x18\x06 \x01(\x03\x12\x13\n\x0bimpressions\x18\x07 \x01(\x03\x12\x1c\n\x14top_slot_impressions\x18\x08 \x01(\x03\x12\x14\n\x0cinteractions\x18\t \x01(\x03\"\xda\x02\n$TargetImpressionShareSimulationPoint\x12&\n\x1etarget_impression_share_micros\x18\x01 \x01(\x03\x12\'\n\x1frequired_cpc_bid_ceiling_micros\x18\x02 \x01(\x03\x12%\n\x1drequired_budget_amount_micros\x18\x03 \x01(\x03\x12\x1c\n\x14\x62iddable_conversions\x18\x04 \x01(\x01\x12\"\n\x1a\x62iddable_conversions_value\x18\x05 \x01(\x01\x12\x0e\n\x06\x63licks\x18\x06 \x01(\x03\x12\x13\n\x0b\x63ost_micros\x18\x07 \x01(\x03\x12\x13\n\x0bimpressions\x18\x08 \x01(\x03\x12\x1c\n\x14top_slot_impressions\x18\t \x01(\x03\x12 \n\x18\x61\x62solute_top_impressions\x18\n \x01(\x03\x42\xef\x01\n#com.google.ads.googleads.v25.commonB\x0fSimulationProtoP\x01ZEgoogle.golang.org/genproto/googleapis/ads/googleads/v25/common;common\xa2\x02\x03GAA\xaa\x02\x1fGoogle.Ads.GoogleAds.V25.Common\xca\x02\x1fGoogle\\Ads\\GoogleAds\\V25\\Common\xea\x02#Google::Ads::GoogleAds::V25::Commonb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Common + CpcBidSimulationPointList = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.CpcBidSimulationPointList").msgclass + CpvBidSimulationPointList = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.CpvBidSimulationPointList").msgclass + TargetCpaSimulationPointList = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.TargetCpaSimulationPointList").msgclass + TargetRoasSimulationPointList = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.TargetRoasSimulationPointList").msgclass + PercentCpcBidSimulationPointList = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.PercentCpcBidSimulationPointList").msgclass + BudgetSimulationPointList = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.BudgetSimulationPointList").msgclass + TargetImpressionShareSimulationPointList = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.TargetImpressionShareSimulationPointList").msgclass + CpcBidSimulationPoint = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.CpcBidSimulationPoint").msgclass + CpvBidSimulationPoint = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.CpvBidSimulationPoint").msgclass + TargetCpaSimulationPoint = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.TargetCpaSimulationPoint").msgclass + TargetRoasSimulationPoint = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.TargetRoasSimulationPoint").msgclass + PercentCpcBidSimulationPoint = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.PercentCpcBidSimulationPoint").msgclass + BudgetSimulationPoint = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.BudgetSimulationPoint").msgclass + TargetImpressionShareSimulationPoint = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.common.TargetImpressionShareSimulationPoint").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/common/synthetic_content_info_pb.rb b/lib/google/ads/google_ads/v25/common/synthetic_content_info_pb.rb new file mode 100644 index 000000000..38c3f01ec --- /dev/null +++ b/lib/google/ads/google_ads/v25/common/synthetic_content_info_pb.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/common/synthetic_content_info.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/enums/synthetic_content_attestation_status_pb' +require 'google/ads/google_ads/v25/enums/synthetic_content_source_pb' +require 'google/api/field_behavior_pb' + + +descriptor_data = "\n\x12\x1e\n\x1aVIDEO_RELATED_VIDEOS_CLICK\x10?\x12&\n\"CLICK_TO_MESSAGE_THIRD_PARTY_CLICK\x10@\x12\'\n#CLICK_TO_MESSAGE_LANDING_PAGE_CLICK\x10\x41\x42\xe8\x01\n\"com.google.ads.googleads.v25.enumsB\x0e\x43lickTypeProtoP\x01ZCgoogle.golang.org/genproto/googleapis/ads/googleads/v25/enums;enums\xa2\x02\x03GAA\xaa\x02\x1eGoogle.Ads.GoogleAds.V25.Enums\xca\x02\x1eGoogle\\Ads\\GoogleAds\\V25\\Enums\xea\x02\"Google::Ads::GoogleAds::V25::Enumsb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Enums + ClickTypeEnum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.enums.ClickTypeEnum").msgclass + ClickTypeEnum::ClickType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.enums.ClickTypeEnum.ClickType").enummodule + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/enums/combined_audience_status_pb.rb b/lib/google/ads/google_ads/v25/enums/combined_audience_status_pb.rb new file mode 100644 index 000000000..7a7959c52 --- /dev/null +++ b/lib/google/ads/google_ads/v25/enums/combined_audience_status_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/enums/combined_audience_status.proto + +require 'google/protobuf' + + +descriptor_data = "\n=google/ads/googleads/v25/enums/combined_audience_status.proto\x12\x1egoogle.ads.googleads.v25.enums\"n\n\x1a\x43ombinedAudienceStatusEnum\"P\n\x16\x43ombinedAudienceStatus\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x0b\n\x07UNKNOWN\x10\x01\x12\x0b\n\x07\x45NABLED\x10\x02\x12\x0b\n\x07REMOVED\x10\x03\x42\xf5\x01\n\"com.google.ads.googleads.v25.enumsB\x1b\x43ombinedAudienceStatusProtoP\x01ZCgoogle.golang.org/genproto/googleapis/ads/googleads/v25/enums;enums\xa2\x02\x03GAA\xaa\x02\x1eGoogle.Ads.GoogleAds.V25.Enums\xca\x02\x1eGoogle\\Ads\\GoogleAds\\V25\\Enums\xea\x02\"Google::Ads::GoogleAds::V25::Enumsb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Enums + CombinedAudienceStatusEnum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.enums.CombinedAudienceStatusEnum").msgclass + CombinedAudienceStatusEnum::CombinedAudienceStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.enums.CombinedAudienceStatusEnum.CombinedAudienceStatus").enummodule + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/enums/consent_status_pb.rb b/lib/google/ads/google_ads/v25/enums/consent_status_pb.rb new file mode 100644 index 000000000..6c229ac34 --- /dev/null +++ b/lib/google/ads/google_ads/v25/enums/consent_status_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/enums/consent_status.proto + +require 'google/protobuf' + + +descriptor_data = "\n3google/ads/googleads/v25/enums/consent_status.proto\x12\x1egoogle.ads.googleads.v25.enums\"[\n\x11\x43onsentStatusEnum\"F\n\rConsentStatus\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x0b\n\x07UNKNOWN\x10\x01\x12\x0b\n\x07GRANTED\x10\x02\x12\n\n\x06\x44\x45NIED\x10\x03\x42\xec\x01\n\"com.google.ads.googleads.v25.enumsB\x12\x43onsentStatusProtoP\x01ZCgoogle.golang.org/genproto/googleapis/ads/googleads/v25/enums;enums\xa2\x02\x03GAA\xaa\x02\x1eGoogle.Ads.GoogleAds.V25.Enums\xca\x02\x1eGoogle\\Ads\\GoogleAds\\V25\\Enums\xea\x02\"Google::Ads::GoogleAds::V25::Enumsb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Enums + ConsentStatusEnum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.enums.ConsentStatusEnum").msgclass + ConsentStatusEnum::ConsentStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.enums.ConsentStatusEnum.ConsentStatus").enummodule + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/enums/content_creator_insights_supplemental_data_pb.rb b/lib/google/ads/google_ads/v25/enums/content_creator_insights_supplemental_data_pb.rb new file mode 100644 index 000000000..fbf266703 --- /dev/null +++ b/lib/google/ads/google_ads/v25/enums/content_creator_insights_supplemental_data_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/enums/content_creator_insights_supplemental_data.proto + +require 'google/protobuf' + + +descriptor_data = "\nOgoogle/ads/googleads/v25/enums/content_creator_insights_supplemental_data.proto\x12\x1egoogle.ads.googleads.v25.enums\"\x8c\x01\n*ContentCreatorInsightsSupplementalDataEnum\"^\n&ContentCreatorInsightsSupplementalData\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x0b\n\x07UNKNOWN\x10\x01\x12\x16\n\x12LOCAL_CREATOR_DATA\x10\x03\x42\x85\x02\n\"com.google.ads.googleads.v25.enumsB+ContentCreatorInsightsSupplementalDataProtoP\x01ZCgoogle.golang.org/genproto/googleapis/ads/googleads/v25/enums;enums\xa2\x02\x03GAA\xaa\x02\x1eGoogle.Ads.GoogleAds.V25.Enums\xca\x02\x1eGoogle\\Ads\\GoogleAds\\V25\\Enums\xea\x02\"Google::Ads::GoogleAds::V25::Enumsb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Enums + ContentCreatorInsightsSupplementalDataEnum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.enums.ContentCreatorInsightsSupplementalDataEnum").msgclass + ContentCreatorInsightsSupplementalDataEnum::ContentCreatorInsightsSupplementalData = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.enums.ContentCreatorInsightsSupplementalDataEnum.ContentCreatorInsightsSupplementalData").enummodule + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/enums/content_label_type_pb.rb b/lib/google/ads/google_ads/v25/enums/content_label_type_pb.rb new file mode 100644 index 000000000..33f24f237 --- /dev/null +++ b/lib/google/ads/google_ads/v25/enums/content_label_type_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/enums/content_label_type.proto + +require 'google/protobuf' + + +descriptor_data = "\n7google/ads/googleads/v25/enums/content_label_type.proto\x12\x1egoogle.ads.googleads.v25.enums\"\xff\x05\n\x14\x43ontentLabelTypeEnum\"\xe6\x05\n\x10\x43ontentLabelType\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x0b\n\x07UNKNOWN\x10\x01\x12\x17\n\x13SEXUALLY_SUGGESTIVE\x10\x02\x12\x12\n\x0e\x42\x45LOW_THE_FOLD\x10\x03\x12\x11\n\rPARKED_DOMAIN\x10\x04\x12\x0c\n\x08JUVENILE\x10\x06\x12\r\n\tPROFANITY\x10\x07\x12\x0b\n\x07TRAGEDY\x10\x08\x12\t\n\x05VIDEO\x10\t\x12\x15\n\x11VIDEO_RATING_DV_G\x10\n\x12\x16\n\x12VIDEO_RATING_DV_PG\x10\x0b\x12\x15\n\x11VIDEO_RATING_DV_T\x10\x0c\x12\x16\n\x12VIDEO_RATING_DV_MA\x10\r\x12\x17\n\x13VIDEO_NOT_YET_RATED\x10\x0e\x12\x12\n\x0e\x45MBEDDED_VIDEO\x10\x0f\x12\x18\n\x14LIVE_STREAMING_VIDEO\x10\x10\x12\x11\n\rSOCIAL_ISSUES\x10\x11\x12*\n&BRAND_SUITABILITY_CONTENT_FOR_FAMILIES\x10\x12\x12$\n BRAND_SUITABILITY_GAMES_FIGHTING\x10\x13\x12\"\n\x1e\x42RAND_SUITABILITY_GAMES_MATURE\x10\x14\x12&\n\"BRAND_SUITABILITY_HEALTH_SENSITIVE\x10\x15\x12\x30\n,BRAND_SUITABILITY_HEALTH_SOURCE_UNDETERMINED\x10\x16\x12!\n\x1d\x42RAND_SUITABILITY_NEWS_RECENT\x10\x17\x12$\n BRAND_SUITABILITY_NEWS_SENSITIVE\x10\x18\x12.\n*BRAND_SUITABILITY_NEWS_SOURCE_NOT_FEATURED\x10\x19\x12\x1e\n\x1a\x42RAND_SUITABILITY_POLITICS\x10\x1a\x12\x1e\n\x1a\x42RAND_SUITABILITY_RELIGION\x10\x1b\x42\xef\x01\n\"com.google.ads.googleads.v25.enumsB\x15\x43ontentLabelTypeProtoP\x01ZCgoogle.golang.org/genproto/googleapis/ads/googleads/v25/enums;enums\xa2\x02\x03GAA\xaa\x02\x1eGoogle.Ads.GoogleAds.V25.Enums\xca\x02\x1eGoogle\\Ads\\GoogleAds\\V25\\Enums\xea\x02\"Google::Ads::GoogleAds::V25::Enumsb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Enums + ContentLabelTypeEnum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.enums.ContentLabelTypeEnum").msgclass + ContentLabelTypeEnum::ContentLabelType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.enums.ContentLabelTypeEnum.ContentLabelType").enummodule + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/enums/conversion_action_category_pb.rb b/lib/google/ads/google_ads/v25/enums/conversion_action_category_pb.rb new file mode 100644 index 000000000..3f669dea3 --- /dev/null +++ b/lib/google/ads/google_ads/v25/enums/conversion_action_category_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/enums/conversion_action_category.proto + +require 'google/protobuf' + + +descriptor_data = "\n?google/ads/googleads/v25/enums/conversion_action_category.proto\x12\x1egoogle.ads.googleads.v25.enums\"\xe8\x03\n\x1c\x43onversionActionCategoryEnum\"\xc7\x03\n\x18\x43onversionActionCategory\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x0b\n\x07UNKNOWN\x10\x01\x12\x0b\n\x07\x44\x45\x46\x41ULT\x10\x02\x12\r\n\tPAGE_VIEW\x10\x03\x12\x0c\n\x08PURCHASE\x10\x04\x12\n\n\x06SIGNUP\x10\x05\x12\x0c\n\x08\x44OWNLOAD\x10\x07\x12\x0f\n\x0b\x41\x44\x44_TO_CART\x10\x08\x12\x12\n\x0e\x42\x45GIN_CHECKOUT\x10\t\x12\x12\n\x0eSUBSCRIBE_PAID\x10\n\x12\x13\n\x0fPHONE_CALL_LEAD\x10\x0b\x12\x11\n\rIMPORTED_LEAD\x10\x0c\x12\x14\n\x10SUBMIT_LEAD_FORM\x10\r\x12\x14\n\x10\x42OOK_APPOINTMENT\x10\x0e\x12\x11\n\rREQUEST_QUOTE\x10\x0f\x12\x12\n\x0eGET_DIRECTIONS\x10\x10\x12\x12\n\x0eOUTBOUND_CLICK\x10\x11\x12\x0b\n\x07\x43ONTACT\x10\x12\x12\x0e\n\nENGAGEMENT\x10\x13\x12\x0f\n\x0bSTORE_VISIT\x10\x14\x12\x0e\n\nSTORE_SALE\x10\x15\x12\x12\n\x0eQUALIFIED_LEAD\x10\x16\x12\x12\n\x0e\x43ONVERTED_LEAD\x10\x17\x12\x1b\n\x17YOUTUBE_FOLLOW_ON_VIEWS\x10\x18\x42\xf7\x01\n\"com.google.ads.googleads.v25.enumsB\x1d\x43onversionActionCategoryProtoP\x01ZCgoogle.golang.org/genproto/googleapis/ads/googleads/v25/enums;enums\xa2\x02\x03GAA\xaa\x02\x1eGoogle.Ads.GoogleAds.V25.Enums\xca\x02\x1eGoogle\\Ads\\GoogleAds\\V25\\Enums\xea\x02\"Google::Ads::GoogleAds::V25::Enumsb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Enums + ConversionActionCategoryEnum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.enums.ConversionActionCategoryEnum").msgclass + ConversionActionCategoryEnum::ConversionActionCategory = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.enums.ConversionActionCategoryEnum.ConversionActionCategory").enummodule + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/enums/conversion_action_counting_type_pb.rb b/lib/google/ads/google_ads/v25/enums/conversion_action_counting_type_pb.rb new file mode 100644 index 000000000..ac4d04a7b --- /dev/null +++ b/lib/google/ads/google_ads/v25/enums/conversion_action_counting_type_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/enums/conversion_action_counting_type.proto + +require 'google/protobuf' + + +descriptor_data = "\nDgoogle/ads/googleads/v25/enums/conversion_action_counting_type.proto\x12\x1egoogle.ads.googleads.v25.enums\"\x87\x01\n ConversionActionCountingTypeEnum\"c\n\x1c\x43onversionActionCountingType\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x0b\n\x07UNKNOWN\x10\x01\x12\x11\n\rONE_PER_CLICK\x10\x02\x12\x12\n\x0eMANY_PER_CLICK\x10\x03\x42\xfb\x01\n\"com.google.ads.googleads.v25.enumsB!ConversionActionCountingTypeProtoP\x01ZCgoogle.golang.org/genproto/googleapis/ads/googleads/v25/enums;enums\xa2\x02\x03GAA\xaa\x02\x1eGoogle.Ads.GoogleAds.V25.Enums\xca\x02\x1eGoogle\\Ads\\GoogleAds\\V25\\Enums\xea\x02\"Google::Ads::GoogleAds::V25::Enumsb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Enums + ConversionActionCountingTypeEnum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.enums.ConversionActionCountingTypeEnum").msgclass + ConversionActionCountingTypeEnum::ConversionActionCountingType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.enums.ConversionActionCountingTypeEnum.ConversionActionCountingType").enummodule + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/enums/conversion_action_status_pb.rb b/lib/google/ads/google_ads/v25/enums/conversion_action_status_pb.rb new file mode 100644 index 000000000..78a098d48 --- /dev/null +++ b/lib/google/ads/google_ads/v25/enums/conversion_action_status_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/enums/conversion_action_status.proto + +require 'google/protobuf' + + +descriptor_data = "\n=google/ads/googleads/v25/enums/conversion_action_status.proto\x12\x1egoogle.ads.googleads.v25.enums\"z\n\x1a\x43onversionActionStatusEnum\"\\\n\x16\x43onversionActionStatus\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x0b\n\x07UNKNOWN\x10\x01\x12\x0b\n\x07\x45NABLED\x10\x02\x12\x0b\n\x07REMOVED\x10\x03\x12\n\n\x06HIDDEN\x10\x04\x42\xf5\x01\n\"com.google.ads.googleads.v25.enumsB\x1b\x43onversionActionStatusProtoP\x01ZCgoogle.golang.org/genproto/googleapis/ads/googleads/v25/enums;enums\xa2\x02\x03GAA\xaa\x02\x1eGoogle.Ads.GoogleAds.V25.Enums\xca\x02\x1eGoogle\\Ads\\GoogleAds\\V25\\Enums\xea\x02\"Google::Ads::GoogleAds::V25::Enumsb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Enums + ConversionActionStatusEnum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.enums.ConversionActionStatusEnum").msgclass + ConversionActionStatusEnum::ConversionActionStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.enums.ConversionActionStatusEnum.ConversionActionStatus").enummodule + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/enums/conversion_action_type_pb.rb b/lib/google/ads/google_ads/v25/enums/conversion_action_type_pb.rb new file mode 100644 index 000000000..a5cce1764 --- /dev/null +++ b/lib/google/ads/google_ads/v25/enums/conversion_action_type_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/enums/conversion_action_type.proto + +require 'google/protobuf' + + +descriptor_data = "\n;google/ads/googleads/v25/enums/conversion_action_type.proto\x12\x1egoogle.ads.googleads.v25.enums\"\xe8\x0c\n\x18\x43onversionActionTypeEnum\"\xcb\x0c\n\x14\x43onversionActionType\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x0b\n\x07UNKNOWN\x10\x01\x12\x0b\n\x07\x41\x44_CALL\x10\x02\x12\x11\n\rCLICK_TO_CALL\x10\x03\x12\x18\n\x14GOOGLE_PLAY_DOWNLOAD\x10\x04\x12\x1f\n\x1bGOOGLE_PLAY_IN_APP_PURCHASE\x10\x05\x12\x10\n\x0cUPLOAD_CALLS\x10\x06\x12\x11\n\rUPLOAD_CLICKS\x10\x07\x12\x0b\n\x07WEBPAGE\x10\x08\x12\x10\n\x0cWEBSITE_CALL\x10\t\x12\x1d\n\x19STORE_SALES_DIRECT_UPLOAD\x10\n\x12\x0f\n\x0bSTORE_SALES\x10\x0b\x12\x1f\n\x1b\x46IREBASE_ANDROID_FIRST_OPEN\x10\x0c\x12$\n FIREBASE_ANDROID_IN_APP_PURCHASE\x10\r\x12\x1b\n\x17\x46IREBASE_ANDROID_CUSTOM\x10\x0e\x12\x1b\n\x17\x46IREBASE_IOS_FIRST_OPEN\x10\x0f\x12 \n\x1c\x46IREBASE_IOS_IN_APP_PURCHASE\x10\x10\x12\x17\n\x13\x46IREBASE_IOS_CUSTOM\x10\x11\x12\x30\n,THIRD_PARTY_APP_ANALYTICS_ANDROID_FIRST_OPEN\x10\x12\x12\x35\n1THIRD_PARTY_APP_ANALYTICS_ANDROID_IN_APP_PURCHASE\x10\x13\x12,\n(THIRD_PARTY_APP_ANALYTICS_ANDROID_CUSTOM\x10\x14\x12,\n(THIRD_PARTY_APP_ANALYTICS_IOS_FIRST_OPEN\x10\x15\x12\x31\n-THIRD_PARTY_APP_ANALYTICS_IOS_IN_APP_PURCHASE\x10\x16\x12(\n$THIRD_PARTY_APP_ANALYTICS_IOS_CUSTOM\x10\x17\x12 \n\x1c\x41NDROID_APP_PRE_REGISTRATION\x10\x18\x12#\n\x1f\x41NDROID_INSTALLS_ALL_OTHER_APPS\x10\x19\x12\x15\n\x11\x46LOODLIGHT_ACTION\x10\x1a\x12\x1a\n\x16\x46LOODLIGHT_TRANSACTION\x10\x1b\x12\x11\n\rGOOGLE_HOSTED\x10\x1c\x12\x14\n\x10LEAD_FORM_SUBMIT\x10\x1d\x12\x12\n\nSALESFORCE\x10\x1e\x1a\x02\x08\x01\x12\x12\n\x0eSEARCH_ADS_360\x10\x1f\x12$\n SMART_CAMPAIGN_AD_CLICKS_TO_CALL\x10 \x12%\n!SMART_CAMPAIGN_MAP_CLICKS_TO_CALL\x10!\x12!\n\x1dSMART_CAMPAIGN_MAP_DIRECTIONS\x10\"\x12 \n\x1cSMART_CAMPAIGN_TRACKED_CALLS\x10#\x12\x10\n\x0cSTORE_VISITS\x10$\x12\x14\n\x10WEBPAGE_CODELESS\x10%\x12\x1c\n\x18UNIVERSAL_ANALYTICS_GOAL\x10&\x12#\n\x1fUNIVERSAL_ANALYTICS_TRANSACTION\x10\'\x12\x1d\n\x19GOOGLE_ANALYTICS_4_CUSTOM\x10(\x12\x1f\n\x1bGOOGLE_ANALYTICS_4_PURCHASE\x10)\x12$\n GOOGLE_ANALYTICS_4_GENERATE_LEAD\x10*\x12#\n\x1fGOOGLE_ANALYTICS_4_QUALIFY_LEAD\x10+\x12)\n%GOOGLE_ANALYTICS_4_CLOSE_CONVERT_LEAD\x10,\x12\"\n\x1e\x46IREBASE_ANDROID_GENERATE_LEAD\x10-\x12!\n\x1d\x46IREBASE_ANDROID_QUALIFY_LEAD\x10.\x12\'\n#FIREBASE_ANDROID_CLOSE_CONVERT_LEAD\x10/\x12\x1e\n\x1a\x46IREBASE_IOS_GENERATE_LEAD\x10\x30\x12\x1d\n\x19\x46IREBASE_IOS_QUALIFY_LEAD\x10\x31\x12#\n\x1f\x46IREBASE_IOS_CLOSE_CONVERT_LEAD\x10\x32\x12\x16\n\x12LOCAL_SERVICES_ADS\x10\x33\x42\xf3\x01\n\"com.google.ads.googleads.v25.enumsB\x19\x43onversionActionTypeProtoP\x01ZCgoogle.golang.org/genproto/googleapis/ads/googleads/v25/enums;enums\xa2\x02\x03GAA\xaa\x02\x1eGoogle.Ads.GoogleAds.V25.Enums\xca\x02\x1eGoogle\\Ads\\GoogleAds\\V25\\Enums\xea\x02\"Google::Ads::GoogleAds::V25::Enumsb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Enums + ConversionActionTypeEnum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.enums.ConversionActionTypeEnum").msgclass + ConversionActionTypeEnum::ConversionActionType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.enums.ConversionActionTypeEnum.ConversionActionType").enummodule + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/enums/conversion_adjustment_type_pb.rb b/lib/google/ads/google_ads/v25/enums/conversion_adjustment_type_pb.rb new file mode 100644 index 000000000..1e31bd9a2 --- /dev/null +++ b/lib/google/ads/google_ads/v25/enums/conversion_adjustment_type_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/enums/conversion_adjustment_type.proto + +require 'google/protobuf' + + +descriptor_data = "\n?google/ads/googleads/v25/enums/conversion_adjustment_type.proto\x12\x1egoogle.ads.googleads.v25.enums\"\x8a\x01\n\x1c\x43onversionAdjustmentTypeEnum\"j\n\x18\x43onversionAdjustmentType\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x0b\n\x07UNKNOWN\x10\x01\x12\x0e\n\nRETRACTION\x10\x02\x12\x0f\n\x0bRESTATEMENT\x10\x03\x12\x0f\n\x0b\x45NHANCEMENT\x10\x04\x42\xf7\x01\n\"com.google.ads.googleads.v25.enumsB\x1d\x43onversionAdjustmentTypeProtoP\x01ZCgoogle.golang.org/genproto/googleapis/ads/googleads/v25/enums;enums\xa2\x02\x03GAA\xaa\x02\x1eGoogle.Ads.GoogleAds.V25.Enums\xca\x02\x1eGoogle\\Ads\\GoogleAds\\V25\\Enums\xea\x02\"Google::Ads::GoogleAds::V25::Enumsb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Enums + ConversionAdjustmentTypeEnum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.enums.ConversionAdjustmentTypeEnum").msgclass + ConversionAdjustmentTypeEnum::ConversionAdjustmentType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.enums.ConversionAdjustmentTypeEnum.ConversionAdjustmentType").enummodule + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/enums/conversion_attribution_event_type_pb.rb b/lib/google/ads/google_ads/v25/enums/conversion_attribution_event_type_pb.rb new file mode 100644 index 000000000..adea3d7f5 --- /dev/null +++ b/lib/google/ads/google_ads/v25/enums/conversion_attribution_event_type_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/enums/conversion_attribution_event_type.proto + +require 'google/protobuf' + + +descriptor_data = "\nFgoogle/ads/googleads/v25/enums/conversion_attribution_event_type.proto\x12\x1egoogle.ads.googleads.v25.enums\"\x97\x01\n\"ConversionAttributionEventTypeEnum\"q\n\x1e\x43onversionAttributionEventType\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x0b\n\x07UNKNOWN\x10\x01\x12\x0e\n\nIMPRESSION\x10\x02\x12\x0f\n\x0bINTERACTION\x10\x03\x12\x10\n\x0c\x45NGAGED_VIEW\x10\x04\x42\xfd\x01\n\"com.google.ads.googleads.v25.enumsB#ConversionAttributionEventTypeProtoP\x01ZCgoogle.golang.org/genproto/googleapis/ads/googleads/v25/enums;enums\xa2\x02\x03GAA\xaa\x02\x1eGoogle.Ads.GoogleAds.V25.Enums\xca\x02\x1eGoogle\\Ads\\GoogleAds\\V25\\Enums\xea\x02\"Google::Ads::GoogleAds::V25::Enumsb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Enums + ConversionAttributionEventTypeEnum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.enums.ConversionAttributionEventTypeEnum").msgclass + ConversionAttributionEventTypeEnum::ConversionAttributionEventType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.enums.ConversionAttributionEventTypeEnum.ConversionAttributionEventType").enummodule + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/enums/conversion_custom_variable_status_pb.rb b/lib/google/ads/google_ads/v25/enums/conversion_custom_variable_status_pb.rb new file mode 100644 index 000000000..be19f7ad6 --- /dev/null +++ b/lib/google/ads/google_ads/v25/enums/conversion_custom_variable_status_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/enums/conversion_custom_variable_status.proto + +require 'google/protobuf' + + +descriptor_data = "\nFgoogle/ads/googleads/v25/enums/conversion_custom_variable_status.proto\x12\x1egoogle.ads.googleads.v25.enums\"\x94\x01\n\"ConversionCustomVariableStatusEnum\"n\n\x1e\x43onversionCustomVariableStatus\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x0b\n\x07UNKNOWN\x10\x01\x12\x15\n\x11\x41\x43TIVATION_NEEDED\x10\x02\x12\x0b\n\x07\x45NABLED\x10\x03\x12\n\n\x06PAUSED\x10\x04\x42\xfd\x01\n\"com.google.ads.googleads.v25.enumsB#ConversionCustomVariableStatusProtoP\x01ZCgoogle.golang.org/genproto/googleapis/ads/googleads/v25/enums;enums\xa2\x02\x03GAA\xaa\x02\x1eGoogle.Ads.GoogleAds.V25.Enums\xca\x02\x1eGoogle\\Ads\\GoogleAds\\V25\\Enums\xea\x02\"Google::Ads::GoogleAds::V25::Enumsb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Enums + ConversionCustomVariableStatusEnum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.enums.ConversionCustomVariableStatusEnum").msgclass + ConversionCustomVariableStatusEnum::ConversionCustomVariableStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.enums.ConversionCustomVariableStatusEnum.ConversionCustomVariableStatus").enummodule + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/enums/conversion_customer_type_pb.rb b/lib/google/ads/google_ads/v25/enums/conversion_customer_type_pb.rb new file mode 100644 index 000000000..eeaf108e9 --- /dev/null +++ b/lib/google/ads/google_ads/v25/enums/conversion_customer_type_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/enums/conversion_customer_type.proto + +require 'google/protobuf' + + +descriptor_data = "\n=google/ads/googleads/v25/enums/conversion_customer_type.proto\x12\x1egoogle.ads.googleads.v25.enums\"l\n\x1a\x43onversionCustomerTypeEnum\"N\n\x16\x43onversionCustomerType\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x0b\n\x07UNKNOWN\x10\x01\x12\x07\n\x03NEW\x10\x02\x12\r\n\tRETURNING\x10\x03\x42\xf5\x01\n\"com.google.ads.googleads.v25.enumsB\x1b\x43onversionCustomerTypeProtoP\x01ZCgoogle.golang.org/genproto/googleapis/ads/googleads/v25/enums;enums\xa2\x02\x03GAA\xaa\x02\x1eGoogle.Ads.GoogleAds.V25.Enums\xca\x02\x1eGoogle\\Ads\\GoogleAds\\V25\\Enums\xea\x02\"Google::Ads::GoogleAds::V25::Enumsb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Enums + ConversionCustomerTypeEnum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.enums.ConversionCustomerTypeEnum").msgclass + ConversionCustomerTypeEnum::ConversionCustomerType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.enums.ConversionCustomerTypeEnum.ConversionCustomerType").enummodule + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/enums/conversion_environment_enum_pb.rb b/lib/google/ads/google_ads/v25/enums/conversion_environment_enum_pb.rb new file mode 100644 index 000000000..744c65e5c --- /dev/null +++ b/lib/google/ads/google_ads/v25/enums/conversion_environment_enum_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/enums/conversion_environment_enum.proto + +require 'google/protobuf' + + +descriptor_data = "\n@google/ads/googleads/v25/enums/conversion_environment_enum.proto\x12\x1egoogle.ads.googleads.v25.enums\"d\n\x19\x43onversionEnvironmentEnum\"G\n\x15\x43onversionEnvironment\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x0b\n\x07UNKNOWN\x10\x01\x12\x07\n\x03\x41PP\x10\x02\x12\x07\n\x03WEB\x10\x03\x42\xf8\x01\n\"com.google.ads.googleads.v25.enumsB\x1e\x43onversionEnvironmentEnumProtoP\x01ZCgoogle.golang.org/genproto/googleapis/ads/googleads/v25/enums;enums\xa2\x02\x03GAA\xaa\x02\x1eGoogle.Ads.GoogleAds.V25.Enums\xca\x02\x1eGoogle\\Ads\\GoogleAds\\V25\\Enums\xea\x02\"Google::Ads::GoogleAds::V25::Enumsb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Enums + ConversionEnvironmentEnum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.enums.ConversionEnvironmentEnum").msgclass + ConversionEnvironmentEnum::ConversionEnvironment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.enums.ConversionEnvironmentEnum.ConversionEnvironment").enummodule + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/enums/conversion_lag_bucket_pb.rb b/lib/google/ads/google_ads/v25/enums/conversion_lag_bucket_pb.rb new file mode 100644 index 000000000..c5cb43372 --- /dev/null +++ b/lib/google/ads/google_ads/v25/enums/conversion_lag_bucket_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/enums/conversion_lag_bucket.proto + +require 'google/protobuf' + + +descriptor_data = "\n:google/ads/googleads/v25/enums/conversion_lag_bucket.proto\x12\x1egoogle.ads.googleads.v25.enums\"\xbb\x04\n\x17\x43onversionLagBucketEnum\"\x9f\x04\n\x13\x43onversionLagBucket\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x0b\n\x07UNKNOWN\x10\x01\x12\x15\n\x11LESS_THAN_ONE_DAY\x10\x02\x12\x13\n\x0fONE_TO_TWO_DAYS\x10\x03\x12\x15\n\x11TWO_TO_THREE_DAYS\x10\x04\x12\x16\n\x12THREE_TO_FOUR_DAYS\x10\x05\x12\x15\n\x11\x46OUR_TO_FIVE_DAYS\x10\x06\x12\x14\n\x10\x46IVE_TO_SIX_DAYS\x10\x07\x12\x15\n\x11SIX_TO_SEVEN_DAYS\x10\x08\x12\x17\n\x13SEVEN_TO_EIGHT_DAYS\x10\t\x12\x16\n\x12\x45IGHT_TO_NINE_DAYS\x10\n\x12\x14\n\x10NINE_TO_TEN_DAYS\x10\x0b\x12\x16\n\x12TEN_TO_ELEVEN_DAYS\x10\x0c\x12\x19\n\x15\x45LEVEN_TO_TWELVE_DAYS\x10\r\x12\x1b\n\x17TWELVE_TO_THIRTEEN_DAYS\x10\x0e\x12\x1d\n\x19THIRTEEN_TO_FOURTEEN_DAYS\x10\x0f\x12\x1f\n\x1b\x46OURTEEN_TO_TWENTY_ONE_DAYS\x10\x10\x12\x1d\n\x19TWENTY_ONE_TO_THIRTY_DAYS\x10\x11\x12\x1d\n\x19THIRTY_TO_FORTY_FIVE_DAYS\x10\x12\x12\x1c\n\x18\x46ORTY_FIVE_TO_SIXTY_DAYS\x10\x13\x12\x18\n\x14SIXTY_TO_NINETY_DAYS\x10\x14\x42\xf2\x01\n\"com.google.ads.googleads.v25.enumsB\x18\x43onversionLagBucketProtoP\x01ZCgoogle.golang.org/genproto/googleapis/ads/googleads/v25/enums;enums\xa2\x02\x03GAA\xaa\x02\x1eGoogle.Ads.GoogleAds.V25.Enums\xca\x02\x1eGoogle\\Ads\\GoogleAds\\V25\\Enums\xea\x02\"Google::Ads::GoogleAds::V25::Enumsb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Enums + ConversionLagBucketEnum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.enums.ConversionLagBucketEnum").msgclass + ConversionLagBucketEnum::ConversionLagBucket = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.enums.ConversionLagBucketEnum.ConversionLagBucket").enummodule + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/enums/conversion_or_adjustment_lag_bucket_pb.rb b/lib/google/ads/google_ads/v25/enums/conversion_or_adjustment_lag_bucket_pb.rb new file mode 100644 index 000000000..0edaa7b82 --- /dev/null +++ b/lib/google/ads/google_ads/v25/enums/conversion_or_adjustment_lag_bucket_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/enums/conversion_or_adjustment_lag_bucket.proto + +require 'google/protobuf' + + +descriptor_data = "\nHgoogle/ads/googleads/v25/enums/conversion_or_adjustment_lag_bucket.proto\x12\x1egoogle.ads.googleads.v25.enums\"\xcb\x0c\n#ConversionOrAdjustmentLagBucketEnum\"\xa3\x0c\n\x1f\x43onversionOrAdjustmentLagBucket\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x0b\n\x07UNKNOWN\x10\x01\x12 \n\x1c\x43ONVERSION_LESS_THAN_ONE_DAY\x10\x02\x12\x1e\n\x1a\x43ONVERSION_ONE_TO_TWO_DAYS\x10\x03\x12 \n\x1c\x43ONVERSION_TWO_TO_THREE_DAYS\x10\x04\x12!\n\x1d\x43ONVERSION_THREE_TO_FOUR_DAYS\x10\x05\x12 \n\x1c\x43ONVERSION_FOUR_TO_FIVE_DAYS\x10\x06\x12\x1f\n\x1b\x43ONVERSION_FIVE_TO_SIX_DAYS\x10\x07\x12 \n\x1c\x43ONVERSION_SIX_TO_SEVEN_DAYS\x10\x08\x12\"\n\x1e\x43ONVERSION_SEVEN_TO_EIGHT_DAYS\x10\t\x12!\n\x1d\x43ONVERSION_EIGHT_TO_NINE_DAYS\x10\n\x12\x1f\n\x1b\x43ONVERSION_NINE_TO_TEN_DAYS\x10\x0b\x12!\n\x1d\x43ONVERSION_TEN_TO_ELEVEN_DAYS\x10\x0c\x12$\n CONVERSION_ELEVEN_TO_TWELVE_DAYS\x10\r\x12&\n\"CONVERSION_TWELVE_TO_THIRTEEN_DAYS\x10\x0e\x12(\n$CONVERSION_THIRTEEN_TO_FOURTEEN_DAYS\x10\x0f\x12*\n&CONVERSION_FOURTEEN_TO_TWENTY_ONE_DAYS\x10\x10\x12(\n$CONVERSION_TWENTY_ONE_TO_THIRTY_DAYS\x10\x11\x12(\n$CONVERSION_THIRTY_TO_FORTY_FIVE_DAYS\x10\x12\x12\'\n#CONVERSION_FORTY_FIVE_TO_SIXTY_DAYS\x10\x13\x12#\n\x1f\x43ONVERSION_SIXTY_TO_NINETY_DAYS\x10\x14\x12 \n\x1c\x41\x44JUSTMENT_LESS_THAN_ONE_DAY\x10\x15\x12\x1e\n\x1a\x41\x44JUSTMENT_ONE_TO_TWO_DAYS\x10\x16\x12 \n\x1c\x41\x44JUSTMENT_TWO_TO_THREE_DAYS\x10\x17\x12!\n\x1d\x41\x44JUSTMENT_THREE_TO_FOUR_DAYS\x10\x18\x12 \n\x1c\x41\x44JUSTMENT_FOUR_TO_FIVE_DAYS\x10\x19\x12\x1f\n\x1b\x41\x44JUSTMENT_FIVE_TO_SIX_DAYS\x10\x1a\x12 \n\x1c\x41\x44JUSTMENT_SIX_TO_SEVEN_DAYS\x10\x1b\x12\"\n\x1e\x41\x44JUSTMENT_SEVEN_TO_EIGHT_DAYS\x10\x1c\x12!\n\x1d\x41\x44JUSTMENT_EIGHT_TO_NINE_DAYS\x10\x1d\x12\x1f\n\x1b\x41\x44JUSTMENT_NINE_TO_TEN_DAYS\x10\x1e\x12!\n\x1d\x41\x44JUSTMENT_TEN_TO_ELEVEN_DAYS\x10\x1f\x12$\n ADJUSTMENT_ELEVEN_TO_TWELVE_DAYS\x10 \x12&\n\"ADJUSTMENT_TWELVE_TO_THIRTEEN_DAYS\x10!\x12(\n$ADJUSTMENT_THIRTEEN_TO_FOURTEEN_DAYS\x10\"\x12*\n&ADJUSTMENT_FOURTEEN_TO_TWENTY_ONE_DAYS\x10#\x12(\n$ADJUSTMENT_TWENTY_ONE_TO_THIRTY_DAYS\x10$\x12(\n$ADJUSTMENT_THIRTY_TO_FORTY_FIVE_DAYS\x10%\x12\'\n#ADJUSTMENT_FORTY_FIVE_TO_SIXTY_DAYS\x10&\x12#\n\x1f\x41\x44JUSTMENT_SIXTY_TO_NINETY_DAYS\x10\'\x12\x38\n4ADJUSTMENT_NINETY_TO_ONE_HUNDRED_AND_FORTY_FIVE_DAYS\x10(\x12\x16\n\x12\x43ONVERSION_UNKNOWN\x10)\x12\x16\n\x12\x41\x44JUSTMENT_UNKNOWN\x10*B\xfe\x01\n\"com.google.ads.googleads.v25.enumsB$ConversionOrAdjustmentLagBucketProtoP\x01ZCgoogle.golang.org/genproto/googleapis/ads/googleads/v25/enums;enums\xa2\x02\x03GAA\xaa\x02\x1eGoogle.Ads.GoogleAds.V25.Enums\xca\x02\x1eGoogle\\Ads\\GoogleAds\\V25\\Enums\xea\x02\"Google::Ads::GoogleAds::V25::Enumsb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Enums + ConversionOrAdjustmentLagBucketEnum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.enums.ConversionOrAdjustmentLagBucketEnum").msgclass + ConversionOrAdjustmentLagBucketEnum::ConversionOrAdjustmentLagBucket = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.enums.ConversionOrAdjustmentLagBucketEnum.ConversionOrAdjustmentLagBucket").enummodule + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/enums/conversion_origin_pb.rb b/lib/google/ads/google_ads/v25/enums/conversion_origin_pb.rb new file mode 100644 index 000000000..382825d8e --- /dev/null +++ b/lib/google/ads/google_ads/v25/enums/conversion_origin_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/enums/conversion_origin.proto + +require 'google/protobuf' + + +descriptor_data = "\n6google/ads/googleads/v25/enums/conversion_origin.proto\x12\x1egoogle.ads.googleads.v25.enums\"\xbc\x01\n\x14\x43onversionOriginEnum\"\xa3\x01\n\x10\x43onversionOrigin\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x0b\n\x07UNKNOWN\x10\x01\x12\x0b\n\x07WEBSITE\x10\x02\x12\x11\n\rGOOGLE_HOSTED\x10\x03\x12\x07\n\x03\x41PP\x10\x04\x12\x11\n\rCALL_FROM_ADS\x10\x05\x12\t\n\x05STORE\x10\x06\x12\x12\n\x0eYOUTUBE_HOSTED\x10\x07\x12\x16\n\x12LOCAL_SERVICES_ADS\x10\x08\x42\xef\x01\n\"com.google.ads.googleads.v25.enumsB\x15\x43onversionOriginProtoP\x01ZCgoogle.golang.org/genproto/googleapis/ads/googleads/v25/enums;enums\xa2\x02\x03GAA\xaa\x02\x1eGoogle.Ads.GoogleAds.V25.Enums\xca\x02\x1eGoogle\\Ads\\GoogleAds\\V25\\Enums\xea\x02\"Google::Ads::GoogleAds::V25::Enumsb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Enums + ConversionOriginEnum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.enums.ConversionOriginEnum").msgclass + ConversionOriginEnum::ConversionOrigin = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.enums.ConversionOriginEnum.ConversionOrigin").enummodule + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/enums/conversion_tracking_status_enum_pb.rb b/lib/google/ads/google_ads/v25/enums/conversion_tracking_status_enum_pb.rb new file mode 100644 index 000000000..f334dfdc3 --- /dev/null +++ b/lib/google/ads/google_ads/v25/enums/conversion_tracking_status_enum_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/enums/conversion_tracking_status_enum.proto + +require 'google/protobuf' + + +descriptor_data = "\nDgoogle/ads/googleads/v25/enums/conversion_tracking_status_enum.proto\x12\x1egoogle.ads.googleads.v25.enums\"\x83\x02\n\x1c\x43onversionTrackingStatusEnum\"\xe2\x01\n\x18\x43onversionTrackingStatus\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x0b\n\x07UNKNOWN\x10\x01\x12\x1a\n\x16NOT_CONVERSION_TRACKED\x10\x02\x12\'\n#CONVERSION_TRACKING_MANAGED_BY_SELF\x10\x03\x12/\n+CONVERSION_TRACKING_MANAGED_BY_THIS_MANAGER\x10\x04\x12\x32\n.CONVERSION_TRACKING_MANAGED_BY_ANOTHER_MANAGER\x10\x05\x42\xfb\x01\n\"com.google.ads.googleads.v25.enumsB!ConversionTrackingStatusEnumProtoP\x01ZCgoogle.golang.org/genproto/googleapis/ads/googleads/v25/enums;enums\xa2\x02\x03GAA\xaa\x02\x1eGoogle.Ads.GoogleAds.V25.Enums\xca\x02\x1eGoogle\\Ads\\GoogleAds\\V25\\Enums\xea\x02\"Google::Ads::GoogleAds::V25::Enumsb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Enums + ConversionTrackingStatusEnum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.enums.ConversionTrackingStatusEnum").msgclass + ConversionTrackingStatusEnum::ConversionTrackingStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.enums.ConversionTrackingStatusEnum.ConversionTrackingStatus").enummodule + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/enums/conversion_value_rule_primary_dimension_pb.rb b/lib/google/ads/google_ads/v25/enums/conversion_value_rule_primary_dimension_pb.rb new file mode 100644 index 000000000..fa3b7e16c --- /dev/null +++ b/lib/google/ads/google_ads/v25/enums/conversion_value_rule_primary_dimension_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/enums/conversion_value_rule_primary_dimension.proto + +require 'google/protobuf' + + +descriptor_data = "\nLgoogle/ads/googleads/v25/enums/conversion_value_rule_primary_dimension.proto\x12\x1egoogle.ads.googleads.v25.enums\"\xf6\x01\n\'ConversionValueRulePrimaryDimensionEnum\"\xca\x01\n#ConversionValueRulePrimaryDimension\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x0b\n\x07UNKNOWN\x10\x01\x12\x13\n\x0fNO_RULE_APPLIED\x10\x02\x12\x0c\n\x08ORIGINAL\x10\x03\x12\x19\n\x15NEW_VS_RETURNING_USER\x10\x04\x12\x10\n\x0cGEO_LOCATION\x10\x05\x12\n\n\x06\x44\x45VICE\x10\x06\x12\x0c\n\x08\x41UDIENCE\x10\x07\x12\x0c\n\x08MULTIPLE\x10\x08\x12\r\n\tITINERARY\x10\tB\x82\x02\n\"com.google.ads.googleads.v25.enumsB(ConversionValueRulePrimaryDimensionProtoP\x01ZCgoogle.golang.org/genproto/googleapis/ads/googleads/v25/enums;enums\xa2\x02\x03GAA\xaa\x02\x1eGoogle.Ads.GoogleAds.V25.Enums\xca\x02\x1eGoogle\\Ads\\GoogleAds\\V25\\Enums\xea\x02\"Google::Ads::GoogleAds::V25::Enumsb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Enums + ConversionValueRulePrimaryDimensionEnum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.enums.ConversionValueRulePrimaryDimensionEnum").msgclass + ConversionValueRulePrimaryDimensionEnum::ConversionValueRulePrimaryDimension = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.enums.ConversionValueRulePrimaryDimensionEnum.ConversionValueRulePrimaryDimension").enummodule + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/enums/conversion_value_rule_set_status_pb.rb b/lib/google/ads/google_ads/v25/enums/conversion_value_rule_set_status_pb.rb new file mode 100644 index 000000000..0502a1841 --- /dev/null +++ b/lib/google/ads/google_ads/v25/enums/conversion_value_rule_set_status_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/enums/conversion_value_rule_set_status.proto + +require 'google/protobuf' + + +descriptor_data = "\nEgoogle/ads/googleads/v25/enums/conversion_value_rule_set_status.proto\x12\x1egoogle.ads.googleads.v25.enums\"\x86\x01\n ConversionValueRuleSetStatusEnum\"b\n\x1c\x43onversionValueRuleSetStatus\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x0b\n\x07UNKNOWN\x10\x01\x12\x0b\n\x07\x45NABLED\x10\x02\x12\x0b\n\x07REMOVED\x10\x03\x12\n\n\x06PAUSED\x10\x04\x42\xfb\x01\n\"com.google.ads.googleads.v25.enumsB!ConversionValueRuleSetStatusProtoP\x01ZCgoogle.golang.org/genproto/googleapis/ads/googleads/v25/enums;enums\xa2\x02\x03GAA\xaa\x02\x1eGoogle.Ads.GoogleAds.V25.Enums\xca\x02\x1eGoogle\\Ads\\GoogleAds\\V25\\Enums\xea\x02\"Google::Ads::GoogleAds::V25::Enumsb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Enums + ConversionValueRuleSetStatusEnum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.enums.ConversionValueRuleSetStatusEnum").msgclass + ConversionValueRuleSetStatusEnum::ConversionValueRuleSetStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.enums.ConversionValueRuleSetStatusEnum.ConversionValueRuleSetStatus").enummodule + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/enums/conversion_value_rule_status_pb.rb b/lib/google/ads/google_ads/v25/enums/conversion_value_rule_status_pb.rb new file mode 100644 index 000000000..8e6ca3ac3 --- /dev/null +++ b/lib/google/ads/google_ads/v25/enums/conversion_value_rule_status_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/enums/conversion_value_rule_status.proto + +require 'google/protobuf' + + +descriptor_data = "\nAgoogle/ads/googleads/v25/enums/conversion_value_rule_status.proto\x12\x1egoogle.ads.googleads.v25.enums\"\x80\x01\n\x1d\x43onversionValueRuleStatusEnum\"_\n\x19\x43onversionValueRuleStatus\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x0b\n\x07UNKNOWN\x10\x01\x12\x0b\n\x07\x45NABLED\x10\x02\x12\x0b\n\x07REMOVED\x10\x03\x12\n\n\x06PAUSED\x10\x04\x42\xf8\x01\n\"com.google.ads.googleads.v25.enumsB\x1e\x43onversionValueRuleStatusProtoP\x01ZCgoogle.golang.org/genproto/googleapis/ads/googleads/v25/enums;enums\xa2\x02\x03GAA\xaa\x02\x1eGoogle.Ads.GoogleAds.V25.Enums\xca\x02\x1eGoogle\\Ads\\GoogleAds\\V25\\Enums\xea\x02\"Google::Ads::GoogleAds::V25::Enumsb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Enums + ConversionValueRuleStatusEnum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.enums.ConversionValueRuleStatusEnum").msgclass + ConversionValueRuleStatusEnum::ConversionValueRuleStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.enums.ConversionValueRuleStatusEnum.ConversionValueRuleStatus").enummodule + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/enums/converting_user_prior_engagement_type_and_ltv_bucket_pb.rb b/lib/google/ads/google_ads/v25/enums/converting_user_prior_engagement_type_and_ltv_bucket_pb.rb new file mode 100644 index 000000000..537fe8ed8 --- /dev/null +++ b/lib/google/ads/google_ads/v25/enums/converting_user_prior_engagement_type_and_ltv_bucket_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/enums/converting_user_prior_engagement_type_and_ltv_bucket.proto + +require 'google/protobuf' + + +descriptor_data = "\nYgoogle/ads/googleads/v25/enums/converting_user_prior_engagement_type_and_ltv_bucket.proto\x12\x1egoogle.ads.googleads.v25.enums\"\xb0\x01\n1ConvertingUserPriorEngagementTypeAndLtvBucketEnum\"{\n-ConvertingUserPriorEngagementTypeAndLtvBucket\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x0b\n\x07UNKNOWN\x10\x01\x12\x07\n\x03NEW\x10\x02\x12\r\n\tRETURNING\x10\x03\x12\x14\n\x10NEW_AND_HIGH_LTV\x10\x04\x42\x8c\x02\n\"com.google.ads.googleads.v25.enumsB2ConvertingUserPriorEngagementTypeAndLtvBucketProtoP\x01ZCgoogle.golang.org/genproto/googleapis/ads/googleads/v25/enums;enums\xa2\x02\x03GAA\xaa\x02\x1eGoogle.Ads.GoogleAds.V25.Enums\xca\x02\x1eGoogle\\Ads\\GoogleAds\\V25\\Enums\xea\x02\"Google::Ads::GoogleAds::V25::Enumsb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Enums + ConvertingUserPriorEngagementTypeAndLtvBucketEnum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.enums.ConvertingUserPriorEngagementTypeAndLtvBucketEnum").msgclass + ConvertingUserPriorEngagementTypeAndLtvBucketEnum::ConvertingUserPriorEngagementTypeAndLtvBucket = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.enums.ConvertingUserPriorEngagementTypeAndLtvBucketEnum.ConvertingUserPriorEngagementTypeAndLtvBucket").enummodule + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/enums/criterion_category_channel_availability_mode_pb.rb b/lib/google/ads/google_ads/v25/enums/criterion_category_channel_availability_mode_pb.rb new file mode 100644 index 000000000..6809bfd12 --- /dev/null +++ b/lib/google/ads/google_ads/v25/enums/criterion_category_channel_availability_mode_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/enums/criterion_category_channel_availability_mode.proto + +require 'google/protobuf' + + +descriptor_data = "\nQgoogle/ads/googleads/v25/enums/criterion_category_channel_availability_mode.proto\x12\x1egoogle.ads.googleads.v25.enums\"\xd4\x01\n,CriterionCategoryChannelAvailabilityModeEnum\"\xa3\x01\n(CriterionCategoryChannelAvailabilityMode\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x0b\n\x07UNKNOWN\x10\x01\x12\x10\n\x0c\x41LL_CHANNELS\x10\x02\x12!\n\x1d\x43HANNEL_TYPE_AND_ALL_SUBTYPES\x10\x03\x12$\n CHANNEL_TYPE_AND_SUBSET_SUBTYPES\x10\x04\x42\x87\x02\n\"com.google.ads.googleads.v25.enumsB-CriterionCategoryChannelAvailabilityModeProtoP\x01ZCgoogle.golang.org/genproto/googleapis/ads/googleads/v25/enums;enums\xa2\x02\x03GAA\xaa\x02\x1eGoogle.Ads.GoogleAds.V25.Enums\xca\x02\x1eGoogle\\Ads\\GoogleAds\\V25\\Enums\xea\x02\"Google::Ads::GoogleAds::V25::Enumsb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Enums + CriterionCategoryChannelAvailabilityModeEnum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.enums.CriterionCategoryChannelAvailabilityModeEnum").msgclass + CriterionCategoryChannelAvailabilityModeEnum::CriterionCategoryChannelAvailabilityMode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.enums.CriterionCategoryChannelAvailabilityModeEnum.CriterionCategoryChannelAvailabilityMode").enummodule + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/enums/criterion_category_locale_availability_mode_pb.rb b/lib/google/ads/google_ads/v25/enums/criterion_category_locale_availability_mode_pb.rb new file mode 100644 index 000000000..ecf8b31c3 --- /dev/null +++ b/lib/google/ads/google_ads/v25/enums/criterion_category_locale_availability_mode_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/enums/criterion_category_locale_availability_mode.proto + +require 'google/protobuf' + + +descriptor_data = "\nPgoogle/ads/googleads/v25/enums/criterion_category_locale_availability_mode.proto\x12\x1egoogle.ads.googleads.v25.enums\"\xe1\x01\n+CriterionCategoryLocaleAvailabilityModeEnum\"\xb1\x01\n\'CriterionCategoryLocaleAvailabilityMode\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x0b\n\x07UNKNOWN\x10\x01\x12\x0f\n\x0b\x41LL_LOCALES\x10\x02\x12\x1d\n\x19\x43OUNTRY_AND_ALL_LANGUAGES\x10\x03\x12\x1e\n\x1aLANGUAGE_AND_ALL_COUNTRIES\x10\x04\x12\x18\n\x14\x43OUNTRY_AND_LANGUAGE\x10\x05\x42\x86\x02\n\"com.google.ads.googleads.v25.enumsB,CriterionCategoryLocaleAvailabilityModeProtoP\x01ZCgoogle.golang.org/genproto/googleapis/ads/googleads/v25/enums;enums\xa2\x02\x03GAA\xaa\x02\x1eGoogle.Ads.GoogleAds.V25.Enums\xca\x02\x1eGoogle\\Ads\\GoogleAds\\V25\\Enums\xea\x02\"Google::Ads::GoogleAds::V25::Enumsb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Enums + CriterionCategoryLocaleAvailabilityModeEnum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.enums.CriterionCategoryLocaleAvailabilityModeEnum").msgclass + CriterionCategoryLocaleAvailabilityModeEnum::CriterionCategoryLocaleAvailabilityMode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.enums.CriterionCategoryLocaleAvailabilityModeEnum.CriterionCategoryLocaleAvailabilityMode").enummodule + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/enums/criterion_system_serving_status_pb.rb b/lib/google/ads/google_ads/v25/enums/criterion_system_serving_status_pb.rb new file mode 100644 index 000000000..94c0daf93 --- /dev/null +++ b/lib/google/ads/google_ads/v25/enums/criterion_system_serving_status_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/enums/criterion_system_serving_status.proto + +require 'google/protobuf' + + +descriptor_data = "\nDgoogle/ads/googleads/v25/enums/criterion_system_serving_status.proto\x12\x1egoogle.ads.googleads.v25.enums\"\x81\x01\n CriterionSystemServingStatusEnum\"]\n\x1c\x43riterionSystemServingStatus\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x0b\n\x07UNKNOWN\x10\x01\x12\x0c\n\x08\x45LIGIBLE\x10\x02\x12\x11\n\rRARELY_SERVED\x10\x03\x42\xfb\x01\n\"com.google.ads.googleads.v25.enumsB!CriterionSystemServingStatusProtoP\x01ZCgoogle.golang.org/genproto/googleapis/ads/googleads/v25/enums;enums\xa2\x02\x03GAA\xaa\x02\x1eGoogle.Ads.GoogleAds.V25.Enums\xca\x02\x1eGoogle\\Ads\\GoogleAds\\V25\\Enums\xea\x02\"Google::Ads::GoogleAds::V25::Enumsb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Enums + CriterionSystemServingStatusEnum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.enums.CriterionSystemServingStatusEnum").msgclass + CriterionSystemServingStatusEnum::CriterionSystemServingStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.enums.CriterionSystemServingStatusEnum.CriterionSystemServingStatus").enummodule + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/enums/criterion_type_pb.rb b/lib/google/ads/google_ads/v25/enums/criterion_type_pb.rb new file mode 100644 index 000000000..0c4d05840 --- /dev/null +++ b/lib/google/ads/google_ads/v25/enums/criterion_type_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/enums/criterion_type.proto + +require 'google/protobuf' + + +descriptor_data = "\n3google/ads/googleads/v25/enums/criterion_type.proto\x12\x1egoogle.ads.googleads.v25.enums\"\xbf\x07\n\x11\x43riterionTypeEnum\"\xa9\x07\n\rCriterionType\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x0b\n\x07UNKNOWN\x10\x01\x12\x0b\n\x07KEYWORD\x10\x02\x12\r\n\tPLACEMENT\x10\x03\x12\x17\n\x13MOBILE_APP_CATEGORY\x10\x04\x12\x16\n\x12MOBILE_APPLICATION\x10\x05\x12\n\n\x06\x44\x45VICE\x10\x06\x12\x0c\n\x08LOCATION\x10\x07\x12\x11\n\rLISTING_GROUP\x10\x08\x12\x0f\n\x0b\x41\x44_SCHEDULE\x10\t\x12\r\n\tAGE_RANGE\x10\n\x12\n\n\x06GENDER\x10\x0b\x12\x10\n\x0cINCOME_RANGE\x10\x0c\x12\x13\n\x0fPARENTAL_STATUS\x10\r\x12\x11\n\rYOUTUBE_VIDEO\x10\x0e\x12\x13\n\x0fYOUTUBE_CHANNEL\x10\x0f\x12\r\n\tUSER_LIST\x10\x10\x12\r\n\tPROXIMITY\x10\x11\x12\t\n\x05TOPIC\x10\x12\x12\x11\n\rLISTING_SCOPE\x10\x13\x12\x0c\n\x08LANGUAGE\x10\x14\x12\x0c\n\x08IP_BLOCK\x10\x15\x12\x11\n\rCONTENT_LABEL\x10\x16\x12\x0b\n\x07\x43\x41RRIER\x10\x17\x12\x11\n\rUSER_INTEREST\x10\x18\x12\x0b\n\x07WEBPAGE\x10\x19\x12\x1c\n\x18OPERATING_SYSTEM_VERSION\x10\x1a\x12\x15\n\x11\x41PP_PAYMENT_MODEL\x10\x1b\x12\x11\n\rMOBILE_DEVICE\x10\x1c\x12\x13\n\x0f\x43USTOM_AFFINITY\x10\x1d\x12\x11\n\rCUSTOM_INTENT\x10\x1e\x12\x12\n\x0eLOCATION_GROUP\x10\x1f\x12\x13\n\x0f\x43USTOM_AUDIENCE\x10 \x12\x15\n\x11\x43OMBINED_AUDIENCE\x10!\x12\x11\n\rKEYWORD_THEME\x10\"\x12\x0c\n\x08\x41UDIENCE\x10#\x12\x19\n\x15NEGATIVE_KEYWORD_LIST\x10$\x12\x14\n\x10LOCAL_SERVICE_ID\x10%\x12\x10\n\x0cSEARCH_THEME\x10&\x12\t\n\x05\x42RAND\x10\'\x12\x0e\n\nBRAND_LIST\x10(\x12\x0e\n\nLIFE_EVENT\x10)\x12\x10\n\x0cWEBPAGE_LIST\x10*\x12\x10\n\x0cVIDEO_LINEUP\x10+\x12\x12\n\x0ePLACEMENT_LIST\x10,\x12%\n!VERTICAL_ADS_ITEM_GROUP_RULE_LIST\x10-\x12 \n\x1cVERTICAL_ADS_ITEM_GROUP_RULE\x10.\x12\x19\n\x14RETAIL_FILTER_BUNDLE\x10\xb4\x01\x12\x12\n\rRETAIL_FILTER\x10\xb5\x01\x42\xec\x01\n\"com.google.ads.googleads.v25.enumsB\x12\x43riterionTypeProtoP\x01ZCgoogle.golang.org/genproto/googleapis/ads/googleads/v25/enums;enums\xa2\x02\x03GAA\xaa\x02\x1eGoogle.Ads.GoogleAds.V25.Enums\xca\x02\x1eGoogle\\Ads\\GoogleAds\\V25\\Enums\xea\x02\"Google::Ads::GoogleAds::V25::Enumsb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Enums + CriterionTypeEnum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.enums.CriterionTypeEnum").msgclass + CriterionTypeEnum::CriterionType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.enums.CriterionTypeEnum.CriterionType").enummodule + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/enums/custom_audience_member_type_pb.rb b/lib/google/ads/google_ads/v25/enums/custom_audience_member_type_pb.rb new file mode 100644 index 000000000..4c2621c64 --- /dev/null +++ b/lib/google/ads/google_ads/v25/enums/custom_audience_member_type_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/enums/custom_audience_member_type.proto + +require 'google/protobuf' + + +descriptor_data = "\n@google/ads/googleads/v25/enums/custom_audience_member_type.proto\x12\x1egoogle.ads.googleads.v25.enums\"\x8b\x01\n\x1c\x43ustomAudienceMemberTypeEnum\"k\n\x18\x43ustomAudienceMemberType\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x0b\n\x07UNKNOWN\x10\x01\x12\x0b\n\x07KEYWORD\x10\x02\x12\x07\n\x03URL\x10\x03\x12\x12\n\x0ePLACE_CATEGORY\x10\x04\x12\x07\n\x03\x41PP\x10\x05\x42\xf7\x01\n\"com.google.ads.googleads.v25.enumsB\x1d\x43ustomAudienceMemberTypeProtoP\x01ZCgoogle.golang.org/genproto/googleapis/ads/googleads/v25/enums;enums\xa2\x02\x03GAA\xaa\x02\x1eGoogle.Ads.GoogleAds.V25.Enums\xca\x02\x1eGoogle\\Ads\\GoogleAds\\V25\\Enums\xea\x02\"Google::Ads::GoogleAds::V25::Enumsb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Enums + CustomAudienceMemberTypeEnum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.enums.CustomAudienceMemberTypeEnum").msgclass + CustomAudienceMemberTypeEnum::CustomAudienceMemberType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.enums.CustomAudienceMemberTypeEnum.CustomAudienceMemberType").enummodule + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/enums/custom_audience_status_pb.rb b/lib/google/ads/google_ads/v25/enums/custom_audience_status_pb.rb new file mode 100644 index 000000000..f2ed6c174 --- /dev/null +++ b/lib/google/ads/google_ads/v25/enums/custom_audience_status_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/enums/custom_audience_status.proto + +require 'google/protobuf' + + +descriptor_data = "\n;google/ads/googleads/v25/enums/custom_audience_status.proto\x12\x1egoogle.ads.googleads.v25.enums\"j\n\x18\x43ustomAudienceStatusEnum\"N\n\x14\x43ustomAudienceStatus\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x0b\n\x07UNKNOWN\x10\x01\x12\x0b\n\x07\x45NABLED\x10\x02\x12\x0b\n\x07REMOVED\x10\x03\x42\xf3\x01\n\"com.google.ads.googleads.v25.enumsB\x19\x43ustomAudienceStatusProtoP\x01ZCgoogle.golang.org/genproto/googleapis/ads/googleads/v25/enums;enums\xa2\x02\x03GAA\xaa\x02\x1eGoogle.Ads.GoogleAds.V25.Enums\xca\x02\x1eGoogle\\Ads\\GoogleAds\\V25\\Enums\xea\x02\"Google::Ads::GoogleAds::V25::Enumsb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Enums + CustomAudienceStatusEnum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.enums.CustomAudienceStatusEnum").msgclass + CustomAudienceStatusEnum::CustomAudienceStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.enums.CustomAudienceStatusEnum.CustomAudienceStatus").enummodule + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/enums/custom_audience_type_pb.rb b/lib/google/ads/google_ads/v25/enums/custom_audience_type_pb.rb new file mode 100644 index 000000000..0c49abd8f --- /dev/null +++ b/lib/google/ads/google_ads/v25/enums/custom_audience_type_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/enums/custom_audience_type.proto + +require 'google/protobuf' + + +descriptor_data = "\n9google/ads/googleads/v25/enums/custom_audience_type.proto\x12\x1egoogle.ads.googleads.v25.enums\"\x85\x01\n\x16\x43ustomAudienceTypeEnum\"k\n\x12\x43ustomAudienceType\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x0b\n\x07UNKNOWN\x10\x01\x12\x08\n\x04\x41UTO\x10\x02\x12\x0c\n\x08INTEREST\x10\x03\x12\x13\n\x0fPURCHASE_INTENT\x10\x04\x12\n\n\x06SEARCH\x10\x05\x42\xf1\x01\n\"com.google.ads.googleads.v25.enumsB\x17\x43ustomAudienceTypeProtoP\x01ZCgoogle.golang.org/genproto/googleapis/ads/googleads/v25/enums;enums\xa2\x02\x03GAA\xaa\x02\x1eGoogle.Ads.GoogleAds.V25.Enums\xca\x02\x1eGoogle\\Ads\\GoogleAds\\V25\\Enums\xea\x02\"Google::Ads::GoogleAds::V25::Enumsb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Enums + CustomAudienceTypeEnum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.enums.CustomAudienceTypeEnum").msgclass + CustomAudienceTypeEnum::CustomAudienceType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.enums.CustomAudienceTypeEnum.CustomAudienceType").enummodule + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/enums/custom_conversion_goal_status_pb.rb b/lib/google/ads/google_ads/v25/enums/custom_conversion_goal_status_pb.rb new file mode 100644 index 000000000..606df0f57 --- /dev/null +++ b/lib/google/ads/google_ads/v25/enums/custom_conversion_goal_status_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/enums/custom_conversion_goal_status.proto + +require 'google/protobuf' + + +descriptor_data = "\nBgoogle/ads/googleads/v25/enums/custom_conversion_goal_status.proto\x12\x1egoogle.ads.googleads.v25.enums\"v\n\x1e\x43ustomConversionGoalStatusEnum\"T\n\x1a\x43ustomConversionGoalStatus\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x0b\n\x07UNKNOWN\x10\x01\x12\x0b\n\x07\x45NABLED\x10\x02\x12\x0b\n\x07REMOVED\x10\x03\x42\xf9\x01\n\"com.google.ads.googleads.v25.enumsB\x1f\x43ustomConversionGoalStatusProtoP\x01ZCgoogle.golang.org/genproto/googleapis/ads/googleads/v25/enums;enums\xa2\x02\x03GAA\xaa\x02\x1eGoogle.Ads.GoogleAds.V25.Enums\xca\x02\x1eGoogle\\Ads\\GoogleAds\\V25\\Enums\xea\x02\"Google::Ads::GoogleAds::V25::Enumsb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Enums + CustomConversionGoalStatusEnum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.enums.CustomConversionGoalStatusEnum").msgclass + CustomConversionGoalStatusEnum::CustomConversionGoalStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.enums.CustomConversionGoalStatusEnum.CustomConversionGoalStatus").enummodule + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/enums/custom_interest_member_type_pb.rb b/lib/google/ads/google_ads/v25/enums/custom_interest_member_type_pb.rb new file mode 100644 index 000000000..8113bc2e1 --- /dev/null +++ b/lib/google/ads/google_ads/v25/enums/custom_interest_member_type_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/enums/custom_interest_member_type.proto + +require 'google/protobuf' + + +descriptor_data = "\n@google/ads/googleads/v25/enums/custom_interest_member_type.proto\x12\x1egoogle.ads.googleads.v25.enums\"n\n\x1c\x43ustomInterestMemberTypeEnum\"N\n\x18\x43ustomInterestMemberType\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x0b\n\x07UNKNOWN\x10\x01\x12\x0b\n\x07KEYWORD\x10\x02\x12\x07\n\x03URL\x10\x03\x42\xf7\x01\n\"com.google.ads.googleads.v25.enumsB\x1d\x43ustomInterestMemberTypeProtoP\x01ZCgoogle.golang.org/genproto/googleapis/ads/googleads/v25/enums;enums\xa2\x02\x03GAA\xaa\x02\x1eGoogle.Ads.GoogleAds.V25.Enums\xca\x02\x1eGoogle\\Ads\\GoogleAds\\V25\\Enums\xea\x02\"Google::Ads::GoogleAds::V25::Enumsb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Enums + CustomInterestMemberTypeEnum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.enums.CustomInterestMemberTypeEnum").msgclass + CustomInterestMemberTypeEnum::CustomInterestMemberType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.enums.CustomInterestMemberTypeEnum.CustomInterestMemberType").enummodule + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/enums/custom_interest_status_pb.rb b/lib/google/ads/google_ads/v25/enums/custom_interest_status_pb.rb new file mode 100644 index 000000000..5ae500e54 --- /dev/null +++ b/lib/google/ads/google_ads/v25/enums/custom_interest_status_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/enums/custom_interest_status.proto + +require 'google/protobuf' + + +descriptor_data = "\n;google/ads/googleads/v25/enums/custom_interest_status.proto\x12\x1egoogle.ads.googleads.v25.enums\"j\n\x18\x43ustomInterestStatusEnum\"N\n\x14\x43ustomInterestStatus\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x0b\n\x07UNKNOWN\x10\x01\x12\x0b\n\x07\x45NABLED\x10\x02\x12\x0b\n\x07REMOVED\x10\x03\x42\xf3\x01\n\"com.google.ads.googleads.v25.enumsB\x19\x43ustomInterestStatusProtoP\x01ZCgoogle.golang.org/genproto/googleapis/ads/googleads/v25/enums;enums\xa2\x02\x03GAA\xaa\x02\x1eGoogle.Ads.GoogleAds.V25.Enums\xca\x02\x1eGoogle\\Ads\\GoogleAds\\V25\\Enums\xea\x02\"Google::Ads::GoogleAds::V25::Enumsb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Enums + CustomInterestStatusEnum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.enums.CustomInterestStatusEnum").msgclass + CustomInterestStatusEnum::CustomInterestStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.enums.CustomInterestStatusEnum.CustomInterestStatus").enummodule + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/enums/custom_interest_type_pb.rb b/lib/google/ads/google_ads/v25/enums/custom_interest_type_pb.rb new file mode 100644 index 000000000..905823f45 --- /dev/null +++ b/lib/google/ads/google_ads/v25/enums/custom_interest_type_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/enums/custom_interest_type.proto + +require 'google/protobuf' + + +descriptor_data = "\n9google/ads/googleads/v25/enums/custom_interest_type.proto\x12\x1egoogle.ads.googleads.v25.enums\"t\n\x16\x43ustomInterestTypeEnum\"Z\n\x12\x43ustomInterestType\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x0b\n\x07UNKNOWN\x10\x01\x12\x13\n\x0f\x43USTOM_AFFINITY\x10\x02\x12\x11\n\rCUSTOM_INTENT\x10\x03\x42\xf1\x01\n\"com.google.ads.googleads.v25.enumsB\x17\x43ustomInterestTypeProtoP\x01ZCgoogle.golang.org/genproto/googleapis/ads/googleads/v25/enums;enums\xa2\x02\x03GAA\xaa\x02\x1eGoogle.Ads.GoogleAds.V25.Enums\xca\x02\x1eGoogle\\Ads\\GoogleAds\\V25\\Enums\xea\x02\"Google::Ads::GoogleAds::V25::Enumsb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Enums + CustomInterestTypeEnum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.enums.CustomInterestTypeEnum").msgclass + CustomInterestTypeEnum::CustomInterestType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.enums.CustomInterestTypeEnum.CustomInterestType").enummodule + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/enums/customer_lifecycle_optimization_goal_sub_type_pb.rb b/lib/google/ads/google_ads/v25/enums/customer_lifecycle_optimization_goal_sub_type_pb.rb new file mode 100644 index 000000000..816f947b5 --- /dev/null +++ b/lib/google/ads/google_ads/v25/enums/customer_lifecycle_optimization_goal_sub_type_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/enums/customer_lifecycle_optimization_goal_sub_type.proto + +require 'google/protobuf' + + +descriptor_data = "\nRgoogle/ads/googleads/v25/enums/customer_lifecycle_optimization_goal_sub_type.proto\x12\x1egoogle.ads.googleads.v25.enums\"\xb8\x02\n,CustomerLifecycleOptimizationGoalSubTypeEnum\"\x87\x02\n(CustomerLifecycleOptimizationGoalSubType\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x0b\n\x07UNKNOWN\x10\x01\x12\"\n\x1eNEW_CUSTOMER_ACQUISITION_VALUE\x10\x02\x12!\n\x1dNEW_CUSTOMER_ACQUISITION_ONLY\x10\x03\x12\x1c\n\x18\x43USTOMER_RETENTION_VALUE\x10\x04\x12\x1b\n\x17\x43USTOMER_RETENTION_ONLY\x10\x05\x12\x1b\n\x17LOYALTY_RETENTION_VALUE\x10\x07\x12\x1e\n\x1aLOYALTY_RETENTION_BENEFITS\x10\x08\x42\x87\x02\n\"com.google.ads.googleads.v25.enumsB-CustomerLifecycleOptimizationGoalSubTypeProtoP\x01ZCgoogle.golang.org/genproto/googleapis/ads/googleads/v25/enums;enums\xa2\x02\x03GAA\xaa\x02\x1eGoogle.Ads.GoogleAds.V25.Enums\xca\x02\x1eGoogle\\Ads\\GoogleAds\\V25\\Enums\xea\x02\"Google::Ads::GoogleAds::V25::Enumsb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Enums + CustomerLifecycleOptimizationGoalSubTypeEnum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.enums.CustomerLifecycleOptimizationGoalSubTypeEnum").msgclass + CustomerLifecycleOptimizationGoalSubTypeEnum::CustomerLifecycleOptimizationGoalSubType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.enums.CustomerLifecycleOptimizationGoalSubTypeEnum.CustomerLifecycleOptimizationGoalSubType").enummodule + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/enums/customer_lifecycle_optimization_mode_pb.rb b/lib/google/ads/google_ads/v25/enums/customer_lifecycle_optimization_mode_pb.rb new file mode 100644 index 000000000..3ea2c87cb --- /dev/null +++ b/lib/google/ads/google_ads/v25/enums/customer_lifecycle_optimization_mode_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/enums/customer_lifecycle_optimization_mode.proto + +require 'google/protobuf' + + +descriptor_data = "\nIgoogle/ads/googleads/v25/enums/customer_lifecycle_optimization_mode.proto\x12\x1egoogle.ads.googleads.v25.enums\"\x8f\x01\n%CustomerLifecycleOptimizationModeEnum\"f\n!CustomerLifecycleOptimizationMode\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x0b\n\x07UNKNOWN\x10\x01\x12\x0e\n\nTARGET_ALL\x10\x02\x12\x13\n\x0fTARGET_SPECIFIC\x10\x03\x42\x80\x02\n\"com.google.ads.googleads.v25.enumsB&CustomerLifecycleOptimizationModeProtoP\x01ZCgoogle.golang.org/genproto/googleapis/ads/googleads/v25/enums;enums\xa2\x02\x03GAA\xaa\x02\x1eGoogle.Ads.GoogleAds.V25.Enums\xca\x02\x1eGoogle\\Ads\\GoogleAds\\V25\\Enums\xea\x02\"Google::Ads::GoogleAds::V25::Enumsb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Enums + CustomerLifecycleOptimizationModeEnum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.enums.CustomerLifecycleOptimizationModeEnum").msgclass + CustomerLifecycleOptimizationModeEnum::CustomerLifecycleOptimizationMode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.enums.CustomerLifecycleOptimizationModeEnum.CustomerLifecycleOptimizationMode").enummodule + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/enums/customer_match_upload_key_type_pb.rb b/lib/google/ads/google_ads/v25/enums/customer_match_upload_key_type_pb.rb new file mode 100644 index 000000000..a02813a96 --- /dev/null +++ b/lib/google/ads/google_ads/v25/enums/customer_match_upload_key_type_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/enums/customer_match_upload_key_type.proto + +require 'google/protobuf' + + +descriptor_data = "\nCgoogle/ads/googleads/v25/enums/customer_match_upload_key_type.proto\x12\x1egoogle.ads.googleads.v25.enums\"\x95\x01\n\x1e\x43ustomerMatchUploadKeyTypeEnum\"s\n\x1a\x43ustomerMatchUploadKeyType\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x0b\n\x07UNKNOWN\x10\x01\x12\x10\n\x0c\x43ONTACT_INFO\x10\x02\x12\n\n\x06\x43RM_ID\x10\x03\x12\x19\n\x15MOBILE_ADVERTISING_ID\x10\x04\x42\xf9\x01\n\"com.google.ads.googleads.v25.enumsB\x1f\x43ustomerMatchUploadKeyTypeProtoP\x01ZCgoogle.golang.org/genproto/googleapis/ads/googleads/v25/enums;enums\xa2\x02\x03GAA\xaa\x02\x1eGoogle.Ads.GoogleAds.V25.Enums\xca\x02\x1eGoogle\\Ads\\GoogleAds\\V25\\Enums\xea\x02\"Google::Ads::GoogleAds::V25::Enumsb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Enums + CustomerMatchUploadKeyTypeEnum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.enums.CustomerMatchUploadKeyTypeEnum").msgclass + CustomerMatchUploadKeyTypeEnum::CustomerMatchUploadKeyType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.enums.CustomerMatchUploadKeyTypeEnum.CustomerMatchUploadKeyType").enummodule + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/enums/customer_pay_per_conversion_eligibility_failure_reason_pb.rb b/lib/google/ads/google_ads/v25/enums/customer_pay_per_conversion_eligibility_failure_reason_pb.rb new file mode 100644 index 000000000..791fffa31 --- /dev/null +++ b/lib/google/ads/google_ads/v25/enums/customer_pay_per_conversion_eligibility_failure_reason_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/enums/customer_pay_per_conversion_eligibility_failure_reason.proto + +require 'google/protobuf' + + +descriptor_data = "\n[google/ads/googleads/v25/enums/customer_pay_per_conversion_eligibility_failure_reason.proto\x12\x1egoogle.ads.googleads.v25.enums\"\xd1\x02\n4CustomerPayPerConversionEligibilityFailureReasonEnum\"\x98\x02\n0CustomerPayPerConversionEligibilityFailureReason\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x0b\n\x07UNKNOWN\x10\x01\x12\x1a\n\x16NOT_ENOUGH_CONVERSIONS\x10\x02\x12\x1b\n\x17\x43ONVERSION_LAG_TOO_HIGH\x10\x03\x12#\n\x1fHAS_CAMPAIGN_WITH_SHARED_BUDGET\x10\x04\x12 \n\x1cHAS_UPLOAD_CLICKS_CONVERSION\x10\x05\x12 \n\x1c\x41VERAGE_DAILY_SPEND_TOO_HIGH\x10\x06\x12\x19\n\x15\x41NALYSIS_NOT_COMPLETE\x10\x07\x12\t\n\x05OTHER\x10\x08\x42\x8f\x02\n\"com.google.ads.googleads.v25.enumsB5CustomerPayPerConversionEligibilityFailureReasonProtoP\x01ZCgoogle.golang.org/genproto/googleapis/ads/googleads/v25/enums;enums\xa2\x02\x03GAA\xaa\x02\x1eGoogle.Ads.GoogleAds.V25.Enums\xca\x02\x1eGoogle\\Ads\\GoogleAds\\V25\\Enums\xea\x02\"Google::Ads::GoogleAds::V25::Enumsb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Enums + CustomerPayPerConversionEligibilityFailureReasonEnum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.enums.CustomerPayPerConversionEligibilityFailureReasonEnum").msgclass + CustomerPayPerConversionEligibilityFailureReasonEnum::CustomerPayPerConversionEligibilityFailureReason = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.enums.CustomerPayPerConversionEligibilityFailureReasonEnum.CustomerPayPerConversionEligibilityFailureReason").enummodule + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/enums/customer_status_pb.rb b/lib/google/ads/google_ads/v25/enums/customer_status_pb.rb new file mode 100644 index 000000000..c9d30ff78 --- /dev/null +++ b/lib/google/ads/google_ads/v25/enums/customer_status_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/enums/customer_status.proto + +require 'google/protobuf' + + +descriptor_data = "\n4google/ads/googleads/v25/enums/customer_status.proto\x12\x1egoogle.ads.googleads.v25.enums\"z\n\x12\x43ustomerStatusEnum\"d\n\x0e\x43ustomerStatus\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x0b\n\x07UNKNOWN\x10\x01\x12\x0b\n\x07\x45NABLED\x10\x02\x12\x0c\n\x08\x43\x41NCELED\x10\x03\x12\r\n\tSUSPENDED\x10\x04\x12\n\n\x06\x43LOSED\x10\x05\x42\xed\x01\n\"com.google.ads.googleads.v25.enumsB\x13\x43ustomerStatusProtoP\x01ZCgoogle.golang.org/genproto/googleapis/ads/googleads/v25/enums;enums\xa2\x02\x03GAA\xaa\x02\x1eGoogle.Ads.GoogleAds.V25.Enums\xca\x02\x1eGoogle\\Ads\\GoogleAds\\V25\\Enums\xea\x02\"Google::Ads::GoogleAds::V25::Enumsb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Enums + CustomerStatusEnum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.enums.CustomerStatusEnum").msgclass + CustomerStatusEnum::CustomerStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.enums.CustomerStatusEnum.CustomerStatus").enummodule + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/enums/customizer_attribute_status_pb.rb b/lib/google/ads/google_ads/v25/enums/customizer_attribute_status_pb.rb new file mode 100644 index 000000000..ac0014a41 --- /dev/null +++ b/lib/google/ads/google_ads/v25/enums/customizer_attribute_status_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/enums/customizer_attribute_status.proto + +require 'google/protobuf' + + +descriptor_data = "\n@google/ads/googleads/v25/enums/customizer_attribute_status.proto\x12\x1egoogle.ads.googleads.v25.enums\"t\n\x1d\x43ustomizerAttributeStatusEnum\"S\n\x19\x43ustomizerAttributeStatus\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x0b\n\x07UNKNOWN\x10\x01\x12\x0b\n\x07\x45NABLED\x10\x02\x12\x0b\n\x07REMOVED\x10\x03\x42\xf8\x01\n\"com.google.ads.googleads.v25.enumsB\x1e\x43ustomizerAttributeStatusProtoP\x01ZCgoogle.golang.org/genproto/googleapis/ads/googleads/v25/enums;enums\xa2\x02\x03GAA\xaa\x02\x1eGoogle.Ads.GoogleAds.V25.Enums\xca\x02\x1eGoogle\\Ads\\GoogleAds\\V25\\Enums\xea\x02\"Google::Ads::GoogleAds::V25::Enumsb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Enums + CustomizerAttributeStatusEnum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.enums.CustomizerAttributeStatusEnum").msgclass + CustomizerAttributeStatusEnum::CustomizerAttributeStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.enums.CustomizerAttributeStatusEnum.CustomizerAttributeStatus").enummodule + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/enums/customizer_attribute_type_pb.rb b/lib/google/ads/google_ads/v25/enums/customizer_attribute_type_pb.rb new file mode 100644 index 000000000..b1ec1e714 --- /dev/null +++ b/lib/google/ads/google_ads/v25/enums/customizer_attribute_type_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/enums/customizer_attribute_type.proto + +require 'google/protobuf' + + +descriptor_data = "\n>google/ads/googleads/v25/enums/customizer_attribute_type.proto\x12\x1egoogle.ads.googleads.v25.enums\"\x84\x01\n\x1b\x43ustomizerAttributeTypeEnum\"e\n\x17\x43ustomizerAttributeType\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x0b\n\x07UNKNOWN\x10\x01\x12\x08\n\x04TEXT\x10\x02\x12\n\n\x06NUMBER\x10\x03\x12\t\n\x05PRICE\x10\x04\x12\x0b\n\x07PERCENT\x10\x05\x42\xf6\x01\n\"com.google.ads.googleads.v25.enumsB\x1c\x43ustomizerAttributeTypeProtoP\x01ZCgoogle.golang.org/genproto/googleapis/ads/googleads/v25/enums;enums\xa2\x02\x03GAA\xaa\x02\x1eGoogle.Ads.GoogleAds.V25.Enums\xca\x02\x1eGoogle\\Ads\\GoogleAds\\V25\\Enums\xea\x02\"Google::Ads::GoogleAds::V25::Enumsb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Enums + CustomizerAttributeTypeEnum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.enums.CustomizerAttributeTypeEnum").msgclass + CustomizerAttributeTypeEnum::CustomizerAttributeType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.enums.CustomizerAttributeTypeEnum.CustomizerAttributeType").enummodule + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/enums/customizer_value_status_pb.rb b/lib/google/ads/google_ads/v25/enums/customizer_value_status_pb.rb new file mode 100644 index 000000000..acb8ce1fc --- /dev/null +++ b/lib/google/ads/google_ads/v25/enums/customizer_value_status_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/enums/customizer_value_status.proto + +require 'google/protobuf' + + +descriptor_data = "\n\n\rIncentiveType\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x0b\n\x07UNKNOWN\x10\x01\x12\x0f\n\x0b\x41\x43QUISITION\x10\x02\x42\xec\x01\n\"com.google.ads.googleads.v25.enumsB\x12IncentiveTypeProtoP\x01ZCgoogle.golang.org/genproto/googleapis/ads/googleads/v25/enums;enums\xa2\x02\x03GAA\xaa\x02\x1eGoogle.Ads.GoogleAds.V25.Enums\xca\x02\x1eGoogle\\Ads\\GoogleAds\\V25\\Enums\xea\x02\"Google::Ads::GoogleAds::V25::Enumsb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Enums + IncentiveTypeEnum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.enums.IncentiveTypeEnum").msgclass + IncentiveTypeEnum::IncentiveType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.enums.IncentiveTypeEnum.IncentiveType").enummodule + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/enums/income_range_type_pb.rb b/lib/google/ads/google_ads/v25/enums/income_range_type_pb.rb new file mode 100644 index 000000000..4cb71e6e2 --- /dev/null +++ b/lib/google/ads/google_ads/v25/enums/income_range_type_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/enums/income_range_type.proto + +require 'google/protobuf' + + +descriptor_data = "\n6google/ads/googleads/v25/enums/income_range_type.proto\x12\x1egoogle.ads.googleads.v25.enums\"\x83\x02\n\x13IncomeRangeTypeEnum\"\xeb\x01\n\x0fIncomeRangeType\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x0b\n\x07UNKNOWN\x10\x01\x12\x17\n\x11INCOME_RANGE_0_50\x10\xb1\x90\x1f\x12\x18\n\x12INCOME_RANGE_50_60\x10\xb2\x90\x1f\x12\x18\n\x12INCOME_RANGE_60_70\x10\xb3\x90\x1f\x12\x18\n\x12INCOME_RANGE_70_80\x10\xb4\x90\x1f\x12\x18\n\x12INCOME_RANGE_80_90\x10\xb5\x90\x1f\x12\x18\n\x12INCOME_RANGE_90_UP\x10\xb6\x90\x1f\x12\x1f\n\x19INCOME_RANGE_UNDETERMINED\x10\xb0\x90\x1f\x42\xee\x01\n\"com.google.ads.googleads.v25.enumsB\x14IncomeRangeTypeProtoP\x01ZCgoogle.golang.org/genproto/googleapis/ads/googleads/v25/enums;enums\xa2\x02\x03GAA\xaa\x02\x1eGoogle.Ads.GoogleAds.V25.Enums\xca\x02\x1eGoogle\\Ads\\GoogleAds\\V25\\Enums\xea\x02\"Google::Ads::GoogleAds::V25::Enumsb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Enums + IncomeRangeTypeEnum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.enums.IncomeRangeTypeEnum").msgclass + IncomeRangeTypeEnum::IncomeRangeType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.enums.IncomeRangeTypeEnum.IncomeRangeType").enummodule + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/enums/insights_knowledge_graph_entity_capabilities_pb.rb b/lib/google/ads/google_ads/v25/enums/insights_knowledge_graph_entity_capabilities_pb.rb new file mode 100644 index 000000000..b1fb12f01 --- /dev/null +++ b/lib/google/ads/google_ads/v25/enums/insights_knowledge_graph_entity_capabilities_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/enums/insights_knowledge_graph_entity_capabilities.proto + +require 'google/protobuf' + + +descriptor_data = "\nQgoogle/ads/googleads/v25/enums/insights_knowledge_graph_entity_capabilities.proto\x12\x1egoogle.ads.googleads.v25.enums\"\xcb\x01\n,InsightsKnowledgeGraphEntityCapabilitiesEnum\"\x9a\x01\n(InsightsKnowledgeGraphEntityCapabilities\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x0b\n\x07UNKNOWN\x10\x01\x12\x1d\n\x19\x43ONTENT_TRENDING_INSIGHTS\x10\x02\x12\x15\n\x11\x43REATOR_ATTRIBUTE\x10\x03\x12\x1a\n\x16\x43REATOR_TOPIC_INSIGHTS\x10\x05\x42\x87\x02\n\"com.google.ads.googleads.v25.enumsB-InsightsKnowledgeGraphEntityCapabilitiesProtoP\x01ZCgoogle.golang.org/genproto/googleapis/ads/googleads/v25/enums;enums\xa2\x02\x03GAA\xaa\x02\x1eGoogle.Ads.GoogleAds.V25.Enums\xca\x02\x1eGoogle\\Ads\\GoogleAds\\V25\\Enums\xea\x02\"Google::Ads::GoogleAds::V25::Enumsb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Enums + InsightsKnowledgeGraphEntityCapabilitiesEnum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.enums.InsightsKnowledgeGraphEntityCapabilitiesEnum").msgclass + InsightsKnowledgeGraphEntityCapabilitiesEnum::InsightsKnowledgeGraphEntityCapabilities = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.enums.InsightsKnowledgeGraphEntityCapabilitiesEnum.InsightsKnowledgeGraphEntityCapabilities").enummodule + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/enums/insights_trend_pb.rb b/lib/google/ads/google_ads/v25/enums/insights_trend_pb.rb new file mode 100644 index 000000000..269fbce63 --- /dev/null +++ b/lib/google/ads/google_ads/v25/enums/insights_trend_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/enums/insights_trend.proto + +require 'google/protobuf' + + +descriptor_data = "\n3google/ads/googleads/v25/enums/insights_trend.proto\x12\x1egoogle.ads.googleads.v25.enums\"z\n\x11InsightsTrendEnum\"e\n\rInsightsTrend\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x0b\n\x07UNKNOWN\x10\x01\x12\x0c\n\x08\x45MERGING\x10\x02\x12\n\n\x06RISING\x10\x03\x12\r\n\tSUSTAINED\x10\x04\x12\r\n\tDECLINING\x10\x05\x42\xec\x01\n\"com.google.ads.googleads.v25.enumsB\x12InsightsTrendProtoP\x01ZCgoogle.golang.org/genproto/googleapis/ads/googleads/v25/enums;enums\xa2\x02\x03GAA\xaa\x02\x1eGoogle.Ads.GoogleAds.V25.Enums\xca\x02\x1eGoogle\\Ads\\GoogleAds\\V25\\Enums\xea\x02\"Google::Ads::GoogleAds::V25::Enumsb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Enums + InsightsTrendEnum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.enums.InsightsTrendEnum").msgclass + InsightsTrendEnum::InsightsTrend = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.enums.InsightsTrendEnum.InsightsTrend").enummodule + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/enums/interaction_event_type_pb.rb b/lib/google/ads/google_ads/v25/enums/interaction_event_type_pb.rb new file mode 100644 index 000000000..96e1d20dd --- /dev/null +++ b/lib/google/ads/google_ads/v25/enums/interaction_event_type_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/enums/interaction_event_type.proto + +require 'google/protobuf' + + +descriptor_data = "\n;google/ads/googleads/v25/enums/interaction_event_type.proto\x12\x1egoogle.ads.googleads.v25.enums\"\x85\x01\n\x18InteractionEventTypeEnum\"i\n\x14InteractionEventType\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x0b\n\x07UNKNOWN\x10\x01\x12\t\n\x05\x43LICK\x10\x02\x12\x0e\n\nENGAGEMENT\x10\x03\x12\x0e\n\nVIDEO_VIEW\x10\x04\x12\x08\n\x04NONE\x10\x05\x42\xf3\x01\n\"com.google.ads.googleads.v25.enumsB\x19InteractionEventTypeProtoP\x01ZCgoogle.golang.org/genproto/googleapis/ads/googleads/v25/enums;enums\xa2\x02\x03GAA\xaa\x02\x1eGoogle.Ads.GoogleAds.V25.Enums\xca\x02\x1eGoogle\\Ads\\GoogleAds\\V25\\Enums\xea\x02\"Google::Ads::GoogleAds::V25::Enumsb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Enums + InteractionEventTypeEnum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.enums.InteractionEventTypeEnum").msgclass + InteractionEventTypeEnum::InteractionEventType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.enums.InteractionEventTypeEnum.InteractionEventType").enummodule + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/enums/interaction_type_pb.rb b/lib/google/ads/google_ads/v25/enums/interaction_type_pb.rb new file mode 100644 index 000000000..5c05bf741 --- /dev/null +++ b/lib/google/ads/google_ads/v25/enums/interaction_type_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/enums/interaction_type.proto + +require 'google/protobuf' + + +descriptor_data = "\n5google/ads/googleads/v25/enums/interaction_type.proto\x12\x1egoogle.ads.googleads.v25.enums\"R\n\x13InteractionTypeEnum\";\n\x0fInteractionType\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x0b\n\x07UNKNOWN\x10\x01\x12\n\n\x05\x43\x41LLS\x10\xc0>B\xee\x01\n\"com.google.ads.googleads.v25.enumsB\x14InteractionTypeProtoP\x01ZCgoogle.golang.org/genproto/googleapis/ads/googleads/v25/enums;enums\xa2\x02\x03GAA\xaa\x02\x1eGoogle.Ads.GoogleAds.V25.Enums\xca\x02\x1eGoogle\\Ads\\GoogleAds\\V25\\Enums\xea\x02\"Google::Ads::GoogleAds::V25::Enumsb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Enums + InteractionTypeEnum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.enums.InteractionTypeEnum").msgclass + InteractionTypeEnum::InteractionType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.enums.InteractionTypeEnum.InteractionType").enummodule + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/enums/invoice_type_pb.rb b/lib/google/ads/google_ads/v25/enums/invoice_type_pb.rb new file mode 100644 index 000000000..8f697933d --- /dev/null +++ b/lib/google/ads/google_ads/v25/enums/invoice_type_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/enums/invoice_type.proto + +require 'google/protobuf' + + +descriptor_data = "\n1google/ads/googleads/v25/enums/invoice_type.proto\x12\x1egoogle.ads.googleads.v25.enums\"\\\n\x0fInvoiceTypeEnum\"I\n\x0bInvoiceType\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x0b\n\x07UNKNOWN\x10\x01\x12\x0f\n\x0b\x43REDIT_MEMO\x10\x02\x12\x0b\n\x07INVOICE\x10\x03\x42\xea\x01\n\"com.google.ads.googleads.v25.enumsB\x10InvoiceTypeProtoP\x01ZCgoogle.golang.org/genproto/googleapis/ads/googleads/v25/enums;enums\xa2\x02\x03GAA\xaa\x02\x1eGoogle.Ads.GoogleAds.V25.Enums\xca\x02\x1eGoogle\\Ads\\GoogleAds\\V25\\Enums\xea\x02\"Google::Ads::GoogleAds::V25::Enumsb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Enums + InvoiceTypeEnum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.enums.InvoiceTypeEnum").msgclass + InvoiceTypeEnum::InvoiceType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.enums.InvoiceTypeEnum.InvoiceType").enummodule + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/enums/keyword_match_type_pb.rb b/lib/google/ads/google_ads/v25/enums/keyword_match_type_pb.rb new file mode 100644 index 000000000..f39096971 --- /dev/null +++ b/lib/google/ads/google_ads/v25/enums/keyword_match_type_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/enums/keyword_match_type.proto + +require 'google/protobuf' + + +descriptor_data = "\n7google/ads/googleads/v25/enums/keyword_match_type.proto\x12\x1egoogle.ads.googleads.v25.enums\"j\n\x14KeywordMatchTypeEnum\"R\n\x10KeywordMatchType\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x0b\n\x07UNKNOWN\x10\x01\x12\t\n\x05\x45XACT\x10\x02\x12\n\n\x06PHRASE\x10\x03\x12\t\n\x05\x42ROAD\x10\x04\x42\xef\x01\n\"com.google.ads.googleads.v25.enumsB\x15KeywordMatchTypeProtoP\x01ZCgoogle.golang.org/genproto/googleapis/ads/googleads/v25/enums;enums\xa2\x02\x03GAA\xaa\x02\x1eGoogle.Ads.GoogleAds.V25.Enums\xca\x02\x1eGoogle\\Ads\\GoogleAds\\V25\\Enums\xea\x02\"Google::Ads::GoogleAds::V25::Enumsb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Enums + KeywordMatchTypeEnum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.enums.KeywordMatchTypeEnum").msgclass + KeywordMatchTypeEnum::KeywordMatchType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.enums.KeywordMatchTypeEnum.KeywordMatchType").enummodule + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/enums/keyword_plan_aggregate_metric_type_pb.rb b/lib/google/ads/google_ads/v25/enums/keyword_plan_aggregate_metric_type_pb.rb new file mode 100644 index 000000000..7c5a808dd --- /dev/null +++ b/lib/google/ads/google_ads/v25/enums/keyword_plan_aggregate_metric_type_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/enums/keyword_plan_aggregate_metric_type.proto + +require 'google/protobuf' + + +descriptor_data = "\nGgoogle/ads/googleads/v25/enums/keyword_plan_aggregate_metric_type.proto\x12\x1egoogle.ads.googleads.v25.enums\"p\n\"KeywordPlanAggregateMetricTypeEnum\"J\n\x1eKeywordPlanAggregateMetricType\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x0b\n\x07UNKNOWN\x10\x01\x12\n\n\x06\x44\x45VICE\x10\x02\x42\xfd\x01\n\"com.google.ads.googleads.v25.enumsB#KeywordPlanAggregateMetricTypeProtoP\x01ZCgoogle.golang.org/genproto/googleapis/ads/googleads/v25/enums;enums\xa2\x02\x03GAA\xaa\x02\x1eGoogle.Ads.GoogleAds.V25.Enums\xca\x02\x1eGoogle\\Ads\\GoogleAds\\V25\\Enums\xea\x02\"Google::Ads::GoogleAds::V25::Enumsb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Enums + KeywordPlanAggregateMetricTypeEnum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.enums.KeywordPlanAggregateMetricTypeEnum").msgclass + KeywordPlanAggregateMetricTypeEnum::KeywordPlanAggregateMetricType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.enums.KeywordPlanAggregateMetricTypeEnum.KeywordPlanAggregateMetricType").enummodule + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/enums/keyword_plan_competition_level_pb.rb b/lib/google/ads/google_ads/v25/enums/keyword_plan_competition_level_pb.rb new file mode 100644 index 000000000..1ba2c2d40 --- /dev/null +++ b/lib/google/ads/google_ads/v25/enums/keyword_plan_competition_level_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/enums/keyword_plan_competition_level.proto + +require 'google/protobuf' + + +descriptor_data = "\nCgoogle/ads/googleads/v25/enums/keyword_plan_competition_level.proto\x12\x1egoogle.ads.googleads.v25.enums\"}\n\x1fKeywordPlanCompetitionLevelEnum\"Z\n\x1bKeywordPlanCompetitionLevel\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x0b\n\x07UNKNOWN\x10\x01\x12\x07\n\x03LOW\x10\x02\x12\n\n\x06MEDIUM\x10\x03\x12\x08\n\x04HIGH\x10\x04\x42\xfa\x01\n\"com.google.ads.googleads.v25.enumsB KeywordPlanCompetitionLevelProtoP\x01ZCgoogle.golang.org/genproto/googleapis/ads/googleads/v25/enums;enums\xa2\x02\x03GAA\xaa\x02\x1eGoogle.Ads.GoogleAds.V25.Enums\xca\x02\x1eGoogle\\Ads\\GoogleAds\\V25\\Enums\xea\x02\"Google::Ads::GoogleAds::V25::Enumsb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Enums + KeywordPlanCompetitionLevelEnum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.enums.KeywordPlanCompetitionLevelEnum").msgclass + KeywordPlanCompetitionLevelEnum::KeywordPlanCompetitionLevel = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.enums.KeywordPlanCompetitionLevelEnum.KeywordPlanCompetitionLevel").enummodule + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/enums/keyword_plan_concept_group_type_pb.rb b/lib/google/ads/google_ads/v25/enums/keyword_plan_concept_group_type_pb.rb new file mode 100644 index 000000000..1b60f3c80 --- /dev/null +++ b/lib/google/ads/google_ads/v25/enums/keyword_plan_concept_group_type_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/enums/keyword_plan_concept_group_type.proto + +require 'google/protobuf' + + +descriptor_data = "\nDgoogle/ads/googleads/v25/enums/keyword_plan_concept_group_type.proto\x12\x1egoogle.ads.googleads.v25.enums\"\x8a\x01\n\x1fKeywordPlanConceptGroupTypeEnum\"g\n\x1bKeywordPlanConceptGroupType\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x0b\n\x07UNKNOWN\x10\x01\x12\t\n\x05\x42RAND\x10\x02\x12\x10\n\x0cOTHER_BRANDS\x10\x03\x12\r\n\tNON_BRAND\x10\x04\x42\xfa\x01\n\"com.google.ads.googleads.v25.enumsB KeywordPlanConceptGroupTypeProtoP\x01ZCgoogle.golang.org/genproto/googleapis/ads/googleads/v25/enums;enums\xa2\x02\x03GAA\xaa\x02\x1eGoogle.Ads.GoogleAds.V25.Enums\xca\x02\x1eGoogle\\Ads\\GoogleAds\\V25\\Enums\xea\x02\"Google::Ads::GoogleAds::V25::Enumsb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Enums + KeywordPlanConceptGroupTypeEnum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.enums.KeywordPlanConceptGroupTypeEnum").msgclass + KeywordPlanConceptGroupTypeEnum::KeywordPlanConceptGroupType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.enums.KeywordPlanConceptGroupTypeEnum.KeywordPlanConceptGroupType").enummodule + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/enums/keyword_plan_forecast_interval_pb.rb b/lib/google/ads/google_ads/v25/enums/keyword_plan_forecast_interval_pb.rb new file mode 100644 index 000000000..27308eb6f --- /dev/null +++ b/lib/google/ads/google_ads/v25/enums/keyword_plan_forecast_interval_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/enums/keyword_plan_forecast_interval.proto + +require 'google/protobuf' + + +descriptor_data = "\nCgoogle/ads/googleads/v25/enums/keyword_plan_forecast_interval.proto\x12\x1egoogle.ads.googleads.v25.enums\"\x8f\x01\n\x1fKeywordPlanForecastIntervalEnum\"l\n\x1bKeywordPlanForecastInterval\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x0b\n\x07UNKNOWN\x10\x01\x12\r\n\tNEXT_WEEK\x10\x03\x12\x0e\n\nNEXT_MONTH\x10\x04\x12\x10\n\x0cNEXT_QUARTER\x10\x05\x42\xfa\x01\n\"com.google.ads.googleads.v25.enumsB KeywordPlanForecastIntervalProtoP\x01ZCgoogle.golang.org/genproto/googleapis/ads/googleads/v25/enums;enums\xa2\x02\x03GAA\xaa\x02\x1eGoogle.Ads.GoogleAds.V25.Enums\xca\x02\x1eGoogle\\Ads\\GoogleAds\\V25\\Enums\xea\x02\"Google::Ads::GoogleAds::V25::Enumsb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Enums + KeywordPlanForecastIntervalEnum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.enums.KeywordPlanForecastIntervalEnum").msgclass + KeywordPlanForecastIntervalEnum::KeywordPlanForecastInterval = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.enums.KeywordPlanForecastIntervalEnum.KeywordPlanForecastInterval").enummodule + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/enums/keyword_plan_keyword_annotation_pb.rb b/lib/google/ads/google_ads/v25/enums/keyword_plan_keyword_annotation_pb.rb new file mode 100644 index 000000000..b86cd452d --- /dev/null +++ b/lib/google/ads/google_ads/v25/enums/keyword_plan_keyword_annotation_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/enums/keyword_plan_keyword_annotation.proto + +require 'google/protobuf' + + +descriptor_data = "\nDgoogle/ads/googleads/v25/enums/keyword_plan_keyword_annotation.proto\x12\x1egoogle.ads.googleads.v25.enums\"u\n KeywordPlanKeywordAnnotationEnum\"Q\n\x1cKeywordPlanKeywordAnnotation\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x0b\n\x07UNKNOWN\x10\x01\x12\x13\n\x0fKEYWORD_CONCEPT\x10\x02\x42\xfb\x01\n\"com.google.ads.googleads.v25.enumsB!KeywordPlanKeywordAnnotationProtoP\x01ZCgoogle.golang.org/genproto/googleapis/ads/googleads/v25/enums;enums\xa2\x02\x03GAA\xaa\x02\x1eGoogle.Ads.GoogleAds.V25.Enums\xca\x02\x1eGoogle\\Ads\\GoogleAds\\V25\\Enums\xea\x02\"Google::Ads::GoogleAds::V25::Enumsb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Enums + KeywordPlanKeywordAnnotationEnum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.enums.KeywordPlanKeywordAnnotationEnum").msgclass + KeywordPlanKeywordAnnotationEnum::KeywordPlanKeywordAnnotation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.enums.KeywordPlanKeywordAnnotationEnum.KeywordPlanKeywordAnnotation").enummodule + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/enums/keyword_plan_network_pb.rb b/lib/google/ads/google_ads/v25/enums/keyword_plan_network_pb.rb new file mode 100644 index 000000000..1fb8deea4 --- /dev/null +++ b/lib/google/ads/google_ads/v25/enums/keyword_plan_network_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/enums/keyword_plan_network.proto + +require 'google/protobuf' + + +descriptor_data = "\n9google/ads/googleads/v25/enums/keyword_plan_network.proto\x12\x1egoogle.ads.googleads.v25.enums\"\x7f\n\x16KeywordPlanNetworkEnum\"e\n\x12KeywordPlanNetwork\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x0b\n\x07UNKNOWN\x10\x01\x12\x11\n\rGOOGLE_SEARCH\x10\x02\x12\x1e\n\x1aGOOGLE_SEARCH_AND_PARTNERS\x10\x03\x42\xf1\x01\n\"com.google.ads.googleads.v25.enumsB\x17KeywordPlanNetworkProtoP\x01ZCgoogle.golang.org/genproto/googleapis/ads/googleads/v25/enums;enums\xa2\x02\x03GAA\xaa\x02\x1eGoogle.Ads.GoogleAds.V25.Enums\xca\x02\x1eGoogle\\Ads\\GoogleAds\\V25\\Enums\xea\x02\"Google::Ads::GoogleAds::V25::Enumsb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Enums + KeywordPlanNetworkEnum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.enums.KeywordPlanNetworkEnum").msgclass + KeywordPlanNetworkEnum::KeywordPlanNetwork = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.enums.KeywordPlanNetworkEnum.KeywordPlanNetwork").enummodule + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/enums/label_status_pb.rb b/lib/google/ads/google_ads/v25/enums/label_status_pb.rb new file mode 100644 index 000000000..65e67d2a7 --- /dev/null +++ b/lib/google/ads/google_ads/v25/enums/label_status_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/enums/label_status.proto + +require 'google/protobuf' + + +descriptor_data = "\n1google/ads/googleads/v25/enums/label_status.proto\x12\x1egoogle.ads.googleads.v25.enums\"X\n\x0fLabelStatusEnum\"E\n\x0bLabelStatus\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x0b\n\x07UNKNOWN\x10\x01\x12\x0b\n\x07\x45NABLED\x10\x02\x12\x0b\n\x07REMOVED\x10\x03\x42\xea\x01\n\"com.google.ads.googleads.v25.enumsB\x10LabelStatusProtoP\x01ZCgoogle.golang.org/genproto/googleapis/ads/googleads/v25/enums;enums\xa2\x02\x03GAA\xaa\x02\x1eGoogle.Ads.GoogleAds.V25.Enums\xca\x02\x1eGoogle\\Ads\\GoogleAds\\V25\\Enums\xea\x02\"Google::Ads::GoogleAds::V25::Enumsb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Enums + LabelStatusEnum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.enums.LabelStatusEnum").msgclass + LabelStatusEnum::LabelStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.enums.LabelStatusEnum.LabelStatus").enummodule + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/enums/landing_page_source_pb.rb b/lib/google/ads/google_ads/v25/enums/landing_page_source_pb.rb new file mode 100644 index 000000000..6cc884070 --- /dev/null +++ b/lib/google/ads/google_ads/v25/enums/landing_page_source_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/enums/landing_page_source.proto + +require 'google/protobuf' + + +descriptor_data = "\n8google/ads/googleads/v25/enums/landing_page_source.proto\x12\x1egoogle.ads.googleads.v25.enums\"i\n\x15LandingPageSourceEnum\"P\n\x11LandingPageSource\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x0b\n\x07UNKNOWN\x10\x01\x12\x0e\n\nADVERTISER\x10\x02\x12\r\n\tAUTOMATIC\x10\x03\x42\xf0\x01\n\"com.google.ads.googleads.v25.enumsB\x16LandingPageSourceProtoP\x01ZCgoogle.golang.org/genproto/googleapis/ads/googleads/v25/enums;enums\xa2\x02\x03GAA\xaa\x02\x1eGoogle.Ads.GoogleAds.V25.Enums\xca\x02\x1eGoogle\\Ads\\GoogleAds\\V25\\Enums\xea\x02\"Google::Ads::GoogleAds::V25::Enumsb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Enums + LandingPageSourceEnum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.enums.LandingPageSourceEnum").msgclass + LandingPageSourceEnum::LandingPageSource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.enums.LandingPageSourceEnum.LandingPageSource").enummodule + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/enums/lead_form_call_to_action_type_pb.rb b/lib/google/ads/google_ads/v25/enums/lead_form_call_to_action_type_pb.rb new file mode 100644 index 000000000..a2df1b4db --- /dev/null +++ b/lib/google/ads/google_ads/v25/enums/lead_form_call_to_action_type_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/enums/lead_form_call_to_action_type.proto + +require 'google/protobuf' + + +descriptor_data = "\nBgoogle/ads/googleads/v25/enums/lead_form_call_to_action_type.proto\x12\x1egoogle.ads.googleads.v25.enums\"\xab\x02\n\x1cLeadFormCallToActionTypeEnum\"\x8a\x02\n\x18LeadFormCallToActionType\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x0b\n\x07UNKNOWN\x10\x01\x12\x0e\n\nLEARN_MORE\x10\x02\x12\r\n\tGET_QUOTE\x10\x03\x12\r\n\tAPPLY_NOW\x10\x04\x12\x0b\n\x07SIGN_UP\x10\x05\x12\x0e\n\nCONTACT_US\x10\x06\x12\r\n\tSUBSCRIBE\x10\x07\x12\x0c\n\x08\x44OWNLOAD\x10\x08\x12\x0c\n\x08\x42OOK_NOW\x10\t\x12\r\n\tGET_OFFER\x10\n\x12\x0c\n\x08REGISTER\x10\x0b\x12\x0c\n\x08GET_INFO\x10\x0c\x12\x10\n\x0cREQUEST_DEMO\x10\r\x12\x0c\n\x08JOIN_NOW\x10\x0e\x12\x0f\n\x0bGET_STARTED\x10\x0f\x42\xf7\x01\n\"com.google.ads.googleads.v25.enumsB\x1dLeadFormCallToActionTypeProtoP\x01ZCgoogle.golang.org/genproto/googleapis/ads/googleads/v25/enums;enums\xa2\x02\x03GAA\xaa\x02\x1eGoogle.Ads.GoogleAds.V25.Enums\xca\x02\x1eGoogle\\Ads\\GoogleAds\\V25\\Enums\xea\x02\"Google::Ads::GoogleAds::V25::Enumsb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Enums + LeadFormCallToActionTypeEnum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.enums.LeadFormCallToActionTypeEnum").msgclass + LeadFormCallToActionTypeEnum::LeadFormCallToActionType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.enums.LeadFormCallToActionTypeEnum.LeadFormCallToActionType").enummodule + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/enums/lead_form_desired_intent_pb.rb b/lib/google/ads/google_ads/v25/enums/lead_form_desired_intent_pb.rb new file mode 100644 index 000000000..0dbdcda8c --- /dev/null +++ b/lib/google/ads/google_ads/v25/enums/lead_form_desired_intent_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/enums/lead_form_desired_intent.proto + +require 'google/protobuf' + + +descriptor_data = "\n=google/ads/googleads/v25/enums/lead_form_desired_intent.proto\x12\x1egoogle.ads.googleads.v25.enums\"s\n\x19LeadFormDesiredIntentEnum\"V\n\x15LeadFormDesiredIntent\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x0b\n\x07UNKNOWN\x10\x01\x12\x0e\n\nLOW_INTENT\x10\x02\x12\x0f\n\x0bHIGH_INTENT\x10\x03\x42\xf4\x01\n\"com.google.ads.googleads.v25.enumsB\x1aLeadFormDesiredIntentProtoP\x01ZCgoogle.golang.org/genproto/googleapis/ads/googleads/v25/enums;enums\xa2\x02\x03GAA\xaa\x02\x1eGoogle.Ads.GoogleAds.V25.Enums\xca\x02\x1eGoogle\\Ads\\GoogleAds\\V25\\Enums\xea\x02\"Google::Ads::GoogleAds::V25::Enumsb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Enums + LeadFormDesiredIntentEnum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.enums.LeadFormDesiredIntentEnum").msgclass + LeadFormDesiredIntentEnum::LeadFormDesiredIntent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.enums.LeadFormDesiredIntentEnum.LeadFormDesiredIntent").enummodule + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/enums/lead_form_field_user_input_type_pb.rb b/lib/google/ads/google_ads/v25/enums/lead_form_field_user_input_type_pb.rb new file mode 100644 index 000000000..33babfa7d --- /dev/null +++ b/lib/google/ads/google_ads/v25/enums/lead_form_field_user_input_type_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/enums/lead_form_field_user_input_type.proto + +require 'google/protobuf' + + +descriptor_data = "\nDgoogle/ads/googleads/v25/enums/lead_form_field_user_input_type.proto\x12\x1egoogle.ads.googleads.v25.enums\"\xc8\x13\n\x1eLeadFormFieldUserInputTypeEnum\"\xa5\x13\n\x1aLeadFormFieldUserInputType\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x0b\n\x07UNKNOWN\x10\x01\x12\r\n\tFULL_NAME\x10\x02\x12\t\n\x05\x45MAIL\x10\x03\x12\x10\n\x0cPHONE_NUMBER\x10\x04\x12\x0f\n\x0bPOSTAL_CODE\x10\x05\x12\x12\n\x0eSTREET_ADDRESS\x10\x08\x12\x08\n\x04\x43ITY\x10\t\x12\n\n\x06REGION\x10\n\x12\x0b\n\x07\x43OUNTRY\x10\x0b\x12\x0e\n\nWORK_EMAIL\x10\x0c\x12\x10\n\x0c\x43OMPANY_NAME\x10\r\x12\x0e\n\nWORK_PHONE\x10\x0e\x12\r\n\tJOB_TITLE\x10\x0f\x12\x1f\n\x1bGOVERNMENT_ISSUED_ID_CPF_BR\x10\x10\x12\x1f\n\x1bGOVERNMENT_ISSUED_ID_DNI_AR\x10\x11\x12\x1f\n\x1bGOVERNMENT_ISSUED_ID_DNI_PE\x10\x12\x12\x1f\n\x1bGOVERNMENT_ISSUED_ID_RUT_CL\x10\x13\x12\x1e\n\x1aGOVERNMENT_ISSUED_ID_CC_CO\x10\x14\x12\x1e\n\x1aGOVERNMENT_ISSUED_ID_CI_EC\x10\x15\x12\x1f\n\x1bGOVERNMENT_ISSUED_ID_RFC_MX\x10\x16\x12\x0e\n\nFIRST_NAME\x10\x17\x12\r\n\tLAST_NAME\x10\x18\x12\x12\n\rVEHICLE_MODEL\x10\xe9\x07\x12\x11\n\x0cVEHICLE_TYPE\x10\xea\x07\x12\x19\n\x14PREFERRED_DEALERSHIP\x10\xeb\x07\x12\x1e\n\x19VEHICLE_PURCHASE_TIMELINE\x10\xec\x07\x12\x16\n\x11VEHICLE_OWNERSHIP\x10\xed\x07\x12\x19\n\x14VEHICLE_PAYMENT_TYPE\x10\xf1\x07\x12\x16\n\x11VEHICLE_CONDITION\x10\xf2\x07\x12\x11\n\x0c\x43OMPANY_SIZE\x10\xee\x07\x12\x11\n\x0c\x41NNUAL_SALES\x10\xef\x07\x12\x16\n\x11YEARS_IN_BUSINESS\x10\xf0\x07\x12\x13\n\x0eJOB_DEPARTMENT\x10\xf3\x07\x12\r\n\x08JOB_ROLE\x10\xf4\x07\x12\x10\n\x0bOVER_18_AGE\x10\xb6\x08\x12\x10\n\x0bOVER_19_AGE\x10\xb7\x08\x12\x10\n\x0bOVER_20_AGE\x10\xb8\x08\x12\x10\n\x0bOVER_21_AGE\x10\xb9\x08\x12\x10\n\x0bOVER_22_AGE\x10\xba\x08\x12\x10\n\x0bOVER_23_AGE\x10\xbb\x08\x12\x10\n\x0bOVER_24_AGE\x10\xbc\x08\x12\x10\n\x0bOVER_25_AGE\x10\xbd\x08\x12\x10\n\x0bOVER_26_AGE\x10\xbe\x08\x12\x10\n\x0bOVER_27_AGE\x10\xbf\x08\x12\x10\n\x0bOVER_28_AGE\x10\xc0\x08\x12\x10\n\x0bOVER_29_AGE\x10\xc1\x08\x12\x10\n\x0bOVER_30_AGE\x10\xc2\x08\x12\x10\n\x0bOVER_31_AGE\x10\xc3\x08\x12\x10\n\x0bOVER_32_AGE\x10\xc4\x08\x12\x10\n\x0bOVER_33_AGE\x10\xc5\x08\x12\x10\n\x0bOVER_34_AGE\x10\xc6\x08\x12\x10\n\x0bOVER_35_AGE\x10\xc7\x08\x12\x10\n\x0bOVER_36_AGE\x10\xc8\x08\x12\x10\n\x0bOVER_37_AGE\x10\xc9\x08\x12\x10\n\x0bOVER_38_AGE\x10\xca\x08\x12\x10\n\x0bOVER_39_AGE\x10\xcb\x08\x12\x10\n\x0bOVER_40_AGE\x10\xcc\x08\x12\x10\n\x0bOVER_41_AGE\x10\xcd\x08\x12\x10\n\x0bOVER_42_AGE\x10\xce\x08\x12\x10\n\x0bOVER_43_AGE\x10\xcf\x08\x12\x10\n\x0bOVER_44_AGE\x10\xd0\x08\x12\x10\n\x0bOVER_45_AGE\x10\xd1\x08\x12\x10\n\x0bOVER_46_AGE\x10\xd2\x08\x12\x10\n\x0bOVER_47_AGE\x10\xd3\x08\x12\x10\n\x0bOVER_48_AGE\x10\xd4\x08\x12\x10\n\x0bOVER_49_AGE\x10\xd5\x08\x12\x10\n\x0bOVER_50_AGE\x10\xd6\x08\x12\x10\n\x0bOVER_51_AGE\x10\xd7\x08\x12\x10\n\x0bOVER_52_AGE\x10\xd8\x08\x12\x10\n\x0bOVER_53_AGE\x10\xd9\x08\x12\x10\n\x0bOVER_54_AGE\x10\xda\x08\x12\x10\n\x0bOVER_55_AGE\x10\xdb\x08\x12\x10\n\x0bOVER_56_AGE\x10\xdc\x08\x12\x10\n\x0bOVER_57_AGE\x10\xdd\x08\x12\x10\n\x0bOVER_58_AGE\x10\xde\x08\x12\x10\n\x0bOVER_59_AGE\x10\xdf\x08\x12\x10\n\x0bOVER_60_AGE\x10\xe0\x08\x12\x10\n\x0bOVER_61_AGE\x10\xe1\x08\x12\x10\n\x0bOVER_62_AGE\x10\xe2\x08\x12\x10\n\x0bOVER_63_AGE\x10\xe3\x08\x12\x10\n\x0bOVER_64_AGE\x10\xe4\x08\x12\x10\n\x0bOVER_65_AGE\x10\xe5\x08\x12\x16\n\x11\x45\x44UCATION_PROGRAM\x10\xf5\x07\x12\x15\n\x10\x45\x44UCATION_COURSE\x10\xf6\x07\x12\x0c\n\x07PRODUCT\x10\xf8\x07\x12\x0c\n\x07SERVICE\x10\xf9\x07\x12\n\n\x05OFFER\x10\xfa\x07\x12\r\n\x08\x43\x41TEGORY\x10\xfb\x07\x12\x1d\n\x18PREFERRED_CONTACT_METHOD\x10\xfc\x07\x12\x17\n\x12PREFERRED_LOCATION\x10\xfd\x07\x12\x1b\n\x16PREFERRED_CONTACT_TIME\x10\xfe\x07\x12\x16\n\x11PURCHASE_TIMELINE\x10\xff\x07\x12\x18\n\x13YEARS_OF_EXPERIENCE\x10\x98\x08\x12\x11\n\x0cJOB_INDUSTRY\x10\x99\x08\x12\x17\n\x12LEVEL_OF_EDUCATION\x10\x9a\x08\x12\x12\n\rPROPERTY_TYPE\x10\x80\x08\x12\x16\n\x11REALTOR_HELP_GOAL\x10\x81\x08\x12\x17\n\x12PROPERTY_COMMUNITY\x10\x82\x08\x12\x10\n\x0bPRICE_RANGE\x10\x83\x08\x12\x17\n\x12NUMBER_OF_BEDROOMS\x10\x84\x08\x12\x17\n\x12\x46URNISHED_PROPERTY\x10\x85\x08\x12\x1a\n\x15PETS_ALLOWED_PROPERTY\x10\x86\x08\x12\x1a\n\x15NEXT_PLANNED_PURCHASE\x10\x87\x08\x12\x1a\n\x15\x45VENT_SIGNUP_INTEREST\x10\x89\x08\x12\x1e\n\x19PREFERRED_SHOPPING_PLACES\x10\x8a\x08\x12\x13\n\x0e\x46\x41VORITE_BRAND\x10\x8b\x08\x12+\n&TRANSPORTATION_COMMERCIAL_LICENSE_TYPE\x10\x8c\x08\x12\x1b\n\x16\x45VENT_BOOKING_INTEREST\x10\x8e\x08\x12\x18\n\x13\x44\x45STINATION_COUNTRY\x10\x8f\x08\x12\x15\n\x10\x44\x45STINATION_CITY\x10\x90\x08\x12\x16\n\x11\x44\x45PARTURE_COUNTRY\x10\x91\x08\x12\x13\n\x0e\x44\x45PARTURE_CITY\x10\x92\x08\x12\x13\n\x0e\x44\x45PARTURE_DATE\x10\x93\x08\x12\x10\n\x0bRETURN_DATE\x10\x94\x08\x12\x18\n\x13NUMBER_OF_TRAVELERS\x10\x95\x08\x12\x12\n\rTRAVEL_BUDGET\x10\x96\x08\x12\x19\n\x14TRAVEL_ACCOMMODATION\x10\x97\x08\x42\xf9\x01\n\"com.google.ads.googleads.v25.enumsB\x1fLeadFormFieldUserInputTypeProtoP\x01ZCgoogle.golang.org/genproto/googleapis/ads/googleads/v25/enums;enums\xa2\x02\x03GAA\xaa\x02\x1eGoogle.Ads.GoogleAds.V25.Enums\xca\x02\x1eGoogle\\Ads\\GoogleAds\\V25\\Enums\xea\x02\"Google::Ads::GoogleAds::V25::Enumsb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Enums + LeadFormFieldUserInputTypeEnum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.enums.LeadFormFieldUserInputTypeEnum").msgclass + LeadFormFieldUserInputTypeEnum::LeadFormFieldUserInputType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.enums.LeadFormFieldUserInputTypeEnum.LeadFormFieldUserInputType").enummodule + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/enums/lead_form_post_submit_call_to_action_type_pb.rb b/lib/google/ads/google_ads/v25/enums/lead_form_post_submit_call_to_action_type_pb.rb new file mode 100644 index 000000000..e3aedcf43 --- /dev/null +++ b/lib/google/ads/google_ads/v25/enums/lead_form_post_submit_call_to_action_type_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/enums/lead_form_post_submit_call_to_action_type.proto + +require 'google/protobuf' + + +descriptor_data = "\nNgoogle/ads/googleads/v25/enums/lead_form_post_submit_call_to_action_type.proto\x12\x1egoogle.ads.googleads.v25.enums\"\xa8\x01\n&LeadFormPostSubmitCallToActionTypeEnum\"~\n\"LeadFormPostSubmitCallToActionType\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x0b\n\x07UNKNOWN\x10\x01\x12\x0e\n\nVISIT_SITE\x10\x02\x12\x0c\n\x08\x44OWNLOAD\x10\x03\x12\x0e\n\nLEARN_MORE\x10\x04\x12\x0c\n\x08SHOP_NOW\x10\x05\x42\x81\x02\n\"com.google.ads.googleads.v25.enumsB\'LeadFormPostSubmitCallToActionTypeProtoP\x01ZCgoogle.golang.org/genproto/googleapis/ads/googleads/v25/enums;enums\xa2\x02\x03GAA\xaa\x02\x1eGoogle.Ads.GoogleAds.V25.Enums\xca\x02\x1eGoogle\\Ads\\GoogleAds\\V25\\Enums\xea\x02\"Google::Ads::GoogleAds::V25::Enumsb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Enums + LeadFormPostSubmitCallToActionTypeEnum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.enums.LeadFormPostSubmitCallToActionTypeEnum").msgclass + LeadFormPostSubmitCallToActionTypeEnum::LeadFormPostSubmitCallToActionType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.enums.LeadFormPostSubmitCallToActionTypeEnum.LeadFormPostSubmitCallToActionType").enummodule + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/enums/legacy_app_install_ad_app_store_pb.rb b/lib/google/ads/google_ads/v25/enums/legacy_app_install_ad_app_store_pb.rb new file mode 100644 index 000000000..07ce78e67 --- /dev/null +++ b/lib/google/ads/google_ads/v25/enums/legacy_app_install_ad_app_store_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/enums/legacy_app_install_ad_app_store.proto + +require 'google/protobuf' + + +descriptor_data = "\nDgoogle/ads/googleads/v25/enums/legacy_app_install_ad_app_store.proto\x12\x1egoogle.ads.googleads.v25.enums\"\xc1\x01\n\x1eLegacyAppInstallAdAppStoreEnum\"\x9e\x01\n\x1aLegacyAppInstallAdAppStore\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x0b\n\x07UNKNOWN\x10\x01\x12\x13\n\x0f\x41PPLE_APP_STORE\x10\x02\x12\x0f\n\x0bGOOGLE_PLAY\x10\x03\x12\x11\n\rWINDOWS_STORE\x10\x04\x12\x17\n\x13WINDOWS_PHONE_STORE\x10\x05\x12\x10\n\x0c\x43N_APP_STORE\x10\x06\x42\xf9\x01\n\"com.google.ads.googleads.v25.enumsB\x1fLegacyAppInstallAdAppStoreProtoP\x01ZCgoogle.golang.org/genproto/googleapis/ads/googleads/v25/enums;enums\xa2\x02\x03GAA\xaa\x02\x1eGoogle.Ads.GoogleAds.V25.Enums\xca\x02\x1eGoogle\\Ads\\GoogleAds\\V25\\Enums\xea\x02\"Google::Ads::GoogleAds::V25::Enumsb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Enums + LegacyAppInstallAdAppStoreEnum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.enums.LegacyAppInstallAdAppStoreEnum").msgclass + LegacyAppInstallAdAppStoreEnum::LegacyAppInstallAdAppStore = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.enums.LegacyAppInstallAdAppStoreEnum.LegacyAppInstallAdAppStore").enummodule + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/enums/linked_account_type_pb.rb b/lib/google/ads/google_ads/v25/enums/linked_account_type_pb.rb new file mode 100644 index 000000000..409f92977 --- /dev/null +++ b/lib/google/ads/google_ads/v25/enums/linked_account_type_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/enums/linked_account_type.proto + +require 'google/protobuf' + + +descriptor_data = "\n8google/ads/googleads/v25/enums/linked_account_type.proto\x12\x1egoogle.ads.googleads.v25.enums\"i\n\x15LinkedAccountTypeEnum\"P\n\x11LinkedAccountType\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x0b\n\x07UNKNOWN\x10\x01\x12\x1d\n\x19THIRD_PARTY_APP_ANALYTICS\x10\x02\x42\xf0\x01\n\"com.google.ads.googleads.v25.enumsB\x16LinkedAccountTypeProtoP\x01ZCgoogle.golang.org/genproto/googleapis/ads/googleads/v25/enums;enums\xa2\x02\x03GAA\xaa\x02\x1eGoogle.Ads.GoogleAds.V25.Enums\xca\x02\x1eGoogle\\Ads\\GoogleAds\\V25\\Enums\xea\x02\"Google::Ads::GoogleAds::V25::Enumsb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Enums + LinkedAccountTypeEnum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.enums.LinkedAccountTypeEnum").msgclass + LinkedAccountTypeEnum::LinkedAccountType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.enums.LinkedAccountTypeEnum.LinkedAccountType").enummodule + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/enums/linked_product_type_pb.rb b/lib/google/ads/google_ads/v25/enums/linked_product_type_pb.rb new file mode 100644 index 000000000..f736a84ce --- /dev/null +++ b/lib/google/ads/google_ads/v25/enums/linked_product_type_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/enums/linked_product_type.proto + +require 'google/protobuf' + + +descriptor_data = "\n8google/ads/googleads/v25/enums/linked_product_type.proto\x12\x1egoogle.ads.googleads.v25.enums\"\xad\x01\n\x15LinkedProductTypeEnum\"\x93\x01\n\x11LinkedProductType\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x0b\n\x07UNKNOWN\x10\x01\x12\x10\n\x0c\x44\x41TA_PARTNER\x10\x02\x12\x0e\n\nGOOGLE_ADS\x10\x03\x12\x10\n\x0cHOTEL_CENTER\x10\x07\x12\x13\n\x0fMERCHANT_CENTER\x10\x08\x12\x17\n\x13\x41\x44VERTISING_PARTNER\x10\tB\xf0\x01\n\"com.google.ads.googleads.v25.enumsB\x16LinkedProductTypeProtoP\x01ZCgoogle.golang.org/genproto/googleapis/ads/googleads/v25/enums;enums\xa2\x02\x03GAA\xaa\x02\x1eGoogle.Ads.GoogleAds.V25.Enums\xca\x02\x1eGoogle\\Ads\\GoogleAds\\V25\\Enums\xea\x02\"Google::Ads::GoogleAds::V25::Enumsb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Enums + LinkedProductTypeEnum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.enums.LinkedProductTypeEnum").msgclass + LinkedProductTypeEnum::LinkedProductType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.enums.LinkedProductTypeEnum.LinkedProductType").enummodule + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/enums/listing_group_filter_custom_attribute_index_pb.rb b/lib/google/ads/google_ads/v25/enums/listing_group_filter_custom_attribute_index_pb.rb new file mode 100644 index 000000000..fdea10a86 --- /dev/null +++ b/lib/google/ads/google_ads/v25/enums/listing_group_filter_custom_attribute_index_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/enums/listing_group_filter_custom_attribute_index.proto + +require 'google/protobuf' + + +descriptor_data = "\nPgoogle/ads/googleads/v25/enums/listing_group_filter_custom_attribute_index.proto\x12\x1egoogle.ads.googleads.v25.enums\"\xb1\x01\n*ListingGroupFilterCustomAttributeIndexEnum\"\x82\x01\n&ListingGroupFilterCustomAttributeIndex\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x0b\n\x07UNKNOWN\x10\x01\x12\n\n\x06INDEX0\x10\x02\x12\n\n\x06INDEX1\x10\x03\x12\n\n\x06INDEX2\x10\x04\x12\n\n\x06INDEX3\x10\x05\x12\n\n\x06INDEX4\x10\x06\x42\x85\x02\n\"com.google.ads.googleads.v25.enumsB+ListingGroupFilterCustomAttributeIndexProtoP\x01ZCgoogle.golang.org/genproto/googleapis/ads/googleads/v25/enums;enums\xa2\x02\x03GAA\xaa\x02\x1eGoogle.Ads.GoogleAds.V25.Enums\xca\x02\x1eGoogle\\Ads\\GoogleAds\\V25\\Enums\xea\x02\"Google::Ads::GoogleAds::V25::Enumsb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Enums + ListingGroupFilterCustomAttributeIndexEnum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.enums.ListingGroupFilterCustomAttributeIndexEnum").msgclass + ListingGroupFilterCustomAttributeIndexEnum::ListingGroupFilterCustomAttributeIndex = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.enums.ListingGroupFilterCustomAttributeIndexEnum.ListingGroupFilterCustomAttributeIndex").enummodule + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/enums/listing_group_filter_listing_source_pb.rb b/lib/google/ads/google_ads/v25/enums/listing_group_filter_listing_source_pb.rb new file mode 100644 index 000000000..e21880d24 --- /dev/null +++ b/lib/google/ads/google_ads/v25/enums/listing_group_filter_listing_source_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/enums/listing_group_filter_listing_source.proto + +require 'google/protobuf' + + +descriptor_data = "\nHgoogle/ads/googleads/v25/enums/listing_group_filter_listing_source.proto\x12\x1egoogle.ads.googleads.v25.enums\"\x8d\x01\n#ListingGroupFilterListingSourceEnum\"f\n\x1fListingGroupFilterListingSource\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x0b\n\x07UNKNOWN\x10\x01\x12\x0c\n\x08SHOPPING\x10\x02\x12\x0b\n\x07WEBPAGE\x10\x03\x12\n\n\x06RETAIL\x10\x04\x42\xfe\x01\n\"com.google.ads.googleads.v25.enumsB$ListingGroupFilterListingSourceProtoP\x01ZCgoogle.golang.org/genproto/googleapis/ads/googleads/v25/enums;enums\xa2\x02\x03GAA\xaa\x02\x1eGoogle.Ads.GoogleAds.V25.Enums\xca\x02\x1eGoogle\\Ads\\GoogleAds\\V25\\Enums\xea\x02\"Google::Ads::GoogleAds::V25::Enumsb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Enums + ListingGroupFilterListingSourceEnum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.enums.ListingGroupFilterListingSourceEnum").msgclass + ListingGroupFilterListingSourceEnum::ListingGroupFilterListingSource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.enums.ListingGroupFilterListingSourceEnum.ListingGroupFilterListingSource").enummodule + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/enums/listing_group_filter_product_category_level_pb.rb b/lib/google/ads/google_ads/v25/enums/listing_group_filter_product_category_level_pb.rb new file mode 100644 index 000000000..4eb57fb1d --- /dev/null +++ b/lib/google/ads/google_ads/v25/enums/listing_group_filter_product_category_level_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/enums/listing_group_filter_product_category_level.proto + +require 'google/protobuf' + + +descriptor_data = "\nPgoogle/ads/googleads/v25/enums/listing_group_filter_product_category_level.proto\x12\x1egoogle.ads.googleads.v25.enums\"\xb1\x01\n*ListingGroupFilterProductCategoryLevelEnum\"\x82\x01\n&ListingGroupFilterProductCategoryLevel\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x0b\n\x07UNKNOWN\x10\x01\x12\n\n\x06LEVEL1\x10\x02\x12\n\n\x06LEVEL2\x10\x03\x12\n\n\x06LEVEL3\x10\x04\x12\n\n\x06LEVEL4\x10\x05\x12\n\n\x06LEVEL5\x10\x06\x42\x85\x02\n\"com.google.ads.googleads.v25.enumsB+ListingGroupFilterProductCategoryLevelProtoP\x01ZCgoogle.golang.org/genproto/googleapis/ads/googleads/v25/enums;enums\xa2\x02\x03GAA\xaa\x02\x1eGoogle.Ads.GoogleAds.V25.Enums\xca\x02\x1eGoogle\\Ads\\GoogleAds\\V25\\Enums\xea\x02\"Google::Ads::GoogleAds::V25::Enumsb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Enums + ListingGroupFilterProductCategoryLevelEnum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.enums.ListingGroupFilterProductCategoryLevelEnum").msgclass + ListingGroupFilterProductCategoryLevelEnum::ListingGroupFilterProductCategoryLevel = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.enums.ListingGroupFilterProductCategoryLevelEnum.ListingGroupFilterProductCategoryLevel").enummodule + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/enums/listing_group_filter_product_channel_pb.rb b/lib/google/ads/google_ads/v25/enums/listing_group_filter_product_channel_pb.rb new file mode 100644 index 000000000..e9e5ef75f --- /dev/null +++ b/lib/google/ads/google_ads/v25/enums/listing_group_filter_product_channel_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/enums/listing_group_filter_product_channel.proto + +require 'google/protobuf' + + +descriptor_data = "\nIgoogle/ads/googleads/v25/enums/listing_group_filter_product_channel.proto\x12\x1egoogle.ads.googleads.v25.enums\"\x7f\n$ListingGroupFilterProductChannelEnum\"W\n ListingGroupFilterProductChannel\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x0b\n\x07UNKNOWN\x10\x01\x12\n\n\x06ONLINE\x10\x02\x12\t\n\x05LOCAL\x10\x03\x42\xff\x01\n\"com.google.ads.googleads.v25.enumsB%ListingGroupFilterProductChannelProtoP\x01ZCgoogle.golang.org/genproto/googleapis/ads/googleads/v25/enums;enums\xa2\x02\x03GAA\xaa\x02\x1eGoogle.Ads.GoogleAds.V25.Enums\xca\x02\x1eGoogle\\Ads\\GoogleAds\\V25\\Enums\xea\x02\"Google::Ads::GoogleAds::V25::Enumsb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Enums + ListingGroupFilterProductChannelEnum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.enums.ListingGroupFilterProductChannelEnum").msgclass + ListingGroupFilterProductChannelEnum::ListingGroupFilterProductChannel = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.enums.ListingGroupFilterProductChannelEnum.ListingGroupFilterProductChannel").enummodule + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/enums/listing_group_filter_product_condition_pb.rb b/lib/google/ads/google_ads/v25/enums/listing_group_filter_product_condition_pb.rb new file mode 100644 index 000000000..60f21b00c --- /dev/null +++ b/lib/google/ads/google_ads/v25/enums/listing_group_filter_product_condition_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/enums/listing_group_filter_product_condition.proto + +require 'google/protobuf' + + +descriptor_data = "\nKgoogle/ads/googleads/v25/enums/listing_group_filter_product_condition.proto\x12\x1egoogle.ads.googleads.v25.enums\"\x90\x01\n&ListingGroupFilterProductConditionEnum\"f\n\"ListingGroupFilterProductCondition\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x0b\n\x07UNKNOWN\x10\x01\x12\x07\n\x03NEW\x10\x02\x12\x0f\n\x0bREFURBISHED\x10\x03\x12\x08\n\x04USED\x10\x04\x42\x81\x02\n\"com.google.ads.googleads.v25.enumsB\'ListingGroupFilterProductConditionProtoP\x01ZCgoogle.golang.org/genproto/googleapis/ads/googleads/v25/enums;enums\xa2\x02\x03GAA\xaa\x02\x1eGoogle.Ads.GoogleAds.V25.Enums\xca\x02\x1eGoogle\\Ads\\GoogleAds\\V25\\Enums\xea\x02\"Google::Ads::GoogleAds::V25::Enumsb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Enums + ListingGroupFilterProductConditionEnum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.enums.ListingGroupFilterProductConditionEnum").msgclass + ListingGroupFilterProductConditionEnum::ListingGroupFilterProductCondition = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.enums.ListingGroupFilterProductConditionEnum.ListingGroupFilterProductCondition").enummodule + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/enums/listing_group_filter_product_type_level_pb.rb b/lib/google/ads/google_ads/v25/enums/listing_group_filter_product_type_level_pb.rb new file mode 100644 index 000000000..11212a0ad --- /dev/null +++ b/lib/google/ads/google_ads/v25/enums/listing_group_filter_product_type_level_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/enums/listing_group_filter_product_type_level.proto + +require 'google/protobuf' + + +descriptor_data = "\nLgoogle/ads/googleads/v25/enums/listing_group_filter_product_type_level.proto\x12\x1egoogle.ads.googleads.v25.enums\"\xa8\x01\n&ListingGroupFilterProductTypeLevelEnum\"~\n\"ListingGroupFilterProductTypeLevel\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x0b\n\x07UNKNOWN\x10\x01\x12\n\n\x06LEVEL1\x10\x02\x12\n\n\x06LEVEL2\x10\x03\x12\n\n\x06LEVEL3\x10\x04\x12\n\n\x06LEVEL4\x10\x05\x12\n\n\x06LEVEL5\x10\x06\x42\x81\x02\n\"com.google.ads.googleads.v25.enumsB\'ListingGroupFilterProductTypeLevelProtoP\x01ZCgoogle.golang.org/genproto/googleapis/ads/googleads/v25/enums;enums\xa2\x02\x03GAA\xaa\x02\x1eGoogle.Ads.GoogleAds.V25.Enums\xca\x02\x1eGoogle\\Ads\\GoogleAds\\V25\\Enums\xea\x02\"Google::Ads::GoogleAds::V25::Enumsb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Enums + ListingGroupFilterProductTypeLevelEnum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.enums.ListingGroupFilterProductTypeLevelEnum").msgclass + ListingGroupFilterProductTypeLevelEnum::ListingGroupFilterProductTypeLevel = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.enums.ListingGroupFilterProductTypeLevelEnum.ListingGroupFilterProductTypeLevel").enummodule + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/enums/listing_group_filter_type_enum_pb.rb b/lib/google/ads/google_ads/v25/enums/listing_group_filter_type_enum_pb.rb new file mode 100644 index 000000000..4103cfece --- /dev/null +++ b/lib/google/ads/google_ads/v25/enums/listing_group_filter_type_enum_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/enums/listing_group_filter_type_enum.proto + +require 'google/protobuf' + + +descriptor_data = "\nCgoogle/ads/googleads/v25/enums/listing_group_filter_type_enum.proto\x12\x1egoogle.ads.googleads.v25.enums\"\x8b\x01\n\x1aListingGroupFilterTypeEnum\"m\n\x16ListingGroupFilterType\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x0b\n\x07UNKNOWN\x10\x01\x12\x0f\n\x0bSUBDIVISION\x10\x02\x12\x11\n\rUNIT_INCLUDED\x10\x03\x12\x11\n\rUNIT_EXCLUDED\x10\x04\x42\xf9\x01\n\"com.google.ads.googleads.v25.enumsB\x1fListingGroupFilterTypeEnumProtoP\x01ZCgoogle.golang.org/genproto/googleapis/ads/googleads/v25/enums;enums\xa2\x02\x03GAA\xaa\x02\x1eGoogle.Ads.GoogleAds.V25.Enums\xca\x02\x1eGoogle\\Ads\\GoogleAds\\V25\\Enums\xea\x02\"Google::Ads::GoogleAds::V25::Enumsb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Enums + ListingGroupFilterTypeEnum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.enums.ListingGroupFilterTypeEnum").msgclass + ListingGroupFilterTypeEnum::ListingGroupFilterType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.enums.ListingGroupFilterTypeEnum.ListingGroupFilterType").enummodule + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/enums/listing_group_type_pb.rb b/lib/google/ads/google_ads/v25/enums/listing_group_type_pb.rb new file mode 100644 index 000000000..d5cafea43 --- /dev/null +++ b/lib/google/ads/google_ads/v25/enums/listing_group_type_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/enums/listing_group_type.proto + +require 'google/protobuf' + + +descriptor_data = "\n7google/ads/googleads/v25/enums/listing_group_type.proto\x12\x1egoogle.ads.googleads.v25.enums\"c\n\x14ListingGroupTypeEnum\"K\n\x10ListingGroupType\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x0b\n\x07UNKNOWN\x10\x01\x12\x0f\n\x0bSUBDIVISION\x10\x02\x12\x08\n\x04UNIT\x10\x03\x42\xef\x01\n\"com.google.ads.googleads.v25.enumsB\x15ListingGroupTypeProtoP\x01ZCgoogle.golang.org/genproto/googleapis/ads/googleads/v25/enums;enums\xa2\x02\x03GAA\xaa\x02\x1eGoogle.Ads.GoogleAds.V25.Enums\xca\x02\x1eGoogle\\Ads\\GoogleAds\\V25\\Enums\xea\x02\"Google::Ads::GoogleAds::V25::Enumsb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Enums + ListingGroupTypeEnum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.enums.ListingGroupTypeEnum").msgclass + ListingGroupTypeEnum::ListingGroupType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.enums.ListingGroupTypeEnum.ListingGroupType").enummodule + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/enums/listing_type_pb.rb b/lib/google/ads/google_ads/v25/enums/listing_type_pb.rb new file mode 100644 index 000000000..7e8a80874 --- /dev/null +++ b/lib/google/ads/google_ads/v25/enums/listing_type_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/enums/listing_type.proto + +require 'google/protobuf' + + +descriptor_data = "\n1google/ads/googleads/v25/enums/listing_type.proto\x12\x1egoogle.ads.googleads.v25.enums\"L\n\x0fListingTypeEnum\"9\n\x0bListingType\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x0b\n\x07UNKNOWN\x10\x01\x12\x0c\n\x08VEHICLES\x10\x02\x42\xea\x01\n\"com.google.ads.googleads.v25.enumsB\x10ListingTypeProtoP\x01ZCgoogle.golang.org/genproto/googleapis/ads/googleads/v25/enums;enums\xa2\x02\x03GAA\xaa\x02\x1eGoogle.Ads.GoogleAds.V25.Enums\xca\x02\x1eGoogle\\Ads\\GoogleAds\\V25\\Enums\xea\x02\"Google::Ads::GoogleAds::V25::Enumsb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Enums + ListingTypeEnum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.enums.ListingTypeEnum").msgclass + ListingTypeEnum::ListingType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.enums.ListingTypeEnum.ListingType").enummodule + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/enums/local_services_business_registration_check_rejection_reason_pb.rb b/lib/google/ads/google_ads/v25/enums/local_services_business_registration_check_rejection_reason_pb.rb new file mode 100644 index 000000000..deddb5d27 --- /dev/null +++ b/lib/google/ads/google_ads/v25/enums/local_services_business_registration_check_rejection_reason_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/enums/local_services_business_registration_check_rejection_reason.proto + +require 'google/protobuf' + + +descriptor_data = "\n`google/ads/googleads/v25/enums/local_services_business_registration_check_rejection_reason.proto\x12\x1egoogle.ads.googleads.v25.enums\"\xef\x02\n9LocalServicesBusinessRegistrationCheckRejectionReasonEnum\"\xb1\x02\n5LocalServicesBusinessRegistrationCheckRejectionReason\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x0b\n\x07UNKNOWN\x10\x01\x12\x1a\n\x16\x42USINESS_NAME_MISMATCH\x10\x02\x12\x1d\n\x19\x42USINESS_DETAILS_MISMATCH\x10\x03\x12\x10\n\x0cID_NOT_FOUND\x10\x04\x12\x1f\n\x1bPOOR_DOCUMENT_IMAGE_QUALITY\x10\x05\x12\x14\n\x10\x44OCUMENT_EXPIRED\x10\x06\x12\x14\n\x10\x44OCUMENT_INVALID\x10\x07\x12\x1a\n\x16\x44OCUMENT_TYPE_MISMATCH\x10\x08\x12\x19\n\x15\x44OCUMENT_UNVERIFIABLE\x10\t\x12\t\n\x05OTHER\x10\nB\x94\x02\n\"com.google.ads.googleads.v25.enumsB:LocalServicesBusinessRegistrationCheckRejectionReasonProtoP\x01ZCgoogle.golang.org/genproto/googleapis/ads/googleads/v25/enums;enums\xa2\x02\x03GAA\xaa\x02\x1eGoogle.Ads.GoogleAds.V25.Enums\xca\x02\x1eGoogle\\Ads\\GoogleAds\\V25\\Enums\xea\x02\"Google::Ads::GoogleAds::V25::Enumsb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Enums + LocalServicesBusinessRegistrationCheckRejectionReasonEnum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.enums.LocalServicesBusinessRegistrationCheckRejectionReasonEnum").msgclass + LocalServicesBusinessRegistrationCheckRejectionReasonEnum::LocalServicesBusinessRegistrationCheckRejectionReason = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.enums.LocalServicesBusinessRegistrationCheckRejectionReasonEnum.LocalServicesBusinessRegistrationCheckRejectionReason").enummodule + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/enums/local_services_business_registration_type_pb.rb b/lib/google/ads/google_ads/v25/enums/local_services_business_registration_type_pb.rb new file mode 100644 index 000000000..4fe21fa0c --- /dev/null +++ b/lib/google/ads/google_ads/v25/enums/local_services_business_registration_type_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/enums/local_services_business_registration_type.proto + +require 'google/protobuf' + + +descriptor_data = "\nNgoogle/ads/googleads/v25/enums/local_services_business_registration_type.proto\x12\x1egoogle.ads.googleads.v25.enums\"\x8c\x01\n)LocalServicesBusinessRegistrationTypeEnum\"_\n%LocalServicesBusinessRegistrationType\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x0b\n\x07UNKNOWN\x10\x01\x12\n\n\x06NUMBER\x10\x02\x12\x0c\n\x08\x44OCUMENT\x10\x03\x42\x84\x02\n\"com.google.ads.googleads.v25.enumsB*LocalServicesBusinessRegistrationTypeProtoP\x01ZCgoogle.golang.org/genproto/googleapis/ads/googleads/v25/enums;enums\xa2\x02\x03GAA\xaa\x02\x1eGoogle.Ads.GoogleAds.V25.Enums\xca\x02\x1eGoogle\\Ads\\GoogleAds\\V25\\Enums\xea\x02\"Google::Ads::GoogleAds::V25::Enumsb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Enums + LocalServicesBusinessRegistrationTypeEnum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.enums.LocalServicesBusinessRegistrationTypeEnum").msgclass + LocalServicesBusinessRegistrationTypeEnum::LocalServicesBusinessRegistrationType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.enums.LocalServicesBusinessRegistrationTypeEnum.LocalServicesBusinessRegistrationType").enummodule + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/enums/local_services_conversation_type_pb.rb b/lib/google/ads/google_ads/v25/enums/local_services_conversation_type_pb.rb new file mode 100644 index 000000000..a487eb247 --- /dev/null +++ b/lib/google/ads/google_ads/v25/enums/local_services_conversation_type_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/enums/local_services_conversation_type.proto + +require 'google/protobuf' + + +descriptor_data = "\nEgoogle/ads/googleads/v25/enums/local_services_conversation_type.proto\x12\x1egoogle.ads.googleads.v25.enums\"\xb3\x01\n%LocalServicesLeadConversationTypeEnum\"\x89\x01\n\x10\x43onversationType\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x0b\n\x07UNKNOWN\x10\x01\x12\t\n\x05\x45MAIL\x10\x02\x12\x0b\n\x07MESSAGE\x10\x03\x12\x0e\n\nPHONE_CALL\x10\x04\x12\x07\n\x03SMS\x10\x05\x12\x0b\n\x07\x42OOKING\x10\x06\x12\x0c\n\x08WHATSAPP\x10\x07\x12\x0b\n\x07\x41\x44S_API\x10\x08\x42\xfc\x01\n\"com.google.ads.googleads.v25.enumsB\"LocalServicesConversationTypeProtoP\x01ZCgoogle.golang.org/genproto/googleapis/ads/googleads/v25/enums;enums\xa2\x02\x03GAA\xaa\x02\x1eGoogle.Ads.GoogleAds.V25.Enums\xca\x02\x1eGoogle\\Ads\\GoogleAds\\V25\\Enums\xea\x02\"Google::Ads::GoogleAds::V25::Enumsb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Enums + LocalServicesLeadConversationTypeEnum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.enums.LocalServicesLeadConversationTypeEnum").msgclass + LocalServicesLeadConversationTypeEnum::ConversationType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.enums.LocalServicesLeadConversationTypeEnum.ConversationType").enummodule + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/enums/local_services_employee_status_pb.rb b/lib/google/ads/google_ads/v25/enums/local_services_employee_status_pb.rb new file mode 100644 index 000000000..a96340aae --- /dev/null +++ b/lib/google/ads/google_ads/v25/enums/local_services_employee_status_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/enums/local_services_employee_status.proto + +require 'google/protobuf' + + +descriptor_data = "\nCgoogle/ads/googleads/v25/enums/local_services_employee_status.proto\x12\x1egoogle.ads.googleads.v25.enums\"x\n\x1fLocalServicesEmployeeStatusEnum\"U\n\x1bLocalServicesEmployeeStatus\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x0b\n\x07UNKNOWN\x10\x01\x12\x0b\n\x07\x45NABLED\x10\x02\x12\x0b\n\x07REMOVED\x10\x03\x42\xfa\x01\n\"com.google.ads.googleads.v25.enumsB LocalServicesEmployeeStatusProtoP\x01ZCgoogle.golang.org/genproto/googleapis/ads/googleads/v25/enums;enums\xa2\x02\x03GAA\xaa\x02\x1eGoogle.Ads.GoogleAds.V25.Enums\xca\x02\x1eGoogle\\Ads\\GoogleAds\\V25\\Enums\xea\x02\"Google::Ads::GoogleAds::V25::Enumsb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Enums + LocalServicesEmployeeStatusEnum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.enums.LocalServicesEmployeeStatusEnum").msgclass + LocalServicesEmployeeStatusEnum::LocalServicesEmployeeStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.enums.LocalServicesEmployeeStatusEnum.LocalServicesEmployeeStatus").enummodule + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/enums/local_services_employee_type_pb.rb b/lib/google/ads/google_ads/v25/enums/local_services_employee_type_pb.rb new file mode 100644 index 000000000..add150a0c --- /dev/null +++ b/lib/google/ads/google_ads/v25/enums/local_services_employee_type_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/enums/local_services_employee_type.proto + +require 'google/protobuf' + + +descriptor_data = "\nAgoogle/ads/googleads/v25/enums/local_services_employee_type.proto\x12\x1egoogle.ads.googleads.v25.enums\"|\n\x1dLocalServicesEmployeeTypeEnum\"[\n\x19LocalServicesEmployeeType\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x0b\n\x07UNKNOWN\x10\x01\x12\x12\n\x0e\x42USINESS_OWNER\x10\x02\x12\x0c\n\x08\x45MPLOYEE\x10\x03\x42\xf8\x01\n\"com.google.ads.googleads.v25.enumsB\x1eLocalServicesEmployeeTypeProtoP\x01ZCgoogle.golang.org/genproto/googleapis/ads/googleads/v25/enums;enums\xa2\x02\x03GAA\xaa\x02\x1eGoogle.Ads.GoogleAds.V25.Enums\xca\x02\x1eGoogle\\Ads\\GoogleAds\\V25\\Enums\xea\x02\"Google::Ads::GoogleAds::V25::Enumsb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Enums + LocalServicesEmployeeTypeEnum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.enums.LocalServicesEmployeeTypeEnum").msgclass + LocalServicesEmployeeTypeEnum::LocalServicesEmployeeType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.enums.LocalServicesEmployeeTypeEnum.LocalServicesEmployeeType").enummodule + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/enums/local_services_insurance_rejection_reason_pb.rb b/lib/google/ads/google_ads/v25/enums/local_services_insurance_rejection_reason_pb.rb new file mode 100644 index 000000000..c7ba888fd --- /dev/null +++ b/lib/google/ads/google_ads/v25/enums/local_services_insurance_rejection_reason_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/enums/local_services_insurance_rejection_reason.proto + +require 'google/protobuf' + + +descriptor_data = "\nNgoogle/ads/googleads/v25/enums/local_services_insurance_rejection_reason.proto\x12\x1egoogle.ads.googleads.v25.enums\"\xb2\x03\n)LocalServicesInsuranceRejectionReasonEnum\"\x84\x03\n%LocalServicesInsuranceRejectionReason\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x0b\n\x07UNKNOWN\x10\x01\x12\x1a\n\x16\x42USINESS_NAME_MISMATCH\x10\x02\x12!\n\x1dINSURANCE_AMOUNT_INSUFFICIENT\x10\x03\x12\x0b\n\x07\x45XPIRED\x10\x04\x12\x10\n\x0cNO_SIGNATURE\x10\x05\x12\x14\n\x10NO_POLICY_NUMBER\x10\x06\x12#\n\x1fNO_COMMERCIAL_GENERAL_LIABILITY\x10\x07\x12\x13\n\x0f\x45\x44ITABLE_FORMAT\x10\x08\x12\x15\n\x11\x43\x41TEGORY_MISMATCH\x10\t\x12\x1b\n\x17MISSING_EXPIRATION_DATE\x10\n\x12\x10\n\x0cPOOR_QUALITY\x10\x0b\x12\x16\n\x12POTENTIALLY_EDITED\x10\x0c\x12\x17\n\x13WRONG_DOCUMENT_TYPE\x10\r\x12\r\n\tNON_FINAL\x10\x0e\x12\t\n\x05OTHER\x10\x0f\x42\x84\x02\n\"com.google.ads.googleads.v25.enumsB*LocalServicesInsuranceRejectionReasonProtoP\x01ZCgoogle.golang.org/genproto/googleapis/ads/googleads/v25/enums;enums\xa2\x02\x03GAA\xaa\x02\x1eGoogle.Ads.GoogleAds.V25.Enums\xca\x02\x1eGoogle\\Ads\\GoogleAds\\V25\\Enums\xea\x02\"Google::Ads::GoogleAds::V25::Enumsb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Enums + LocalServicesInsuranceRejectionReasonEnum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.enums.LocalServicesInsuranceRejectionReasonEnum").msgclass + LocalServicesInsuranceRejectionReasonEnum::LocalServicesInsuranceRejectionReason = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.enums.LocalServicesInsuranceRejectionReasonEnum.LocalServicesInsuranceRejectionReason").enummodule + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/enums/local_services_lead_credit_issuance_decision_pb.rb b/lib/google/ads/google_ads/v25/enums/local_services_lead_credit_issuance_decision_pb.rb new file mode 100644 index 000000000..171cc6e43 --- /dev/null +++ b/lib/google/ads/google_ads/v25/enums/local_services_lead_credit_issuance_decision_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/enums/local_services_lead_credit_issuance_decision.proto + +require 'google/protobuf' + + +descriptor_data = "\nQgoogle/ads/googleads/v25/enums/local_services_lead_credit_issuance_decision.proto\x12\x1egoogle.ads.googleads.v25.enums\"\xd8\x01\n+LocalServicesLeadCreditIssuanceDecisionEnum\"\xa8\x01\n\x16\x43reditIssuanceDecision\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x0b\n\x07UNKNOWN\x10\x01\x12!\n\x1dSUCCESS_NOT_REACHED_THRESHOLD\x10\x02\x12\x1d\n\x19SUCCESS_REACHED_THRESHOLD\x10\x03\x12\x17\n\x13\x46\x41IL_OVER_THRESHOLD\x10\x04\x12\x15\n\x11\x46\x41IL_NOT_ELIGIBLE\x10\x05\x42\x86\x02\n\"com.google.ads.googleads.v25.enumsB,LocalServicesLeadCreditIssuanceDecisionProtoP\x01ZCgoogle.golang.org/genproto/googleapis/ads/googleads/v25/enums;enums\xa2\x02\x03GAA\xaa\x02\x1eGoogle.Ads.GoogleAds.V25.Enums\xca\x02\x1eGoogle\\Ads\\GoogleAds\\V25\\Enums\xea\x02\"Google::Ads::GoogleAds::V25::Enumsb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Enums + LocalServicesLeadCreditIssuanceDecisionEnum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.enums.LocalServicesLeadCreditIssuanceDecisionEnum").msgclass + LocalServicesLeadCreditIssuanceDecisionEnum::CreditIssuanceDecision = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.enums.LocalServicesLeadCreditIssuanceDecisionEnum.CreditIssuanceDecision").enummodule + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/enums/local_services_lead_credit_state_pb.rb b/lib/google/ads/google_ads/v25/enums/local_services_lead_credit_state_pb.rb new file mode 100644 index 000000000..464d85537 --- /dev/null +++ b/lib/google/ads/google_ads/v25/enums/local_services_lead_credit_state_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/enums/local_services_lead_credit_state.proto + +require 'google/protobuf' + + +descriptor_data = "\nEgoogle/ads/googleads/v25/enums/local_services_lead_credit_state.proto\x12\x1egoogle.ads.googleads.v25.enums\"f\n\x1cLocalServicesCreditStateEnum\"F\n\x0b\x43reditState\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x0b\n\x07UNKNOWN\x10\x01\x12\x0b\n\x07PENDING\x10\x02\x12\x0c\n\x08\x43REDITED\x10\x03\x42\xfb\x01\n\"com.google.ads.googleads.v25.enumsB!LocalServicesLeadCreditStateProtoP\x01ZCgoogle.golang.org/genproto/googleapis/ads/googleads/v25/enums;enums\xa2\x02\x03GAA\xaa\x02\x1eGoogle.Ads.GoogleAds.V25.Enums\xca\x02\x1eGoogle\\Ads\\GoogleAds\\V25\\Enums\xea\x02\"Google::Ads::GoogleAds::V25::Enumsb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Enums + LocalServicesCreditStateEnum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.enums.LocalServicesCreditStateEnum").msgclass + LocalServicesCreditStateEnum::CreditState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.enums.LocalServicesCreditStateEnum.CreditState").enummodule + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/enums/local_services_lead_status_pb.rb b/lib/google/ads/google_ads/v25/enums/local_services_lead_status_pb.rb new file mode 100644 index 000000000..6b4e1fb72 --- /dev/null +++ b/lib/google/ads/google_ads/v25/enums/local_services_lead_status_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/enums/local_services_lead_status.proto + +require 'google/protobuf' + + +descriptor_data = "\n?google/ads/googleads/v25/enums/local_services_lead_status.proto\x12\x1egoogle.ads.googleads.v25.enums\"\xba\x01\n\x1bLocalServicesLeadStatusEnum\"\x9a\x01\n\nLeadStatus\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x0b\n\x07UNKNOWN\x10\x01\x12\x07\n\x03NEW\x10\x02\x12\n\n\x06\x41\x43TIVE\x10\x03\x12\n\n\x06\x42OOKED\x10\x04\x12\x0c\n\x08\x44\x45\x43LINED\x10\x05\x12\x0b\n\x07\x45XPIRED\x10\x06\x12\x0c\n\x08\x44ISABLED\x10\x07\x12\x15\n\x11\x43ONSUMER_DECLINED\x10\x08\x12\r\n\tWIPED_OUT\x10\tB\xf6\x01\n\"com.google.ads.googleads.v25.enumsB\x1cLocalServicesLeadStatusProtoP\x01ZCgoogle.golang.org/genproto/googleapis/ads/googleads/v25/enums;enums\xa2\x02\x03GAA\xaa\x02\x1eGoogle.Ads.GoogleAds.V25.Enums\xca\x02\x1eGoogle\\Ads\\GoogleAds\\V25\\Enums\xea\x02\"Google::Ads::GoogleAds::V25::Enumsb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Enums + LocalServicesLeadStatusEnum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.enums.LocalServicesLeadStatusEnum").msgclass + LocalServicesLeadStatusEnum::LeadStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.enums.LocalServicesLeadStatusEnum.LeadStatus").enummodule + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/enums/local_services_lead_survey_answer_pb.rb b/lib/google/ads/google_ads/v25/enums/local_services_lead_survey_answer_pb.rb new file mode 100644 index 000000000..e2c50f700 --- /dev/null +++ b/lib/google/ads/google_ads/v25/enums/local_services_lead_survey_answer_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/enums/local_services_lead_survey_answer.proto + +require 'google/protobuf' + + +descriptor_data = "\nFgoogle/ads/googleads/v25/enums/local_services_lead_survey_answer.proto\x12\x1egoogle.ads.googleads.v25.enums\"\xab\x01\n!LocalServicesLeadSurveyAnswerEnum\"\x85\x01\n\x0cSurveyAnswer\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x0b\n\x07UNKNOWN\x10\x01\x12\x12\n\x0eVERY_SATISFIED\x10\x02\x12\r\n\tSATISFIED\x10\x03\x12\x0b\n\x07NEUTRAL\x10\x04\x12\x10\n\x0c\x44ISSATISFIED\x10\x05\x12\x15\n\x11VERY_DISSATISFIED\x10\x06\x42\xfc\x01\n\"com.google.ads.googleads.v25.enumsB\"LocalServicesLeadSurveyAnswerProtoP\x01ZCgoogle.golang.org/genproto/googleapis/ads/googleads/v25/enums;enums\xa2\x02\x03GAA\xaa\x02\x1eGoogle.Ads.GoogleAds.V25.Enums\xca\x02\x1eGoogle\\Ads\\GoogleAds\\V25\\Enums\xea\x02\"Google::Ads::GoogleAds::V25::Enumsb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Enums + LocalServicesLeadSurveyAnswerEnum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.enums.LocalServicesLeadSurveyAnswerEnum").msgclass + LocalServicesLeadSurveyAnswerEnum::SurveyAnswer = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.enums.LocalServicesLeadSurveyAnswerEnum.SurveyAnswer").enummodule + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/enums/local_services_lead_survey_dissatisfied_reason_pb.rb b/lib/google/ads/google_ads/v25/enums/local_services_lead_survey_dissatisfied_reason_pb.rb new file mode 100644 index 000000000..c9b4fdeb3 --- /dev/null +++ b/lib/google/ads/google_ads/v25/enums/local_services_lead_survey_dissatisfied_reason_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/enums/local_services_lead_survey_dissatisfied_reason.proto + +require 'google/protobuf' + + +descriptor_data = "\nSgoogle/ads/googleads/v25/enums/local_services_lead_survey_dissatisfied_reason.proto\x12\x1egoogle.ads.googleads.v25.enums\"\xf4\x01\n-LocalServicesLeadSurveyDissatisfiedReasonEnum\"\xc2\x01\n\x18SurveyDissatisfiedReason\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x0b\n\x07UNKNOWN\x10\x01\x12\x1d\n\x19OTHER_DISSATISFIED_REASON\x10\x02\x12\x10\n\x0cGEO_MISMATCH\x10\x03\x12\x15\n\x11JOB_TYPE_MISMATCH\x10\x04\x12\x15\n\x11NOT_READY_TO_BOOK\x10\x05\x12\x08\n\x04SPAM\x10\x06\x12\r\n\tDUPLICATE\x10\x07\x12\x10\n\x0cSOLICITATION\x10\x08\x42\x88\x02\n\"com.google.ads.googleads.v25.enumsB.LocalServicesLeadSurveyDissatisfiedReasonProtoP\x01ZCgoogle.golang.org/genproto/googleapis/ads/googleads/v25/enums;enums\xa2\x02\x03GAA\xaa\x02\x1eGoogle.Ads.GoogleAds.V25.Enums\xca\x02\x1eGoogle\\Ads\\GoogleAds\\V25\\Enums\xea\x02\"Google::Ads::GoogleAds::V25::Enumsb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Enums + LocalServicesLeadSurveyDissatisfiedReasonEnum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.enums.LocalServicesLeadSurveyDissatisfiedReasonEnum").msgclass + LocalServicesLeadSurveyDissatisfiedReasonEnum::SurveyDissatisfiedReason = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.enums.LocalServicesLeadSurveyDissatisfiedReasonEnum.SurveyDissatisfiedReason").enummodule + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/enums/local_services_lead_survey_satisfied_reason_pb.rb b/lib/google/ads/google_ads/v25/enums/local_services_lead_survey_satisfied_reason_pb.rb new file mode 100644 index 000000000..9bd38c4ad --- /dev/null +++ b/lib/google/ads/google_ads/v25/enums/local_services_lead_survey_satisfied_reason_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/enums/local_services_lead_survey_satisfied_reason.proto + +require 'google/protobuf' + + +descriptor_data = "\nPgoogle/ads/googleads/v25/enums/local_services_lead_survey_satisfied_reason.proto\x12\x1egoogle.ads.googleads.v25.enums\"\xde\x01\n*LocalServicesLeadSurveySatisfiedReasonEnum\"\xaf\x01\n\x15SurveySatisfiedReason\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x0b\n\x07UNKNOWN\x10\x01\x12\x1a\n\x16OTHER_SATISFIED_REASON\x10\x02\x12\x13\n\x0f\x42OOKED_CUSTOMER\x10\x03\x12\x1a\n\x16LIKELY_BOOKED_CUSTOMER\x10\x04\x12\x13\n\x0fSERVICE_RELATED\x10\x05\x12\x16\n\x12HIGH_VALUE_SERVICE\x10\x06\x42\x85\x02\n\"com.google.ads.googleads.v25.enumsB+LocalServicesLeadSurveySatisfiedReasonProtoP\x01ZCgoogle.golang.org/genproto/googleapis/ads/googleads/v25/enums;enums\xa2\x02\x03GAA\xaa\x02\x1eGoogle.Ads.GoogleAds.V25.Enums\xca\x02\x1eGoogle\\Ads\\GoogleAds\\V25\\Enums\xea\x02\"Google::Ads::GoogleAds::V25::Enumsb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Enums + LocalServicesLeadSurveySatisfiedReasonEnum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.enums.LocalServicesLeadSurveySatisfiedReasonEnum").msgclass + LocalServicesLeadSurveySatisfiedReasonEnum::SurveySatisfiedReason = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.enums.LocalServicesLeadSurveySatisfiedReasonEnum.SurveySatisfiedReason").enummodule + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/enums/local_services_lead_type_pb.rb b/lib/google/ads/google_ads/v25/enums/local_services_lead_type_pb.rb new file mode 100644 index 000000000..61b4f959a --- /dev/null +++ b/lib/google/ads/google_ads/v25/enums/local_services_lead_type_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/enums/local_services_lead_type.proto + +require 'google/protobuf' + + +descriptor_data = "\n=google/ads/googleads/v25/enums/local_services_lead_type.proto\x12\x1egoogle.ads.googleads.v25.enums\"o\n\x19LocalServicesLeadTypeEnum\"R\n\x08LeadType\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x0b\n\x07UNKNOWN\x10\x01\x12\x0b\n\x07MESSAGE\x10\x02\x12\x0e\n\nPHONE_CALL\x10\x03\x12\x0b\n\x07\x42OOKING\x10\x04\x42\xf4\x01\n\"com.google.ads.googleads.v25.enumsB\x1aLocalServicesLeadTypeProtoP\x01ZCgoogle.golang.org/genproto/googleapis/ads/googleads/v25/enums;enums\xa2\x02\x03GAA\xaa\x02\x1eGoogle.Ads.GoogleAds.V25.Enums\xca\x02\x1eGoogle\\Ads\\GoogleAds\\V25\\Enums\xea\x02\"Google::Ads::GoogleAds::V25::Enumsb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Enums + LocalServicesLeadTypeEnum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.enums.LocalServicesLeadTypeEnum").msgclass + LocalServicesLeadTypeEnum::LeadType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.enums.LocalServicesLeadTypeEnum.LeadType").enummodule + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/enums/local_services_license_rejection_reason_pb.rb b/lib/google/ads/google_ads/v25/enums/local_services_license_rejection_reason_pb.rb new file mode 100644 index 000000000..0d4fc260f --- /dev/null +++ b/lib/google/ads/google_ads/v25/enums/local_services_license_rejection_reason_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/enums/local_services_license_rejection_reason.proto + +require 'google/protobuf' + + +descriptor_data = "\nLgoogle/ads/googleads/v25/enums/local_services_license_rejection_reason.proto\x12\x1egoogle.ads.googleads.v25.enums\"\xf3\x01\n\'LocalServicesLicenseRejectionReasonEnum\"\xc7\x01\n#LocalServicesLicenseRejectionReason\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x0b\n\x07UNKNOWN\x10\x01\x12\x1a\n\x16\x42USINESS_NAME_MISMATCH\x10\x02\x12\x10\n\x0cUNAUTHORIZED\x10\x03\x12\x0b\n\x07\x45XPIRED\x10\x04\x12\x10\n\x0cPOOR_QUALITY\x10\x05\x12\x10\n\x0cUNVERIFIABLE\x10\x06\x12\x18\n\x14WRONG_DOCUMENT_OR_ID\x10\x07\x12\t\n\x05OTHER\x10\x08\x42\x82\x02\n\"com.google.ads.googleads.v25.enumsB(LocalServicesLicenseRejectionReasonProtoP\x01ZCgoogle.golang.org/genproto/googleapis/ads/googleads/v25/enums;enums\xa2\x02\x03GAA\xaa\x02\x1eGoogle.Ads.GoogleAds.V25.Enums\xca\x02\x1eGoogle\\Ads\\GoogleAds\\V25\\Enums\xea\x02\"Google::Ads::GoogleAds::V25::Enumsb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Enums + LocalServicesLicenseRejectionReasonEnum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.enums.LocalServicesLicenseRejectionReasonEnum").msgclass + LocalServicesLicenseRejectionReasonEnum::LocalServicesLicenseRejectionReason = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.enums.LocalServicesLicenseRejectionReasonEnum.LocalServicesLicenseRejectionReason").enummodule + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/enums/local_services_participant_type_pb.rb b/lib/google/ads/google_ads/v25/enums/local_services_participant_type_pb.rb new file mode 100644 index 000000000..1905e8077 --- /dev/null +++ b/lib/google/ads/google_ads/v25/enums/local_services_participant_type_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/enums/local_services_participant_type.proto + +require 'google/protobuf' + + +descriptor_data = "\nDgoogle/ads/googleads/v25/enums/local_services_participant_type.proto\x12\x1egoogle.ads.googleads.v25.enums\"q\n LocalServicesParticipantTypeEnum\"M\n\x0fParticipantType\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x0b\n\x07UNKNOWN\x10\x01\x12\x0e\n\nADVERTISER\x10\x02\x12\x0c\n\x08\x43ONSUMER\x10\x03\x42\xfb\x01\n\"com.google.ads.googleads.v25.enumsB!LocalServicesParticipantTypeProtoP\x01ZCgoogle.golang.org/genproto/googleapis/ads/googleads/v25/enums;enums\xa2\x02\x03GAA\xaa\x02\x1eGoogle.Ads.GoogleAds.V25.Enums\xca\x02\x1eGoogle\\Ads\\GoogleAds\\V25\\Enums\xea\x02\"Google::Ads::GoogleAds::V25::Enumsb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Enums + LocalServicesParticipantTypeEnum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.enums.LocalServicesParticipantTypeEnum").msgclass + LocalServicesParticipantTypeEnum::ParticipantType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.enums.LocalServicesParticipantTypeEnum.ParticipantType").enummodule + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/enums/local_services_verification_artifact_status_pb.rb b/lib/google/ads/google_ads/v25/enums/local_services_verification_artifact_status_pb.rb new file mode 100644 index 000000000..548ac9ab1 --- /dev/null +++ b/lib/google/ads/google_ads/v25/enums/local_services_verification_artifact_status_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/enums/local_services_verification_artifact_status.proto + +require 'google/protobuf' + + +descriptor_data = "\nPgoogle/ads/googleads/v25/enums/local_services_verification_artifact_status.proto\x12\x1egoogle.ads.googleads.v25.enums\"\xbe\x01\n+LocalServicesVerificationArtifactStatusEnum\"\x8e\x01\n\'LocalServicesVerificationArtifactStatus\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x0b\n\x07UNKNOWN\x10\x01\x12\n\n\x06PASSED\x10\x02\x12\n\n\x06\x46\x41ILED\x10\x03\x12\x0b\n\x07PENDING\x10\x04\x12\x11\n\rNO_SUBMISSION\x10\x05\x12\r\n\tCANCELLED\x10\x06\x42\x86\x02\n\"com.google.ads.googleads.v25.enumsB,LocalServicesVerificationArtifactStatusProtoP\x01ZCgoogle.golang.org/genproto/googleapis/ads/googleads/v25/enums;enums\xa2\x02\x03GAA\xaa\x02\x1eGoogle.Ads.GoogleAds.V25.Enums\xca\x02\x1eGoogle\\Ads\\GoogleAds\\V25\\Enums\xea\x02\"Google::Ads::GoogleAds::V25::Enumsb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Enums + LocalServicesVerificationArtifactStatusEnum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.enums.LocalServicesVerificationArtifactStatusEnum").msgclass + LocalServicesVerificationArtifactStatusEnum::LocalServicesVerificationArtifactStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.enums.LocalServicesVerificationArtifactStatusEnum.LocalServicesVerificationArtifactStatus").enummodule + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/enums/local_services_verification_artifact_type_pb.rb b/lib/google/ads/google_ads/v25/enums/local_services_verification_artifact_type_pb.rb new file mode 100644 index 000000000..6997e1f4c --- /dev/null +++ b/lib/google/ads/google_ads/v25/enums/local_services_verification_artifact_type_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/enums/local_services_verification_artifact_type.proto + +require 'google/protobuf' + + +descriptor_data = "\nNgoogle/ads/googleads/v25/enums/local_services_verification_artifact_type.proto\x12\x1egoogle.ads.googleads.v25.enums\"\xc6\x01\n)LocalServicesVerificationArtifactTypeEnum\"\x98\x01\n%LocalServicesVerificationArtifactType\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x0b\n\x07UNKNOWN\x10\x01\x12\x14\n\x10\x42\x41\x43KGROUND_CHECK\x10\x02\x12\r\n\tINSURANCE\x10\x03\x12\x0b\n\x07LICENSE\x10\x04\x12\x1f\n\x1b\x42USINESS_REGISTRATION_CHECK\x10\x05\x42\x84\x02\n\"com.google.ads.googleads.v25.enumsB*LocalServicesVerificationArtifactTypeProtoP\x01ZCgoogle.golang.org/genproto/googleapis/ads/googleads/v25/enums;enums\xa2\x02\x03GAA\xaa\x02\x1eGoogle.Ads.GoogleAds.V25.Enums\xca\x02\x1eGoogle\\Ads\\GoogleAds\\V25\\Enums\xea\x02\"Google::Ads::GoogleAds::V25::Enumsb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Enums + LocalServicesVerificationArtifactTypeEnum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.enums.LocalServicesVerificationArtifactTypeEnum").msgclass + LocalServicesVerificationArtifactTypeEnum::LocalServicesVerificationArtifactType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.enums.LocalServicesVerificationArtifactTypeEnum.LocalServicesVerificationArtifactType").enummodule + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/enums/local_services_verification_status_pb.rb b/lib/google/ads/google_ads/v25/enums/local_services_verification_status_pb.rb new file mode 100644 index 000000000..570444553 --- /dev/null +++ b/lib/google/ads/google_ads/v25/enums/local_services_verification_status_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/enums/local_services_verification_status.proto + +require 'google/protobuf' + + +descriptor_data = "\nGgoogle/ads/googleads/v25/enums/local_services_verification_status.proto\x12\x1egoogle.ads.googleads.v25.enums\"\xe8\x01\n#LocalServicesVerificationStatusEnum\"\xc0\x01\n\x1fLocalServicesVerificationStatus\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x0b\n\x07UNKNOWN\x10\x01\x12\x10\n\x0cNEEDS_REVIEW\x10\x02\x12\n\n\x06\x46\x41ILED\x10\x03\x12\n\n\x06PASSED\x10\x04\x12\x12\n\x0eNOT_APPLICABLE\x10\x05\x12\x11\n\rNO_SUBMISSION\x10\x06\x12\x16\n\x12PARTIAL_SUBMISSION\x10\x07\x12\x16\n\x12PENDING_ESCALATION\x10\x08\x42\xfe\x01\n\"com.google.ads.googleads.v25.enumsB$LocalServicesVerificationStatusProtoP\x01ZCgoogle.golang.org/genproto/googleapis/ads/googleads/v25/enums;enums\xa2\x02\x03GAA\xaa\x02\x1eGoogle.Ads.GoogleAds.V25.Enums\xca\x02\x1eGoogle\\Ads\\GoogleAds\\V25\\Enums\xea\x02\"Google::Ads::GoogleAds::V25::Enumsb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Enums + LocalServicesVerificationStatusEnum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.enums.LocalServicesVerificationStatusEnum").msgclass + LocalServicesVerificationStatusEnum::LocalServicesVerificationStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.enums.LocalServicesVerificationStatusEnum.LocalServicesVerificationStatus").enummodule + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/enums/location_group_radius_units_pb.rb b/lib/google/ads/google_ads/v25/enums/location_group_radius_units_pb.rb new file mode 100644 index 000000000..881a79755 --- /dev/null +++ b/lib/google/ads/google_ads/v25/enums/location_group_radius_units_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/enums/location_group_radius_units.proto + +require 'google/protobuf' + + +descriptor_data = "\n@google/ads/googleads/v25/enums/location_group_radius_units.proto\x12\x1egoogle.ads.googleads.v25.enums\"\x80\x01\n\x1cLocationGroupRadiusUnitsEnum\"`\n\x18LocationGroupRadiusUnits\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x0b\n\x07UNKNOWN\x10\x01\x12\n\n\x06METERS\x10\x02\x12\t\n\x05MILES\x10\x03\x12\x0f\n\x0bMILLI_MILES\x10\x04\x42\xf7\x01\n\"com.google.ads.googleads.v25.enumsB\x1dLocationGroupRadiusUnitsProtoP\x01ZCgoogle.golang.org/genproto/googleapis/ads/googleads/v25/enums;enums\xa2\x02\x03GAA\xaa\x02\x1eGoogle.Ads.GoogleAds.V25.Enums\xca\x02\x1eGoogle\\Ads\\GoogleAds\\V25\\Enums\xea\x02\"Google::Ads::GoogleAds::V25::Enumsb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Enums + LocationGroupRadiusUnitsEnum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.enums.LocationGroupRadiusUnitsEnum").msgclass + LocationGroupRadiusUnitsEnum::LocationGroupRadiusUnits = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.enums.LocationGroupRadiusUnitsEnum.LocationGroupRadiusUnits").enummodule + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/enums/location_ownership_type_pb.rb b/lib/google/ads/google_ads/v25/enums/location_ownership_type_pb.rb new file mode 100644 index 000000000..b9a943f6c --- /dev/null +++ b/lib/google/ads/google_ads/v25/enums/location_ownership_type_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/enums/location_ownership_type.proto + +require 'google/protobuf' + + +descriptor_data = "\n\n:SHARED_SETS_PER_CUSTOMER_FOR_NEGATIVE_PLACEMENT_LIST_LOWER\x10)\x12;\n7HOTEL_ADVANCE_BOOKING_WINDOW_BID_MODIFIERS_PER_AD_GROUP\x10,\x12#\n\x1f\x42IDDING_STRATEGIES_PER_CUSTOMER\x10-\x12!\n\x1d\x42\x41SIC_USER_LISTS_PER_CUSTOMER\x10/\x12#\n\x1fLOGICAL_USER_LISTS_PER_CUSTOMER\x10\x30\x12\'\n\"RULE_BASED_USER_LISTS_PER_CUSTOMER\x10\x99\x01\x12\"\n\x1e\x42\x41SE_AD_GROUP_ADS_PER_CUSTOMER\x10\x35\x12(\n$EXPERIMENT_AD_GROUP_ADS_PER_CUSTOMER\x10\x36\x12\x1d\n\x19\x41\x44_GROUP_ADS_PER_CAMPAIGN\x10\x37\x12#\n\x1fTEXT_AND_OTHER_ADS_PER_AD_GROUP\x10\x38\x12\x1a\n\x16IMAGE_ADS_PER_AD_GROUP\x10\x39\x12#\n\x1fSHOPPING_SMART_ADS_PER_AD_GROUP\x10:\x12&\n\"RESPONSIVE_SEARCH_ADS_PER_AD_GROUP\x10;\x12\x18\n\x14\x41PP_ADS_PER_AD_GROUP\x10<\x12#\n\x1f\x41PP_ENGAGEMENT_ADS_PER_AD_GROUP\x10=\x12\x1a\n\x16LOCAL_ADS_PER_AD_GROUP\x10>\x12\x1a\n\x16VIDEO_ADS_PER_AD_GROUP\x10?\x12+\n&LEAD_FORM_CAMPAIGN_ASSETS_PER_CAMPAIGN\x10\x8f\x01\x12*\n&PROMOTION_CUSTOMER_ASSETS_PER_CUSTOMER\x10O\x12*\n&PROMOTION_CAMPAIGN_ASSETS_PER_CAMPAIGN\x10P\x12*\n&PROMOTION_AD_GROUP_ASSETS_PER_AD_GROUP\x10Q\x12)\n$CALLOUT_CUSTOMER_ASSETS_PER_CUSTOMER\x10\x86\x01\x12)\n$CALLOUT_CAMPAIGN_ASSETS_PER_CAMPAIGN\x10\x87\x01\x12)\n$CALLOUT_AD_GROUP_ASSETS_PER_AD_GROUP\x10\x88\x01\x12*\n%SITELINK_CUSTOMER_ASSETS_PER_CUSTOMER\x10\x89\x01\x12*\n%SITELINK_CAMPAIGN_ASSETS_PER_CAMPAIGN\x10\x8a\x01\x12*\n%SITELINK_AD_GROUP_ASSETS_PER_AD_GROUP\x10\x8b\x01\x12\x34\n/STRUCTURED_SNIPPET_CUSTOMER_ASSETS_PER_CUSTOMER\x10\x8c\x01\x12\x34\n/STRUCTURED_SNIPPET_CAMPAIGN_ASSETS_PER_CAMPAIGN\x10\x8d\x01\x12\x34\n/STRUCTURED_SNIPPET_AD_GROUP_ASSETS_PER_AD_GROUP\x10\x8e\x01\x12,\n\'MOBILE_APP_CUSTOMER_ASSETS_PER_CUSTOMER\x10\x90\x01\x12,\n\'MOBILE_APP_CAMPAIGN_ASSETS_PER_CAMPAIGN\x10\x91\x01\x12,\n\'MOBILE_APP_AD_GROUP_ASSETS_PER_AD_GROUP\x10\x92\x01\x12/\n*HOTEL_CALLOUT_CUSTOMER_ASSETS_PER_CUSTOMER\x10\x93\x01\x12/\n*HOTEL_CALLOUT_CAMPAIGN_ASSETS_PER_CAMPAIGN\x10\x94\x01\x12/\n*HOTEL_CALLOUT_AD_GROUP_ASSETS_PER_AD_GROUP\x10\x95\x01\x12&\n!CALL_CUSTOMER_ASSETS_PER_CUSTOMER\x10\x96\x01\x12&\n!CALL_CAMPAIGN_ASSETS_PER_CAMPAIGN\x10\x97\x01\x12&\n!CALL_AD_GROUP_ASSETS_PER_AD_GROUP\x10\x98\x01\x12\'\n\"PRICE_CUSTOMER_ASSETS_PER_CUSTOMER\x10\x9a\x01\x12\'\n\"PRICE_CAMPAIGN_ASSETS_PER_CAMPAIGN\x10\x9b\x01\x12\'\n\"PRICE_AD_GROUP_ASSETS_PER_AD_GROUP\x10\x9c\x01\x12*\n%AD_IMAGE_CAMPAIGN_ASSETS_PER_CAMPAIGN\x10\xaf\x01\x12*\n%AD_IMAGE_AD_GROUP_ASSETS_PER_AD_GROUP\x10\xb0\x01\x12&\n!PAGE_FEED_ASSET_SETS_PER_CUSTOMER\x10\x9d\x01\x12\x33\n.DYNAMIC_EDUCATION_FEED_ASSET_SETS_PER_CUSTOMER\x10\x9e\x01\x12#\n\x1e\x41SSETS_PER_PAGE_FEED_ASSET_SET\x10\x9f\x01\x12\x30\n+ASSETS_PER_DYNAMIC_EDUCATION_FEED_ASSET_SET\x10\xa0\x01\x12\x30\n+DYNAMIC_REAL_ESTATE_ASSET_SETS_PER_CUSTOMER\x10\xa1\x01\x12-\n(ASSETS_PER_DYNAMIC_REAL_ESTATE_ASSET_SET\x10\xa2\x01\x12+\n&DYNAMIC_CUSTOM_ASSET_SETS_PER_CUSTOMER\x10\xa3\x01\x12(\n#ASSETS_PER_DYNAMIC_CUSTOM_ASSET_SET\x10\xa4\x01\x12\x37\n2DYNAMIC_HOTELS_AND_RENTALS_ASSET_SETS_PER_CUSTOMER\x10\xa5\x01\x12\x34\n/ASSETS_PER_DYNAMIC_HOTELS_AND_RENTALS_ASSET_SET\x10\xa6\x01\x12*\n%DYNAMIC_LOCAL_ASSET_SETS_PER_CUSTOMER\x10\xa7\x01\x12\'\n\"ASSETS_PER_DYNAMIC_LOCAL_ASSET_SET\x10\xa8\x01\x12,\n\'DYNAMIC_FLIGHTS_ASSET_SETS_PER_CUSTOMER\x10\xa9\x01\x12)\n$ASSETS_PER_DYNAMIC_FLIGHTS_ASSET_SET\x10\xaa\x01\x12+\n&DYNAMIC_TRAVEL_ASSET_SETS_PER_CUSTOMER\x10\xab\x01\x12(\n#ASSETS_PER_DYNAMIC_TRAVEL_ASSET_SET\x10\xac\x01\x12)\n$DYNAMIC_JOBS_ASSET_SETS_PER_CUSTOMER\x10\xad\x01\x12&\n!ASSETS_PER_DYNAMIC_JOBS_ASSET_SET\x10\xae\x01\x12/\n*BUSINESS_NAME_CAMPAIGN_ASSETS_PER_CAMPAIGN\x10\xb3\x01\x12/\n*BUSINESS_LOGO_CAMPAIGN_ASSETS_PER_CAMPAIGN\x10\xb4\x01\x12\x13\n\x0fVERSIONS_PER_AD\x10R\x12\x1b\n\x17USER_FEEDS_PER_CUSTOMER\x10Z\x12\x1d\n\x19SYSTEM_FEEDS_PER_CUSTOMER\x10[\x12\x1c\n\x18\x46\x45\x45\x44_ATTRIBUTES_PER_FEED\x10\\\x12\x1b\n\x17\x46\x45\x45\x44_ITEMS_PER_CUSTOMER\x10^\x12\x1f\n\x1b\x43\x41MPAIGN_FEEDS_PER_CUSTOMER\x10_\x12$\n BASE_CAMPAIGN_FEEDS_PER_CUSTOMER\x10`\x12*\n&EXPERIMENT_CAMPAIGN_FEEDS_PER_CUSTOMER\x10m\x12\x1f\n\x1b\x41\x44_GROUP_FEEDS_PER_CUSTOMER\x10\x61\x12$\n BASE_AD_GROUP_FEEDS_PER_CUSTOMER\x10\x62\x12*\n&EXPERIMENT_AD_GROUP_FEEDS_PER_CUSTOMER\x10n\x12\x1f\n\x1b\x41\x44_GROUP_FEEDS_PER_CAMPAIGN\x10\x63\x12\x1f\n\x1b\x46\x45\x45\x44_ITEM_SETS_PER_CUSTOMER\x10\x64\x12 \n\x1c\x46\x45\x45\x44_ITEMS_PER_FEED_ITEM_SET\x10\x65\x12%\n!CAMPAIGN_EXPERIMENTS_PER_CUSTOMER\x10p\x12(\n$EXPERIMENT_ARMS_PER_VIDEO_EXPERIMENT\x10q\x12\x1d\n\x19OWNED_LABELS_PER_CUSTOMER\x10s\x12\x17\n\x13LABELS_PER_CAMPAIGN\x10u\x12\x17\n\x13LABELS_PER_AD_GROUP\x10v\x12\x1a\n\x16LABELS_PER_AD_GROUP_AD\x10w\x12!\n\x1dLABELS_PER_AD_GROUP_CRITERION\x10x\x12\x1e\n\x1aTARGET_CUSTOMERS_PER_LABEL\x10y\x12\'\n#KEYWORD_PLANS_PER_USER_PER_CUSTOMER\x10z\x12\x33\n/KEYWORD_PLAN_AD_GROUP_KEYWORDS_PER_KEYWORD_PLAN\x10{\x12+\n\'KEYWORD_PLAN_AD_GROUPS_PER_KEYWORD_PLAN\x10|\x12\x33\n/KEYWORD_PLAN_NEGATIVE_KEYWORDS_PER_KEYWORD_PLAN\x10}\x12+\n\'KEYWORD_PLAN_CAMPAIGNS_PER_KEYWORD_PLAN\x10~\x12$\n\x1f\x43ONVERSION_ACTIONS_PER_CUSTOMER\x10\x80\x01\x12!\n\x1c\x42\x41TCH_JOB_OPERATIONS_PER_JOB\x10\x82\x01\x12\x1c\n\x17\x42\x41TCH_JOBS_PER_CUSTOMER\x10\x83\x01\x12\x39\n4HOTEL_CHECK_IN_DATE_RANGE_BID_MODIFIERS_PER_AD_GROUP\x10\x84\x01\x12@\n;SHARED_SETS_PER_ACCOUNT_FOR_ACCOUNT_LEVEL_NEGATIVE_KEYWORDS\x10\xb1\x01\x12\x33\n.ACCOUNT_LEVEL_NEGATIVE_KEYWORDS_PER_SHARED_SET\x10\xb2\x01\x12/\n*ENABLED_ASSET_PER_HOTEL_PROPERTY_ASSET_SET\x10\xb5\x01\x12\x37\n2ENABLED_HOTEL_PROPERTY_ASSET_LINKS_PER_ASSET_GROUP\x10\xb6\x01\x12\x1a\n\x15\x42RANDS_PER_SHARED_SET\x10\xb7\x01\x12-\n(ENABLED_BRAND_LIST_CRITERIA_PER_CAMPAIGN\x10\xb8\x01\x12&\n!SHARED_SETS_PER_ACCOUNT_FOR_BRAND\x10\xb9\x01\x12&\n!LOOKALIKE_USER_LISTS_PER_CUSTOMER\x10\xba\x01\x12&\n!LOGO_CAMPAIGN_ASSETS_PER_CAMPAIGN\x10\xbb\x01\x12.\n)BUSINESS_MESSAGE_ASSET_LINKS_PER_CUSTOMER\x10\xbc\x01\x12\x37\n2WHATSAPP_BUSINESS_MESSAGE_ASSET_LINKS_PER_CAMPAIGN\x10\xbd\x01\x12\x37\n2WHATSAPP_BUSINESS_MESSAGE_ASSET_LINKS_PER_AD_GROUP\x10\xbe\x01\x12%\n BRAND_LIST_CRITERIA_PER_AD_GROUP\x10\xc1\x01\x42\xf0\x01\n\"com.google.ads.googleads.v25.enumsB\x16ResourceLimitTypeProtoP\x01ZCgoogle.golang.org/genproto/googleapis/ads/googleads/v25/enums;enums\xa2\x02\x03GAA\xaa\x02\x1eGoogle.Ads.GoogleAds.V25.Enums\xca\x02\x1eGoogle\\Ads\\GoogleAds\\V25\\Enums\xea\x02\"Google::Ads::GoogleAds::V25::Enumsb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Enums + ResourceLimitTypeEnum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.enums.ResourceLimitTypeEnum").msgclass + ResourceLimitTypeEnum::ResourceLimitType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.enums.ResourceLimitTypeEnum.ResourceLimitType").enummodule + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/enums/response_content_type_pb.rb b/lib/google/ads/google_ads/v25/enums/response_content_type_pb.rb new file mode 100644 index 000000000..e766e2ccb --- /dev/null +++ b/lib/google/ads/google_ads/v25/enums/response_content_type_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/enums/response_content_type.proto + +require 'google/protobuf' + + +descriptor_data = "\n:google/ads/googleads/v25/enums/response_content_type.proto\x12\x1egoogle.ads.googleads.v25.enums\"o\n\x17ResponseContentTypeEnum\"T\n\x13ResponseContentType\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x16\n\x12RESOURCE_NAME_ONLY\x10\x01\x12\x14\n\x10MUTABLE_RESOURCE\x10\x02\x42\xf2\x01\n\"com.google.ads.googleads.v25.enumsB\x18ResponseContentTypeProtoP\x01ZCgoogle.golang.org/genproto/googleapis/ads/googleads/v25/enums;enums\xa2\x02\x03GAA\xaa\x02\x1eGoogle.Ads.GoogleAds.V25.Enums\xca\x02\x1eGoogle\\Ads\\GoogleAds\\V25\\Enums\xea\x02\"Google::Ads::GoogleAds::V25::Enumsb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Enums + ResponseContentTypeEnum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.enums.ResponseContentTypeEnum").msgclass + ResponseContentTypeEnum::ResponseContentType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.enums.ResponseContentTypeEnum.ResponseContentType").enummodule + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/enums/search_engine_results_page_type_pb.rb b/lib/google/ads/google_ads/v25/enums/search_engine_results_page_type_pb.rb new file mode 100644 index 000000000..d948bc16f --- /dev/null +++ b/lib/google/ads/google_ads/v25/enums/search_engine_results_page_type_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/enums/search_engine_results_page_type.proto + +require 'google/protobuf' + + +descriptor_data = "\nDgoogle/ads/googleads/v25/enums/search_engine_results_page_type.proto\x12\x1egoogle.ads.googleads.v25.enums\"\x93\x01\n\x1fSearchEngineResultsPageTypeEnum\"p\n\x1bSearchEngineResultsPageType\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x0b\n\x07UNKNOWN\x10\x01\x12\x0c\n\x08\x41\x44S_ONLY\x10\x02\x12\x10\n\x0cORGANIC_ONLY\x10\x03\x12\x13\n\x0f\x41\x44S_AND_ORGANIC\x10\x04\x42\xfa\x01\n\"com.google.ads.googleads.v25.enumsB SearchEngineResultsPageTypeProtoP\x01ZCgoogle.golang.org/genproto/googleapis/ads/googleads/v25/enums;enums\xa2\x02\x03GAA\xaa\x02\x1eGoogle.Ads.GoogleAds.V25.Enums\xca\x02\x1eGoogle\\Ads\\GoogleAds\\V25\\Enums\xea\x02\"Google::Ads::GoogleAds::V25::Enumsb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Enums + SearchEngineResultsPageTypeEnum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.enums.SearchEngineResultsPageTypeEnum").msgclass + SearchEngineResultsPageTypeEnum::SearchEngineResultsPageType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.enums.SearchEngineResultsPageTypeEnum.SearchEngineResultsPageType").enummodule + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/enums/search_term_match_source_pb.rb b/lib/google/ads/google_ads/v25/enums/search_term_match_source_pb.rb new file mode 100644 index 000000000..6ca132bcd --- /dev/null +++ b/lib/google/ads/google_ads/v25/enums/search_term_match_source_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/enums/search_term_match_source.proto + +require 'google/protobuf' + + +descriptor_data = "\n=google/ads/googleads/v25/enums/search_term_match_source.proto\x12\x1egoogle.ads.googleads.v25.enums\"\xed\x01\n\x19SearchTermMatchSourceEnum\"\xcf\x01\n\x15SearchTermMatchSource\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x0b\n\x07UNKNOWN\x10\x01\x12\x1f\n\x1b\x41\x44VERTISER_PROVIDED_KEYWORD\x10\x02\x12\x16\n\x12\x41I_MAX_KEYWORDLESS\x10\x03\x12\x16\n\x12\x41I_MAX_BROAD_MATCH\x10\x04\x12\x16\n\x12\x44YNAMIC_SEARCH_ADS\x10\x05\x12\x13\n\x0fPERFORMANCE_MAX\x10\x06\x12\x1a\n\x16VERTICAL_ADS_DATA_FEED\x10\x07\x42\xf4\x01\n\"com.google.ads.googleads.v25.enumsB\x1aSearchTermMatchSourceProtoP\x01ZCgoogle.golang.org/genproto/googleapis/ads/googleads/v25/enums;enums\xa2\x02\x03GAA\xaa\x02\x1eGoogle.Ads.GoogleAds.V25.Enums\xca\x02\x1eGoogle\\Ads\\GoogleAds\\V25\\Enums\xea\x02\"Google::Ads::GoogleAds::V25::Enumsb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Enums + SearchTermMatchSourceEnum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.enums.SearchTermMatchSourceEnum").msgclass + SearchTermMatchSourceEnum::SearchTermMatchSource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.enums.SearchTermMatchSourceEnum.SearchTermMatchSource").enummodule + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/enums/search_term_match_type_pb.rb b/lib/google/ads/google_ads/v25/enums/search_term_match_type_pb.rb new file mode 100644 index 000000000..8e0168c9c --- /dev/null +++ b/lib/google/ads/google_ads/v25/enums/search_term_match_type_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/enums/search_term_match_type.proto + +require 'google/protobuf' + + +descriptor_data = "\n;google/ads/googleads/v25/enums/search_term_match_type.proto\x12\x1egoogle.ads.googleads.v25.enums\"\xb3\x01\n\x17SearchTermMatchTypeEnum\"\x97\x01\n\x13SearchTermMatchType\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x0b\n\x07UNKNOWN\x10\x01\x12\t\n\x05\x42ROAD\x10\x02\x12\t\n\x05\x45XACT\x10\x03\x12\n\n\x06PHRASE\x10\x04\x12\x0e\n\nNEAR_EXACT\x10\x05\x12\x0f\n\x0bNEAR_PHRASE\x10\x06\x12\n\n\x06\x41I_MAX\x10\x07\x12\x13\n\x0fPERFORMANCE_MAX\x10\x08\x42\xf2\x01\n\"com.google.ads.googleads.v25.enumsB\x18SearchTermMatchTypeProtoP\x01ZCgoogle.golang.org/genproto/googleapis/ads/googleads/v25/enums;enums\xa2\x02\x03GAA\xaa\x02\x1eGoogle.Ads.GoogleAds.V25.Enums\xca\x02\x1eGoogle\\Ads\\GoogleAds\\V25\\Enums\xea\x02\"Google::Ads::GoogleAds::V25::Enumsb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Enums + SearchTermMatchTypeEnum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.enums.SearchTermMatchTypeEnum").msgclass + SearchTermMatchTypeEnum::SearchTermMatchType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.enums.SearchTermMatchTypeEnum.SearchTermMatchType").enummodule + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/enums/search_term_targeting_status_pb.rb b/lib/google/ads/google_ads/v25/enums/search_term_targeting_status_pb.rb new file mode 100644 index 000000000..685b22dd3 --- /dev/null +++ b/lib/google/ads/google_ads/v25/enums/search_term_targeting_status_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/enums/search_term_targeting_status.proto + +require 'google/protobuf' + + +descriptor_data = "\nAgoogle/ads/googleads/v25/enums/search_term_targeting_status.proto\x12\x1egoogle.ads.googleads.v25.enums\"\x91\x01\n\x1dSearchTermTargetingStatusEnum\"p\n\x19SearchTermTargetingStatus\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x0b\n\x07UNKNOWN\x10\x01\x12\t\n\x05\x41\x44\x44\x45\x44\x10\x02\x12\x0c\n\x08\x45XCLUDED\x10\x03\x12\x12\n\x0e\x41\x44\x44\x45\x44_EXCLUDED\x10\x04\x12\x08\n\x04NONE\x10\x05\x42\xf8\x01\n\"com.google.ads.googleads.v25.enumsB\x1eSearchTermTargetingStatusProtoP\x01ZCgoogle.golang.org/genproto/googleapis/ads/googleads/v25/enums;enums\xa2\x02\x03GAA\xaa\x02\x1eGoogle.Ads.GoogleAds.V25.Enums\xca\x02\x1eGoogle\\Ads\\GoogleAds\\V25\\Enums\xea\x02\"Google::Ads::GoogleAds::V25::Enumsb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Enums + SearchTermTargetingStatusEnum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.enums.SearchTermTargetingStatusEnum").msgclass + SearchTermTargetingStatusEnum::SearchTermTargetingStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.enums.SearchTermTargetingStatusEnum.SearchTermTargetingStatus").enummodule + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/enums/seasonality_event_scope_pb.rb b/lib/google/ads/google_ads/v25/enums/seasonality_event_scope_pb.rb new file mode 100644 index 000000000..62bc9a133 --- /dev/null +++ b/lib/google/ads/google_ads/v25/enums/seasonality_event_scope_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/enums/seasonality_event_scope.proto + +require 'google/protobuf' + + +descriptor_data = "\n\n\x08TimeType\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x0b\n\x07UNKNOWN\x10\x01\x12\x07\n\x03NOW\x10\x02\x12\x0b\n\x07\x46OREVER\x10\x03\x42\xe7\x01\n\"com.google.ads.googleads.v25.enumsB\rTimeTypeProtoP\x01ZCgoogle.golang.org/genproto/googleapis/ads/googleads/v25/enums;enums\xa2\x02\x03GAA\xaa\x02\x1eGoogle.Ads.GoogleAds.V25.Enums\xca\x02\x1eGoogle\\Ads\\GoogleAds\\V25\\Enums\xea\x02\"Google::Ads::GoogleAds::V25::Enumsb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Enums + TimeTypeEnum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.enums.TimeTypeEnum").msgclass + TimeTypeEnum::TimeType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.enums.TimeTypeEnum.TimeType").enummodule + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/enums/tracking_code_page_format_pb.rb b/lib/google/ads/google_ads/v25/enums/tracking_code_page_format_pb.rb new file mode 100644 index 000000000..4dd75aff9 --- /dev/null +++ b/lib/google/ads/google_ads/v25/enums/tracking_code_page_format_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/enums/tracking_code_page_format.proto + +require 'google/protobuf' + + +descriptor_data = "\n>google/ads/googleads/v25/enums/tracking_code_page_format.proto\x12\x1egoogle.ads.googleads.v25.enums\"g\n\x1aTrackingCodePageFormatEnum\"I\n\x16TrackingCodePageFormat\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x0b\n\x07UNKNOWN\x10\x01\x12\x08\n\x04HTML\x10\x02\x12\x07\n\x03\x41MP\x10\x03\x42\xf5\x01\n\"com.google.ads.googleads.v25.enumsB\x1bTrackingCodePageFormatProtoP\x01ZCgoogle.golang.org/genproto/googleapis/ads/googleads/v25/enums;enums\xa2\x02\x03GAA\xaa\x02\x1eGoogle.Ads.GoogleAds.V25.Enums\xca\x02\x1eGoogle\\Ads\\GoogleAds\\V25\\Enums\xea\x02\"Google::Ads::GoogleAds::V25::Enumsb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Enums + TrackingCodePageFormatEnum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.enums.TrackingCodePageFormatEnum").msgclass + TrackingCodePageFormatEnum::TrackingCodePageFormat = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.enums.TrackingCodePageFormatEnum.TrackingCodePageFormat").enummodule + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/enums/tracking_code_type_pb.rb b/lib/google/ads/google_ads/v25/enums/tracking_code_type_pb.rb new file mode 100644 index 000000000..b0e89e240 --- /dev/null +++ b/lib/google/ads/google_ads/v25/enums/tracking_code_type_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/enums/tracking_code_type.proto + +require 'google/protobuf' + + +descriptor_data = "\n7google/ads/googleads/v25/enums/tracking_code_type.proto\x12\x1egoogle.ads.googleads.v25.enums\"\x8f\x01\n\x14TrackingCodeTypeEnum\"w\n\x10TrackingCodeType\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x0b\n\x07UNKNOWN\x10\x01\x12\x0b\n\x07WEBPAGE\x10\x02\x12\x13\n\x0fWEBPAGE_ONCLICK\x10\x03\x12\x11\n\rCLICK_TO_CALL\x10\x04\x12\x10\n\x0cWEBSITE_CALL\x10\x05\x42\xef\x01\n\"com.google.ads.googleads.v25.enumsB\x15TrackingCodeTypeProtoP\x01ZCgoogle.golang.org/genproto/googleapis/ads/googleads/v25/enums;enums\xa2\x02\x03GAA\xaa\x02\x1eGoogle.Ads.GoogleAds.V25.Enums\xca\x02\x1eGoogle\\Ads\\GoogleAds\\V25\\Enums\xea\x02\"Google::Ads::GoogleAds::V25::Enumsb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Enums + TrackingCodeTypeEnum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.enums.TrackingCodeTypeEnum").msgclass + TrackingCodeTypeEnum::TrackingCodeType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.enums.TrackingCodeTypeEnum.TrackingCodeType").enummodule + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/enums/unit_of_measure_pb.rb b/lib/google/ads/google_ads/v25/enums/unit_of_measure_pb.rb new file mode 100644 index 000000000..b65f3930e --- /dev/null +++ b/lib/google/ads/google_ads/v25/enums/unit_of_measure_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/enums/unit_of_measure.proto + +require 'google/protobuf' + + +descriptor_data = "\n4google/ads/googleads/v25/enums/unit_of_measure.proto\x12\x1egoogle.ads.googleads.v25.enums\"\xf4\x01\n\x11UnitOfMeasureEnum\"\xde\x01\n\rUnitOfMeasure\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x0b\n\x07UNKNOWN\x10\x01\x12\n\n\x06\x43LICKS\x10\x02\x12\x0f\n\x0bIMPRESSIONS\x10\x03\x12\x10\n\x0c\x41\x43QUISITIONS\x10\x04\x12\x0f\n\x0bPHONE_CALLS\x10\x05\x12\x0f\n\x0bVIDEO_PLAYS\x10\x06\x12\x08\n\x04\x44\x41YS\x10\x07\x12\x0f\n\x0b\x41UDIO_PLAYS\x10\x08\x12\x0f\n\x0b\x45NGAGEMENTS\x10\t\x12\x0b\n\x07SECONDS\x10\n\x12\t\n\x05LEADS\x10\x0b\x12\x0f\n\x0bGUEST_STAYS\x10\x0c\x12\t\n\x05HOURS\x10\rB\xec\x01\n\"com.google.ads.googleads.v25.enumsB\x12UnitOfMeasureProtoP\x01ZCgoogle.golang.org/genproto/googleapis/ads/googleads/v25/enums;enums\xa2\x02\x03GAA\xaa\x02\x1eGoogle.Ads.GoogleAds.V25.Enums\xca\x02\x1eGoogle\\Ads\\GoogleAds\\V25\\Enums\xea\x02\"Google::Ads::GoogleAds::V25::Enumsb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Enums + UnitOfMeasureEnum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.enums.UnitOfMeasureEnum").msgclass + UnitOfMeasureEnum::UnitOfMeasure = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.enums.UnitOfMeasureEnum.UnitOfMeasure").enummodule + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/enums/user_identifier_source_pb.rb b/lib/google/ads/google_ads/v25/enums/user_identifier_source_pb.rb new file mode 100644 index 000000000..8bbac5d47 --- /dev/null +++ b/lib/google/ads/google_ads/v25/enums/user_identifier_source_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/enums/user_identifier_source.proto + +require 'google/protobuf' + + +descriptor_data = "\n;google/ads/googleads/v25/enums/user_identifier_source.proto\x12\x1egoogle.ads.googleads.v25.enums\"r\n\x18UserIdentifierSourceEnum\"V\n\x14UserIdentifierSource\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x0b\n\x07UNKNOWN\x10\x01\x12\x0f\n\x0b\x46IRST_PARTY\x10\x02\x12\x0f\n\x0bTHIRD_PARTY\x10\x03\x42\xf3\x01\n\"com.google.ads.googleads.v25.enumsB\x19UserIdentifierSourceProtoP\x01ZCgoogle.golang.org/genproto/googleapis/ads/googleads/v25/enums;enums\xa2\x02\x03GAA\xaa\x02\x1eGoogle.Ads.GoogleAds.V25.Enums\xca\x02\x1eGoogle\\Ads\\GoogleAds\\V25\\Enums\xea\x02\"Google::Ads::GoogleAds::V25::Enumsb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Enums + UserIdentifierSourceEnum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.enums.UserIdentifierSourceEnum").msgclass + UserIdentifierSourceEnum::UserIdentifierSource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.enums.UserIdentifierSourceEnum.UserIdentifierSource").enummodule + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/enums/user_interest_taxonomy_type_pb.rb b/lib/google/ads/google_ads/v25/enums/user_interest_taxonomy_type_pb.rb new file mode 100644 index 000000000..52bde97be --- /dev/null +++ b/lib/google/ads/google_ads/v25/enums/user_interest_taxonomy_type_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/enums/user_interest_taxonomy_type.proto + +require 'google/protobuf' + + +descriptor_data = "\n@google/ads/googleads/v25/enums/user_interest_taxonomy_type.proto\x12\x1egoogle.ads.googleads.v25.enums\"\xbf\x01\n\x1cUserInterestTaxonomyTypeEnum\"\x9e\x01\n\x18UserInterestTaxonomyType\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x0b\n\x07UNKNOWN\x10\x01\x12\x0c\n\x08\x41\x46\x46INITY\x10\x02\x12\r\n\tIN_MARKET\x10\x03\x12\x1b\n\x17MOBILE_APP_INSTALL_USER\x10\x04\x12\x10\n\x0cVERTICAL_GEO\x10\x05\x12\x18\n\x14NEW_SMART_PHONE_USER\x10\x06\x42\xf7\x01\n\"com.google.ads.googleads.v25.enumsB\x1dUserInterestTaxonomyTypeProtoP\x01ZCgoogle.golang.org/genproto/googleapis/ads/googleads/v25/enums;enums\xa2\x02\x03GAA\xaa\x02\x1eGoogle.Ads.GoogleAds.V25.Enums\xca\x02\x1eGoogle\\Ads\\GoogleAds\\V25\\Enums\xea\x02\"Google::Ads::GoogleAds::V25::Enumsb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Enums + UserInterestTaxonomyTypeEnum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.enums.UserInterestTaxonomyTypeEnum").msgclass + UserInterestTaxonomyTypeEnum::UserInterestTaxonomyType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.enums.UserInterestTaxonomyTypeEnum.UserInterestTaxonomyType").enummodule + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/enums/user_list_access_status_pb.rb b/lib/google/ads/google_ads/v25/enums/user_list_access_status_pb.rb new file mode 100644 index 000000000..42850f985 --- /dev/null +++ b/lib/google/ads/google_ads/v25/enums/user_list_access_status_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/enums/user_list_access_status.proto + +require 'google/protobuf' + + +descriptor_data = "\n\x12\x18\n\x14MISSING_DESCRIPTION1\x10?\x12\x18\n\x14MISSING_DESCRIPTION2\x10@\x12\x1f\n\x1bMISSING_DESTINATION_URL_TAG\x10\x41\x12 \n\x1cMISSING_LANDING_PAGE_URL_TAG\x10\x42\x12\x15\n\x11MISSING_DIMENSION\x10\x43\x12\x17\n\x13MISSING_DISPLAY_URL\x10\x44\x12\x14\n\x10MISSING_HEADLINE\x10\x45\x12\x12\n\x0eMISSING_HEIGHT\x10\x46\x12\x11\n\rMISSING_IMAGE\x10G\x12-\n)MISSING_MARKETING_IMAGE_OR_PRODUCT_VIDEOS\x10H\x12\x1c\n\x18MISSING_MARKUP_LANGUAGES\x10I\x12\x1a\n\x16MISSING_MOBILE_CARRIER\x10J\x12\x11\n\rMISSING_PHONE\x10K\x12$\n MISSING_REQUIRED_TEMPLATE_FIELDS\x10L\x12 \n\x1cMISSING_TEMPLATE_FIELD_VALUE\x10M\x12\x10\n\x0cMISSING_TEXT\x10N\x12\x17\n\x13MISSING_VISIBLE_URL\x10O\x12\x11\n\rMISSING_WIDTH\x10P\x12\'\n#MULTIPLE_DISTINCT_FEEDS_UNSUPPORTED\x10Q\x12$\n MUST_USE_TEMP_AD_UNION_ID_ON_ADD\x10R\x12\x0c\n\x08TOO_LONG\x10S\x12\r\n\tTOO_SHORT\x10T\x12\"\n\x1eUNION_DIMENSIONS_CANNOT_CHANGE\x10U\x12\x1d\n\x19UNKNOWN_ADDRESS_COMPONENT\x10V\x12\x16\n\x12UNKNOWN_FIELD_NAME\x10W\x12\x17\n\x13UNKNOWN_UNIQUE_NAME\x10X\x12\x1a\n\x16UNSUPPORTED_DIMENSIONS\x10Y\x12\x16\n\x12URL_INVALID_SCHEME\x10Z\x12 \n\x1cURL_INVALID_TOP_LEVEL_DOMAIN\x10[\x12\x11\n\rURL_MALFORMED\x10\\\x12\x0f\n\x0bURL_NO_HOST\x10]\x12\x16\n\x12URL_NOT_EQUIVALENT\x10^\x12\x1a\n\x16URL_HOST_NAME_TOO_LONG\x10_\x12\x11\n\rURL_NO_SCHEME\x10`\x12\x1b\n\x17URL_NO_TOP_LEVEL_DOMAIN\x10\x61\x12\x18\n\x14URL_PATH_NOT_ALLOWED\x10\x62\x12\x18\n\x14URL_PORT_NOT_ALLOWED\x10\x63\x12\x19\n\x15URL_QUERY_NOT_ALLOWED\x10\x64\x12\x34\n0URL_SCHEME_BEFORE_EXPANDED_DYNAMIC_SEARCH_AD_TAG\x10\x66\x12)\n%USER_DOES_NOT_HAVE_ACCESS_TO_TEMPLATE\x10g\x12$\n INCONSISTENT_EXPANDABLE_SETTINGS\x10h\x12\x12\n\x0eINVALID_FORMAT\x10i\x12\x16\n\x12INVALID_FIELD_TEXT\x10j\x12\x17\n\x13\x45LEMENT_NOT_PRESENT\x10k\x12\x0f\n\x0bIMAGE_ERROR\x10l\x12\x16\n\x12VALUE_NOT_IN_RANGE\x10m\x12\x15\n\x11\x46IELD_NOT_PRESENT\x10n\x12\x18\n\x14\x41\x44\x44RESS_NOT_COMPLETE\x10o\x12\x13\n\x0f\x41\x44\x44RESS_INVALID\x10p\x12\x19\n\x15VIDEO_RETRIEVAL_ERROR\x10q\x12\x0f\n\x0b\x41UDIO_ERROR\x10r\x12\x1f\n\x1bINVALID_YOUTUBE_DISPLAY_URL\x10s\x12\x1b\n\x17TOO_MANY_PRODUCT_IMAGES\x10t\x12\x1b\n\x17TOO_MANY_PRODUCT_VIDEOS\x10u\x12.\n*INCOMPATIBLE_AD_TYPE_AND_DEVICE_PREFERENCE\x10v\x12*\n&CALLTRACKING_NOT_SUPPORTED_FOR_COUNTRY\x10w\x12-\n)CARRIER_SPECIFIC_SHORT_NUMBER_NOT_ALLOWED\x10x\x12\x1a\n\x16\x44ISALLOWED_NUMBER_TYPE\x10y\x12*\n&PHONE_NUMBER_NOT_SUPPORTED_FOR_COUNTRY\x10z\x12<\n8PHONE_NUMBER_NOT_SUPPORTED_WITH_CALLTRACKING_FOR_COUNTRY\x10{\x12#\n\x1fPREMIUM_RATE_NUMBER_NOT_ALLOWED\x10|\x12#\n\x1fVANITY_PHONE_NUMBER_NOT_ALLOWED\x10}\x12#\n\x1fINVALID_CALL_CONVERSION_TYPE_ID\x10~\x12=\n9CANNOT_DISABLE_CALL_CONVERSION_AND_SET_CONVERSION_TYPE_ID\x10\x7f\x12#\n\x1e\x43\x41NNOT_SET_PATH2_WITHOUT_PATH1\x10\x80\x01\x12\x33\n.MISSING_DYNAMIC_SEARCH_ADS_SETTING_DOMAIN_NAME\x10\x81\x01\x12\'\n\"INCOMPATIBLE_WITH_RESTRICTION_TYPE\x10\x82\x01\x12\x31\n,CUSTOMER_CONSENT_FOR_CALL_RECORDING_REQUIRED\x10\x83\x01\x12\"\n\x1dMISSING_IMAGE_OR_MEDIA_BUNDLE\x10\x84\x01\x12\x30\n+PRODUCT_TYPE_NOT_SUPPORTED_IN_THIS_CAMPAIGN\x10\x85\x01\x12\x30\n+PLACEHOLDER_CANNOT_HAVE_EMPTY_DEFAULT_VALUE\x10\x86\x01\x12=\n8PLACEHOLDER_COUNTDOWN_FUNCTION_CANNOT_HAVE_DEFAULT_VALUE\x10\x87\x01\x12&\n!PLACEHOLDER_DEFAULT_VALUE_MISSING\x10\x88\x01\x12)\n$UNEXPECTED_PLACEHOLDER_DEFAULT_VALUE\x10\x89\x01\x12\'\n\"AD_CUSTOMIZERS_MAY_NOT_BE_ADJACENT\x10\x8a\x01\x12,\n\'UPDATING_AD_WITH_NO_ENABLED_ASSOCIATION\x10\x8b\x01\x12\x41\nCANNOT_ADD_ADGROUP_OF_TYPE_DSA_TO_CAMPAIGN_WITHOUT_DSA_SETTING\x10\x0e\x12\x37\n3PROMOTED_HOTEL_AD_GROUPS_NOT_AVAILABLE_FOR_CUSTOMER\x10\x0f\x12,\n(INVALID_EXCLUDED_PARENT_ASSET_FIELD_TYPE\x10\x10\x12*\n&INVALID_EXCLUDED_PARENT_ASSET_SET_TYPE\x10\x11\x12)\n%CANNOT_ADD_AD_GROUP_FOR_CAMPAIGN_TYPE\x10\x12\x12\x12\n\x0eINVALID_STATUS\x10\x13\x12,\n(INVALID_STEP_ID_FOR_VIDEO_ADS_SEQUENCING\x10\x14\x12\x32\n.INVALID_AD_GROUP_TYPE_FOR_VIDEO_ADS_SEQUENCING\x10\x15\x12\x15\n\x11\x44UPLICATE_STEP_ID\x10\x16\x12\'\n#INVALID_VERTICAL_ADS_FORMAT_SETTING\x10\x17\x12J\nFVERTICAL_ADS_FORMAT_SETTING_NOT_SUPPORTED_FOR_CAMPAIGNS_WITHOUT_AI_MAX\x10\x18\x12W\nSVERTICAL_ADS_FORMAT_SETTING_NOT_SUPPORTED_FOR_CAMPAIGNS_WITHOUT_ENABLED_TRAVEL_FEED\x10\x19\x42\xf1\x01\n#com.google.ads.googleads.v25.errorsB\x11\x41\x64GroupErrorProtoP\x01ZEgoogle.golang.org/genproto/googleapis/ads/googleads/v25/errors;errors\xa2\x02\x03GAA\xaa\x02\x1fGoogle.Ads.GoogleAds.V25.Errors\xca\x02\x1fGoogle\\Ads\\GoogleAds\\V25\\Errors\xea\x02#Google::Ads::GoogleAds::V25::Errorsb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Errors + AdGroupErrorEnum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.errors.AdGroupErrorEnum").msgclass + AdGroupErrorEnum::AdGroupError = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.errors.AdGroupErrorEnum.AdGroupError").enummodule + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/errors/ad_group_feed_error_pb.rb b/lib/google/ads/google_ads/v25/errors/ad_group_feed_error_pb.rb new file mode 100644 index 000000000..325aa94a8 --- /dev/null +++ b/lib/google/ads/google_ads/v25/errors/ad_group_feed_error_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/errors/ad_group_feed_error.proto + +require 'google/protobuf' + + +descriptor_data = "\n9google/ads/googleads/v25/errors/ad_group_feed_error.proto\x12\x1fgoogle.ads.googleads.v25.errors\"\xdc\x02\n\x14\x41\x64GroupFeedErrorEnum\"\xc3\x02\n\x10\x41\x64GroupFeedError\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x0b\n\x07UNKNOWN\x10\x01\x12,\n(FEED_ALREADY_EXISTS_FOR_PLACEHOLDER_TYPE\x10\x02\x12\"\n\x1e\x43\x41NNOT_CREATE_FOR_REMOVED_FEED\x10\x03\x12\x1f\n\x1b\x41\x44GROUP_FEED_ALREADY_EXISTS\x10\x04\x12*\n&CANNOT_OPERATE_ON_REMOVED_ADGROUP_FEED\x10\x05\x12\x1c\n\x18INVALID_PLACEHOLDER_TYPE\x10\x06\x12,\n(MISSING_FEEDMAPPING_FOR_PLACEHOLDER_TYPE\x10\x07\x12&\n\"NO_EXISTING_LOCATION_CUSTOMER_FEED\x10\x08\x42\xf5\x01\n#com.google.ads.googleads.v25.errorsB\x15\x41\x64GroupFeedErrorProtoP\x01ZEgoogle.golang.org/genproto/googleapis/ads/googleads/v25/errors;errors\xa2\x02\x03GAA\xaa\x02\x1fGoogle.Ads.GoogleAds.V25.Errors\xca\x02\x1fGoogle\\Ads\\GoogleAds\\V25\\Errors\xea\x02#Google::Ads::GoogleAds::V25::Errorsb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Errors + AdGroupFeedErrorEnum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.errors.AdGroupFeedErrorEnum").msgclass + AdGroupFeedErrorEnum::AdGroupFeedError = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.errors.AdGroupFeedErrorEnum.AdGroupFeedError").enummodule + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/errors/ad_parameter_error_pb.rb b/lib/google/ads/google_ads/v25/errors/ad_parameter_error_pb.rb new file mode 100644 index 000000000..6228e8da3 --- /dev/null +++ b/lib/google/ads/google_ads/v25/errors/ad_parameter_error_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/errors/ad_parameter_error.proto + +require 'google/protobuf' + + +descriptor_data = "\n8google/ads/googleads/v25/errors/ad_parameter_error.proto\x12\x1fgoogle.ads.googleads.v25.errors\"\x93\x01\n\x14\x41\x64ParameterErrorEnum\"{\n\x10\x41\x64ParameterError\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x0b\n\x07UNKNOWN\x10\x01\x12&\n\"AD_GROUP_CRITERION_MUST_BE_KEYWORD\x10\x02\x12!\n\x1dINVALID_INSERTION_TEXT_FORMAT\x10\x03\x42\xf5\x01\n#com.google.ads.googleads.v25.errorsB\x15\x41\x64ParameterErrorProtoP\x01ZEgoogle.golang.org/genproto/googleapis/ads/googleads/v25/errors;errors\xa2\x02\x03GAA\xaa\x02\x1fGoogle.Ads.GoogleAds.V25.Errors\xca\x02\x1fGoogle\\Ads\\GoogleAds\\V25\\Errors\xea\x02#Google::Ads::GoogleAds::V25::Errorsb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Errors + AdParameterErrorEnum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.errors.AdParameterErrorEnum").msgclass + AdParameterErrorEnum::AdParameterError = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.errors.AdParameterErrorEnum.AdParameterError").enummodule + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/errors/ad_sharing_error_pb.rb b/lib/google/ads/google_ads/v25/errors/ad_sharing_error_pb.rb new file mode 100644 index 000000000..31e7f0c48 --- /dev/null +++ b/lib/google/ads/google_ads/v25/errors/ad_sharing_error_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/errors/ad_sharing_error.proto + +require 'google/protobuf' + + +descriptor_data = "\n6google/ads/googleads/v25/errors/ad_sharing_error.proto\x12\x1fgoogle.ads.googleads.v25.errors\"\xa9\x01\n\x12\x41\x64SharingErrorEnum\"\x92\x01\n\x0e\x41\x64SharingError\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x0b\n\x07UNKNOWN\x10\x01\x12 \n\x1c\x41\x44_GROUP_ALREADY_CONTAINS_AD\x10\x02\x12\"\n\x1eINCOMPATIBLE_AD_UNDER_AD_GROUP\x10\x03\x12\x1c\n\x18\x43\x41NNOT_SHARE_INACTIVE_AD\x10\x04\x42\xf3\x01\n#com.google.ads.googleads.v25.errorsB\x13\x41\x64SharingErrorProtoP\x01ZEgoogle.golang.org/genproto/googleapis/ads/googleads/v25/errors;errors\xa2\x02\x03GAA\xaa\x02\x1fGoogle.Ads.GoogleAds.V25.Errors\xca\x02\x1fGoogle\\Ads\\GoogleAds\\V25\\Errors\xea\x02#Google::Ads::GoogleAds::V25::Errorsb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Errors + AdSharingErrorEnum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.errors.AdSharingErrorEnum").msgclass + AdSharingErrorEnum::AdSharingError = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.errors.AdSharingErrorEnum.AdSharingError").enummodule + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/errors/adx_error_pb.rb b/lib/google/ads/google_ads/v25/errors/adx_error_pb.rb new file mode 100644 index 000000000..05c4602bb --- /dev/null +++ b/lib/google/ads/google_ads/v25/errors/adx_error_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/errors/adx_error.proto + +require 'google/protobuf' + + +descriptor_data = "\n/google/ads/googleads/v25/errors/adx_error.proto\x12\x1fgoogle.ads.googleads.v25.errors\"Q\n\x0c\x41\x64xErrorEnum\"A\n\x08\x41\x64xError\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x0b\n\x07UNKNOWN\x10\x01\x12\x17\n\x13UNSUPPORTED_FEATURE\x10\x02\x42\xed\x01\n#com.google.ads.googleads.v25.errorsB\rAdxErrorProtoP\x01ZEgoogle.golang.org/genproto/googleapis/ads/googleads/v25/errors;errors\xa2\x02\x03GAA\xaa\x02\x1fGoogle.Ads.GoogleAds.V25.Errors\xca\x02\x1fGoogle\\Ads\\GoogleAds\\V25\\Errors\xea\x02#Google::Ads::GoogleAds::V25::Errorsb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Errors + AdxErrorEnum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.errors.AdxErrorEnum").msgclass + AdxErrorEnum::AdxError = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.errors.AdxErrorEnum.AdxError").enummodule + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/errors/asset_error_pb.rb b/lib/google/ads/google_ads/v25/errors/asset_error_pb.rb new file mode 100644 index 000000000..e44d1a1a9 --- /dev/null +++ b/lib/google/ads/google_ads/v25/errors/asset_error_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/errors/asset_error.proto + +require 'google/protobuf' + + +descriptor_data = "\n1google/ads/googleads/v25/errors/asset_error.proto\x12\x1fgoogle.ads.googleads.v25.errors\"\xbe\x0e\n\x0e\x41ssetErrorEnum\"\xab\x0e\n\nAssetError\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x0b\n\x07UNKNOWN\x10\x01\x12,\n(CUSTOMER_NOT_ON_ALLOWLIST_FOR_ASSET_TYPE\x10\r\x12\x13\n\x0f\x44UPLICATE_ASSET\x10\x03\x12\x18\n\x14\x44UPLICATE_ASSET_NAME\x10\x04\x12\x19\n\x15\x41SSET_DATA_IS_MISSING\x10\x05\x12\x1c\n\x18\x43\x41NNOT_MODIFY_ASSET_NAME\x10\x06\x12&\n\"FIELD_INCOMPATIBLE_WITH_ASSET_TYPE\x10\x07\x12\x1f\n\x1bINVALID_CALL_TO_ACTION_TEXT\x10\x08\x12(\n$LEAD_FORM_INVALID_FIELDS_COMBINATION\x10\t\x12\x1f\n\x1bLEAD_FORM_MISSING_AGREEMENT\x10\n\x12\x18\n\x14INVALID_ASSET_STATUS\x10\x0b\x12+\n\'FIELD_CANNOT_BE_MODIFIED_FOR_ASSET_TYPE\x10\x0c\x12\x1c\n\x18SCHEDULES_CANNOT_OVERLAP\x10\x0e\x12\x39\n5PROMOTION_CANNOT_SET_PERCENT_OFF_AND_MONEY_AMOUNT_OFF\x10\x0f\x12>\n:PROMOTION_CANNOT_SET_PROMOTION_CODE_AND_ORDERS_OVER_AMOUNT\x10\x10\x12%\n!TOO_MANY_DECIMAL_PLACES_SPECIFIED\x10\x11\x12/\n+DUPLICATE_ASSETS_WITH_DIFFERENT_FIELD_VALUE\x10\x12\x12\x32\n.CALL_CARRIER_SPECIFIC_SHORT_NUMBER_NOT_ALLOWED\x10\x13\x12\x35\n1CALL_CUSTOMER_CONSENT_FOR_CALL_RECORDING_REQUIRED\x10\x14\x12\x1f\n\x1b\x43\x41LL_DISALLOWED_NUMBER_TYPE\x10\x15\x12\"\n\x1e\x43\x41LL_INVALID_CONVERSION_ACTION\x10\x16\x12\x1d\n\x19\x43\x41LL_INVALID_COUNTRY_CODE\x10\x17\x12-\n)CALL_INVALID_DOMESTIC_PHONE_NUMBER_FORMAT\x10\x18\x12\x1d\n\x19\x43\x41LL_INVALID_PHONE_NUMBER\x10\x19\x12/\n+CALL_PHONE_NUMBER_NOT_SUPPORTED_FOR_COUNTRY\x10\x1a\x12(\n$CALL_PREMIUM_RATE_NUMBER_NOT_ALLOWED\x10\x1b\x12(\n$CALL_VANITY_PHONE_NUMBER_NOT_ALLOWED\x10\x1c\x12$\n PRICE_HEADER_SAME_AS_DESCRIPTION\x10\x1d\x12\x1d\n\x19MOBILE_APP_INVALID_APP_ID\x10\x1e\x12\x35\n1MOBILE_APP_INVALID_FINAL_URL_FOR_APP_DOWNLOAD_URL\x10\x1f\x12 \n\x1cNAME_REQUIRED_FOR_ASSET_TYPE\x10 \x12\x34\n0LEAD_FORM_LEGACY_QUALIFYING_QUESTIONS_DISALLOWED\x10!\x12 \n\x1cNAME_CONFLICT_FOR_ASSET_TYPE\x10\"\x12\x1e\n\x1a\x43\x41NNOT_MODIFY_ASSET_SOURCE\x10#\x12-\n)CANNOT_MODIFY_AUTOMATICALLY_CREATED_ASSET\x10$\x12-\n)LEAD_FORM_LOCATION_ANSWER_TYPE_DISALLOWED\x10%\x12 \n\x1cPAGE_FEED_INVALID_LABEL_TEXT\x10&\x12\x39\n5CUSTOMER_NOT_ON_ALLOWLIST_FOR_WHATSAPP_MESSAGE_ASSETS\x10\'\x12\x36\n2CUSTOMER_NOT_ON_ALLOWLIST_FOR_APP_DEEP_LINK_ASSETS\x10(\x12*\n&PROMOTION_BARCODE_CANNOT_CONTAIN_LINKS\x10)\x12$\n PROMOTION_BARCODE_INVALID_FORMAT\x10*\x12\x1c\n\x18UNSUPPORTED_BARCODE_TYPE\x10+\x12*\n&PROMOTION_QR_CODE_CANNOT_CONTAIN_LINKS\x10,\x12$\n PROMOTION_QR_CODE_INVALID_FORMAT\x10-\x12\x30\n,CUSTOMER_NOT_ON_ALLOWLIST_FOR_MESSAGE_ASSETS\x10.B\xef\x01\n#com.google.ads.googleads.v25.errorsB\x0f\x41ssetErrorProtoP\x01ZEgoogle.golang.org/genproto/googleapis/ads/googleads/v25/errors;errors\xa2\x02\x03GAA\xaa\x02\x1fGoogle.Ads.GoogleAds.V25.Errors\xca\x02\x1fGoogle\\Ads\\GoogleAds\\V25\\Errors\xea\x02#Google::Ads::GoogleAds::V25::Errorsb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Errors + AssetErrorEnum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.errors.AssetErrorEnum").msgclass + AssetErrorEnum::AssetError = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.errors.AssetErrorEnum.AssetError").enummodule + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/errors/asset_generation_error_pb.rb b/lib/google/ads/google_ads/v25/errors/asset_generation_error_pb.rb new file mode 100644 index 000000000..44d344d5a --- /dev/null +++ b/lib/google/ads/google_ads/v25/errors/asset_generation_error_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/errors/asset_generation_error.proto + +require 'google/protobuf' + + +descriptor_data = "\n\n:LOCATION_SYNC_ASSET_SET_DOES_NOT_SUPPORT_RELATIONSHIP_TYPE\x10\x07\x12\x34\n0NOT_UNIQUE_ENABLED_LOCATION_SYNC_TYPED_ASSET_SET\x10\x08\x12\x15\n\x11INVALID_PLACE_IDS\x10\t\x12\x16\n\x12OAUTH_INFO_INVALID\x10\x0b\x12\x16\n\x12OAUTH_INFO_MISSING\x10\x0c\x12+\n\'CANNOT_DELETE_AS_ENABLED_LINKAGES_EXIST\x10\nB\xf2\x01\n#com.google.ads.googleads.v25.errorsB\x12\x41ssetSetErrorProtoP\x01ZEgoogle.golang.org/genproto/googleapis/ads/googleads/v25/errors;errors\xa2\x02\x03GAA\xaa\x02\x1fGoogle.Ads.GoogleAds.V25.Errors\xca\x02\x1fGoogle\\Ads\\GoogleAds\\V25\\Errors\xea\x02#Google::Ads::GoogleAds::V25::Errorsb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Errors + AssetSetErrorEnum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.errors.AssetSetErrorEnum").msgclass + AssetSetErrorEnum::AssetSetError = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.errors.AssetSetErrorEnum.AssetSetError").enummodule + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/errors/asset_set_link_error_pb.rb b/lib/google/ads/google_ads/v25/errors/asset_set_link_error_pb.rb new file mode 100644 index 000000000..64e593dd6 --- /dev/null +++ b/lib/google/ads/google_ads/v25/errors/asset_set_link_error_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/errors/asset_set_link_error.proto + +require 'google/protobuf' + + +descriptor_data = "\n:google/ads/googleads/v25/errors/asset_set_link_error.proto\x12\x1fgoogle.ads.googleads.v25.errors\"\x87\x02\n\x15\x41ssetSetLinkErrorEnum\"\xed\x01\n\x11\x41ssetSetLinkError\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x0b\n\x07UNKNOWN\x10\x01\x12)\n%INCOMPATIBLE_ADVERTISING_CHANNEL_TYPE\x10\x02\x12\x17\n\x13\x44UPLICATE_FEED_LINK\x10\x03\x12\x32\n.INCOMPATIBLE_ASSET_SET_TYPE_WITH_CAMPAIGN_TYPE\x10\x04\x12\x1c\n\x18\x44UPLICATE_ASSET_SET_LINK\x10\x05\x12$\n ASSET_SET_LINK_CANNOT_BE_REMOVED\x10\x06\x42\xf6\x01\n#com.google.ads.googleads.v25.errorsB\x16\x41ssetSetLinkErrorProtoP\x01ZEgoogle.golang.org/genproto/googleapis/ads/googleads/v25/errors;errors\xa2\x02\x03GAA\xaa\x02\x1fGoogle.Ads.GoogleAds.V25.Errors\xca\x02\x1fGoogle\\Ads\\GoogleAds\\V25\\Errors\xea\x02#Google::Ads::GoogleAds::V25::Errorsb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Errors + AssetSetLinkErrorEnum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.errors.AssetSetLinkErrorEnum").msgclass + AssetSetLinkErrorEnum::AssetSetLinkError = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.errors.AssetSetLinkErrorEnum.AssetSetLinkError").enummodule + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/errors/audience_error_pb.rb b/lib/google/ads/google_ads/v25/errors/audience_error_pb.rb new file mode 100644 index 000000000..7466b6f87 --- /dev/null +++ b/lib/google/ads/google_ads/v25/errors/audience_error_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/errors/audience_error.proto + +require 'google/protobuf' + + +descriptor_data = "\n4google/ads/googleads/v25/errors/audience_error.proto\x12\x1fgoogle.ads.googleads.v25.errors\"\xf7\x02\n\x11\x41udienceErrorEnum\"\xe1\x02\n\rAudienceError\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x0b\n\x07UNKNOWN\x10\x01\x12\x17\n\x13NAME_ALREADY_IN_USE\x10\x02\x12\x15\n\x11\x44IMENSION_INVALID\x10\x03\x12\x1e\n\x1a\x41UDIENCE_SEGMENT_NOT_FOUND\x10\x04\x12\'\n#AUDIENCE_SEGMENT_TYPE_NOT_SUPPORTED\x10\x05\x12\x1e\n\x1a\x44UPLICATE_AUDIENCE_SEGMENT\x10\x06\x12\x15\n\x11TOO_MANY_SEGMENTS\x10\x07\x12$\n TOO_MANY_DIMENSIONS_OF_SAME_TYPE\x10\x08\x12\n\n\x06IN_USE\x10\t\x12\x1a\n\x16MISSING_ASSET_GROUP_ID\x10\n\x12\x34\n0CANNOT_CHANGE_FROM_CUSTOMER_TO_ASSET_GROUP_SCOPE\x10\x0b\x42\xf2\x01\n#com.google.ads.googleads.v25.errorsB\x12\x41udienceErrorProtoP\x01ZEgoogle.golang.org/genproto/googleapis/ads/googleads/v25/errors;errors\xa2\x02\x03GAA\xaa\x02\x1fGoogle.Ads.GoogleAds.V25.Errors\xca\x02\x1fGoogle\\Ads\\GoogleAds\\V25\\Errors\xea\x02#Google::Ads::GoogleAds::V25::Errorsb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Errors + AudienceErrorEnum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.errors.AudienceErrorEnum").msgclass + AudienceErrorEnum::AudienceError = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.errors.AudienceErrorEnum.AudienceError").enummodule + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/errors/audience_insights_error_pb.rb b/lib/google/ads/google_ads/v25/errors/audience_insights_error_pb.rb new file mode 100644 index 000000000..994de7371 --- /dev/null +++ b/lib/google/ads/google_ads/v25/errors/audience_insights_error_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/errors/audience_insights_error.proto + +require 'google/protobuf' + + +descriptor_data = "\n=google/ads/googleads/v25/errors/audience_insights_error.proto\x12\x1fgoogle.ads.googleads.v25.errors\"\x8f\x01\n\x19\x41udienceInsightsErrorEnum\"r\n\x15\x41udienceInsightsError\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x0b\n\x07UNKNOWN\x10\x01\x12;\n7DIMENSION_INCOMPATIBLE_WITH_TOPIC_AUDIENCE_COMBINATIONS\x10\x02\x42\xfa\x01\n#com.google.ads.googleads.v25.errorsB\x1a\x41udienceInsightsErrorProtoP\x01ZEgoogle.golang.org/genproto/googleapis/ads/googleads/v25/errors;errors\xa2\x02\x03GAA\xaa\x02\x1fGoogle.Ads.GoogleAds.V25.Errors\xca\x02\x1fGoogle\\Ads\\GoogleAds\\V25\\Errors\xea\x02#Google::Ads::GoogleAds::V25::Errorsb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Errors + AudienceInsightsErrorEnum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.errors.AudienceInsightsErrorEnum").msgclass + AudienceInsightsErrorEnum::AudienceInsightsError = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.errors.AudienceInsightsErrorEnum.AudienceInsightsError").enummodule + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/errors/authentication_error_pb.rb b/lib/google/ads/google_ads/v25/errors/authentication_error_pb.rb new file mode 100644 index 000000000..a045d9f2e --- /dev/null +++ b/lib/google/ads/google_ads/v25/errors/authentication_error_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/errors/authentication_error.proto + +require 'google/protobuf' + + +descriptor_data = "\n:google/ads/googleads/v25/errors/authentication_error.proto\x12\x1fgoogle.ads.googleads.v25.errors\"\x96\x06\n\x17\x41uthenticationErrorEnum\"\xfa\x05\n\x13\x41uthenticationError\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x0b\n\x07UNKNOWN\x10\x01\x12\x18\n\x14\x41UTHENTICATION_ERROR\x10\x02\x12\x1e\n\x1a\x43LIENT_CUSTOMER_ID_INVALID\x10\x05\x12\x16\n\x12\x43USTOMER_NOT_FOUND\x10\x08\x12\x1a\n\x16GOOGLE_ACCOUNT_DELETED\x10\t\x12!\n\x1dGOOGLE_ACCOUNT_COOKIE_INVALID\x10\n\x12(\n$GOOGLE_ACCOUNT_AUTHENTICATION_FAILED\x10\x19\x12-\n)GOOGLE_ACCOUNT_USER_AND_ADS_USER_MISMATCH\x10\x0c\x12\x19\n\x15LOGIN_COOKIE_REQUIRED\x10\r\x12\x10\n\x0cNOT_ADS_USER\x10\x0e\x12\x17\n\x13OAUTH_TOKEN_INVALID\x10\x0f\x12\x17\n\x13OAUTH_TOKEN_EXPIRED\x10\x10\x12\x18\n\x14OAUTH_TOKEN_DISABLED\x10\x11\x12\x17\n\x13OAUTH_TOKEN_REVOKED\x10\x12\x12\x1e\n\x1aOAUTH_TOKEN_HEADER_INVALID\x10\x13\x12\x18\n\x14LOGIN_COOKIE_INVALID\x10\x14\x12\x19\n\x15INVALID_EMAIL_ADDRESS\x10\x15\x12\x13\n\x0fUSER_ID_INVALID\x10\x16\x12&\n\"TWO_STEP_VERIFICATION_NOT_ENROLLED\x10\x17\x12$\n ADVANCED_PROTECTION_NOT_ENROLLED\x10\x18\x12\x1f\n\x1bORGANIZATION_NOT_RECOGNIZED\x10\x1a\x12\x1d\n\x19ORGANIZATION_NOT_APPROVED\x10\x1b\x12\x34\n0ORGANIZATION_NOT_ASSOCIATED_WITH_DEVELOPER_TOKEN\x10\x1c\x12\x1b\n\x17\x44\x45VELOPER_TOKEN_INVALID\x10\x1d\x42\xf8\x01\n#com.google.ads.googleads.v25.errorsB\x18\x41uthenticationErrorProtoP\x01ZEgoogle.golang.org/genproto/googleapis/ads/googleads/v25/errors;errors\xa2\x02\x03GAA\xaa\x02\x1fGoogle.Ads.GoogleAds.V25.Errors\xca\x02\x1fGoogle\\Ads\\GoogleAds\\V25\\Errors\xea\x02#Google::Ads::GoogleAds::V25::Errorsb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Errors + AuthenticationErrorEnum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.errors.AuthenticationErrorEnum").msgclass + AuthenticationErrorEnum::AuthenticationError = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.errors.AuthenticationErrorEnum.AuthenticationError").enummodule + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/errors/authorization_error_pb.rb b/lib/google/ads/google_ads/v25/errors/authorization_error_pb.rb new file mode 100644 index 000000000..ae6413ce6 --- /dev/null +++ b/lib/google/ads/google_ads/v25/errors/authorization_error_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/errors/authorization_error.proto + +require 'google/protobuf' + + +descriptor_data = "\n9google/ads/googleads/v25/errors/authorization_error.proto\x12\x1fgoogle.ads.googleads.v25.errors\"\xce\x04\n\x16\x41uthorizationErrorEnum\"\xb3\x04\n\x12\x41uthorizationError\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x0b\n\x07UNKNOWN\x10\x01\x12\x1a\n\x16USER_PERMISSION_DENIED\x10\x02\x12$\n DEVELOPER_TOKEN_NOT_ON_ALLOWLIST\x10\r\x12\x1e\n\x1a\x44\x45VELOPER_TOKEN_PROHIBITED\x10\x04\x12\x14\n\x10PROJECT_DISABLED\x10\x05\x12\x17\n\x13\x41UTHORIZATION_ERROR\x10\x06\x12\x18\n\x14\x41\x43TION_NOT_PERMITTED\x10\x07\x12\x15\n\x11INCOMPLETE_SIGNUP\x10\x08\x12\x18\n\x14\x43USTOMER_NOT_ENABLED\x10\x18\x12\x0f\n\x0bMISSING_TOS\x10\t\x12 \n\x1c\x44\x45VELOPER_TOKEN_NOT_APPROVED\x10\n\x12=\n9INVALID_LOGIN_CUSTOMER_ID_SERVING_CUSTOMER_ID_COMBINATION\x10\x0b\x12\x19\n\x15SERVICE_ACCESS_DENIED\x10\x0c\x12\"\n\x1e\x41\x43\x43\x45SS_DENIED_FOR_ACCOUNT_TYPE\x10\x19\x12\x18\n\x14METRIC_ACCESS_DENIED\x10\x1a\x12(\n$CLOUD_PROJECT_NOT_UNDER_ORGANIZATION\x10\x1b\x12.\n*ACTION_NOT_PERMITTED_FOR_SUSPENDED_ACCOUNT\x10\x1c\x42\xf7\x01\n#com.google.ads.googleads.v25.errorsB\x17\x41uthorizationErrorProtoP\x01ZEgoogle.golang.org/genproto/googleapis/ads/googleads/v25/errors;errors\xa2\x02\x03GAA\xaa\x02\x1fGoogle.Ads.GoogleAds.V25.Errors\xca\x02\x1fGoogle\\Ads\\GoogleAds\\V25\\Errors\xea\x02#Google::Ads::GoogleAds::V25::Errorsb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Errors + AuthorizationErrorEnum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.errors.AuthorizationErrorEnum").msgclass + AuthorizationErrorEnum::AuthorizationError = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.errors.AuthorizationErrorEnum.AuthorizationError").enummodule + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/errors/automatically_created_asset_removal_error_pb.rb b/lib/google/ads/google_ads/v25/errors/automatically_created_asset_removal_error_pb.rb new file mode 100644 index 000000000..d93bf7048 --- /dev/null +++ b/lib/google/ads/google_ads/v25/errors/automatically_created_asset_removal_error_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/errors/automatically_created_asset_removal_error.proto + +require 'google/protobuf' + + +descriptor_data = "\nOgoogle/ads/googleads/v25/errors/automatically_created_asset_removal_error.proto\x12\x1fgoogle.ads.googleads.v25.errors\"\x86\x02\n)AutomaticallyCreatedAssetRemovalErrorEnum\"\xd8\x01\n%AutomaticallyCreatedAssetRemovalError\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x0b\n\x07UNKNOWN\x10\x01\x12\x15\n\x11\x41\x44_DOES_NOT_EXIST\x10\x02\x12\x13\n\x0fINVALID_AD_TYPE\x10\x03\x12\x18\n\x14\x41SSET_DOES_NOT_EXIST\x10\x04\x12#\n\x1f\x41SSET_FIELD_TYPE_DOES_NOT_MATCH\x10\x05\x12&\n\"NOT_AN_AUTOMATICALLY_CREATED_ASSET\x10\x06\x42\x8a\x02\n#com.google.ads.googleads.v25.errorsB*AutomaticallyCreatedAssetRemovalErrorProtoP\x01ZEgoogle.golang.org/genproto/googleapis/ads/googleads/v25/errors;errors\xa2\x02\x03GAA\xaa\x02\x1fGoogle.Ads.GoogleAds.V25.Errors\xca\x02\x1fGoogle\\Ads\\GoogleAds\\V25\\Errors\xea\x02#Google::Ads::GoogleAds::V25::Errorsb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Errors + AutomaticallyCreatedAssetRemovalErrorEnum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.errors.AutomaticallyCreatedAssetRemovalErrorEnum").msgclass + AutomaticallyCreatedAssetRemovalErrorEnum::AutomaticallyCreatedAssetRemovalError = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.errors.AutomaticallyCreatedAssetRemovalErrorEnum.AutomaticallyCreatedAssetRemovalError").enummodule + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/errors/batch_job_error_pb.rb b/lib/google/ads/google_ads/v25/errors/batch_job_error_pb.rb new file mode 100644 index 000000000..879539a3a --- /dev/null +++ b/lib/google/ads/google_ads/v25/errors/batch_job_error_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/errors/batch_job_error.proto + +require 'google/protobuf' + + +descriptor_data = "\n5google/ads/googleads/v25/errors/batch_job_error.proto\x12\x1fgoogle.ads.googleads.v25.errors\"\xce\x03\n\x11\x42\x61tchJobErrorEnum\"\xb8\x03\n\rBatchJobError\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x0b\n\x07UNKNOWN\x10\x01\x12.\n*CANNOT_MODIFY_JOB_AFTER_JOB_STARTS_RUNNING\x10\x02\x12\x14\n\x10\x45MPTY_OPERATIONS\x10\x03\x12\x1a\n\x16INVALID_SEQUENCE_TOKEN\x10\x04\x12\x15\n\x11RESULTS_NOT_READY\x10\x05\x12\x15\n\x11INVALID_PAGE_SIZE\x10\x06\x12\x1f\n\x1b\x43\x41N_ONLY_REMOVE_PENDING_JOB\x10\x07\x12\x17\n\x13\x43\x41NNOT_LIST_RESULTS\x10\x08\x12\x39\n5ASSET_GROUP_AND_ASSET_GROUP_ASSET_TRANSACTION_FAILURE\x10\t\x12\x38\n4ASSET_GROUP_LISTING_GROUP_FILTER_TRANSACTION_FAILURE\x10\n\x12\x15\n\x11REQUEST_TOO_LARGE\x10\x0b\x12\x33\n/CAMPAIGN_AND_CAMPAIGN_ASSET_TRANSACTION_FAILURE\x10\x0c\x42\xf2\x01\n#com.google.ads.googleads.v25.errorsB\x12\x42\x61tchJobErrorProtoP\x01ZEgoogle.golang.org/genproto/googleapis/ads/googleads/v25/errors;errors\xa2\x02\x03GAA\xaa\x02\x1fGoogle.Ads.GoogleAds.V25.Errors\xca\x02\x1fGoogle\\Ads\\GoogleAds\\V25\\Errors\xea\x02#Google::Ads::GoogleAds::V25::Errorsb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Errors + BatchJobErrorEnum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.errors.BatchJobErrorEnum").msgclass + BatchJobErrorEnum::BatchJobError = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.errors.BatchJobErrorEnum.BatchJobError").enummodule + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/errors/benchmarks_error_pb.rb b/lib/google/ads/google_ads/v25/errors/benchmarks_error_pb.rb new file mode 100644 index 000000000..972ff7a85 --- /dev/null +++ b/lib/google/ads/google_ads/v25/errors/benchmarks_error_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/errors/benchmarks_error.proto + +require 'google/protobuf' + + +descriptor_data = "\n6google/ads/googleads/v25/errors/benchmarks_error.proto\x12\x1fgoogle.ads.googleads.v25.errors\"i\n\x13\x42\x65nchmarksErrorEnum\"R\n\x0f\x42\x65nchmarksError\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x0b\n\x07UNKNOWN\x10\x01\x12!\n\x1dMAX_QUERY_COMPLEXITY_EXCEEDED\x10\x02\x42\xf4\x01\n#com.google.ads.googleads.v25.errorsB\x14\x42\x65nchmarksErrorProtoP\x01ZEgoogle.golang.org/genproto/googleapis/ads/googleads/v25/errors;errors\xa2\x02\x03GAA\xaa\x02\x1fGoogle.Ads.GoogleAds.V25.Errors\xca\x02\x1fGoogle\\Ads\\GoogleAds\\V25\\Errors\xea\x02#Google::Ads::GoogleAds::V25::Errorsb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Errors + BenchmarksErrorEnum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.errors.BenchmarksErrorEnum").msgclass + BenchmarksErrorEnum::BenchmarksError = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.errors.BenchmarksErrorEnum.BenchmarksError").enummodule + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/errors/bidding_error_pb.rb b/lib/google/ads/google_ads/v25/errors/bidding_error_pb.rb new file mode 100644 index 000000000..632d7c0cd --- /dev/null +++ b/lib/google/ads/google_ads/v25/errors/bidding_error_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/errors/bidding_error.proto + +require 'google/protobuf' + + +descriptor_data = "\n3google/ads/googleads/v25/errors/bidding_error.proto\x12\x1fgoogle.ads.googleads.v25.errors\"\x8d\n\n\x10\x42iddingErrorEnum\"\xf8\t\n\x0c\x42iddingError\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x0b\n\x07UNKNOWN\x10\x01\x12+\n\'BIDDING_STRATEGY_TRANSITION_NOT_ALLOWED\x10\x02\x12.\n*CANNOT_ATTACH_BIDDING_STRATEGY_TO_CAMPAIGN\x10\x07\x12+\n\'INVALID_ANONYMOUS_BIDDING_STRATEGY_TYPE\x10\n\x12!\n\x1dINVALID_BIDDING_STRATEGY_TYPE\x10\x0e\x12\x0f\n\x0bINVALID_BID\x10\x11\x12\x33\n/BIDDING_STRATEGY_NOT_AVAILABLE_FOR_ACCOUNT_TYPE\x10\x12\x12\x30\n,CANNOT_CREATE_CAMPAIGN_WITH_BIDDING_STRATEGY\x10\x15\x12O\nKCANNOT_TARGET_CONTENT_NETWORK_ONLY_WITH_CAMPAIGN_LEVEL_POP_BIDDING_STRATEGY\x10\x17\x12\x33\n/BIDDING_STRATEGY_NOT_SUPPORTED_WITH_AD_SCHEDULE\x10\x18\x12\x31\n-PAY_PER_CONVERSION_NOT_AVAILABLE_FOR_CUSTOMER\x10\x19\x12\x32\n.PAY_PER_CONVERSION_NOT_ALLOWED_WITH_TARGET_CPA\x10\x1a\x12:\n6BIDDING_STRATEGY_NOT_ALLOWED_FOR_SEARCH_ONLY_CAMPAIGNS\x10\x1b\x12;\n7BIDDING_STRATEGY_NOT_SUPPORTED_IN_DRAFTS_OR_EXPERIMENTS\x10\x1c\x12I\nEBIDDING_STRATEGY_TYPE_DOES_NOT_SUPPORT_PRODUCT_TYPE_ADGROUP_CRITERION\x10\x1d\x12\x11\n\rBID_TOO_SMALL\x10\x1e\x12\x0f\n\x0b\x42ID_TOO_BIG\x10\x1f\x12\"\n\x1e\x42ID_TOO_MANY_FRACTIONAL_DIGITS\x10 \x12\x17\n\x13INVALID_DOMAIN_NAME\x10!\x12$\n NOT_COMPATIBLE_WITH_PAYMENT_MODE\x10\"\x12\x39\n5BIDDING_STRATEGY_TYPE_INCOMPATIBLE_WITH_SHARED_BUDGET\x10%\x12/\n+BIDDING_STRATEGY_AND_BUDGET_MUST_BE_ALIGNED\x10&\x12O\nKBIDDING_STRATEGY_AND_BUDGET_MUST_BE_ATTACHED_TO_THE_SAME_CAMPAIGNS_TO_ALIGN\x10\'\x12\x38\n4BIDDING_STRATEGY_AND_BUDGET_MUST_BE_REMOVED_TOGETHER\x10(\x12<\n8CPC_BID_FLOOR_MICROS_GREATER_THAN_CPC_BID_CEILING_MICROS\x10)\x12\x38\n4TARGET_ROAS_TOLERANCE_PERCENT_MILLIS_MUST_BE_INTEGER\x10*B\xf1\x01\n#com.google.ads.googleads.v25.errorsB\x11\x42iddingErrorProtoP\x01ZEgoogle.golang.org/genproto/googleapis/ads/googleads/v25/errors;errors\xa2\x02\x03GAA\xaa\x02\x1fGoogle.Ads.GoogleAds.V25.Errors\xca\x02\x1fGoogle\\Ads\\GoogleAds\\V25\\Errors\xea\x02#Google::Ads::GoogleAds::V25::Errorsb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Errors + BiddingErrorEnum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.errors.BiddingErrorEnum").msgclass + BiddingErrorEnum::BiddingError = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.errors.BiddingErrorEnum.BiddingError").enummodule + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/errors/bidding_strategy_error_pb.rb b/lib/google/ads/google_ads/v25/errors/bidding_strategy_error_pb.rb new file mode 100644 index 000000000..baa85a590 --- /dev/null +++ b/lib/google/ads/google_ads/v25/errors/bidding_strategy_error_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/errors/bidding_strategy_error.proto + +require 'google/protobuf' + + +descriptor_data = "\nCANNOT_REMOVE_ALL_LOCATIONS_DUE_TO_TOO_MANY_COUNTRY_EXCLUSIONS\x10\x1b\x12\x1b\n\x17INVALID_VIDEO_LINEUP_ID\x10\x1c\x12\x41\n=CANNOT_REMOVE_ALL_LOCATIONS_FROM_LOCAL_SERVICES_PMAX_CAMPAIGN\x10\x1d\x42\xfb\x01\n#com.google.ads.googleads.v25.errorsB\x1b\x43\x61mpaignCriterionErrorProtoP\x01ZEgoogle.golang.org/genproto/googleapis/ads/googleads/v25/errors;errors\xa2\x02\x03GAA\xaa\x02\x1fGoogle.Ads.GoogleAds.V25.Errors\xca\x02\x1fGoogle\\Ads\\GoogleAds\\V25\\Errors\xea\x02#Google::Ads::GoogleAds::V25::Errorsb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Errors + CampaignCriterionErrorEnum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.errors.CampaignCriterionErrorEnum").msgclass + CampaignCriterionErrorEnum::CampaignCriterionError = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.errors.CampaignCriterionErrorEnum.CampaignCriterionError").enummodule + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/errors/campaign_customizer_error_pb.rb b/lib/google/ads/google_ads/v25/errors/campaign_customizer_error_pb.rb new file mode 100644 index 000000000..b3be7289e --- /dev/null +++ b/lib/google/ads/google_ads/v25/errors/campaign_customizer_error_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/errors/campaign_customizer_error.proto + +require 'google/protobuf' + + +descriptor_data = "\n?google/ads/googleads/v25/errors/campaign_customizer_error.proto\x12\x1fgoogle.ads.googleads.v25.errors\"V\n\x1b\x43\x61mpaignCustomizerErrorEnum\"7\n\x17\x43\x61mpaignCustomizerError\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x0b\n\x07UNKNOWN\x10\x01\x42\xfc\x01\n#com.google.ads.googleads.v25.errorsB\x1c\x43\x61mpaignCustomizerErrorProtoP\x01ZEgoogle.golang.org/genproto/googleapis/ads/googleads/v25/errors;errors\xa2\x02\x03GAA\xaa\x02\x1fGoogle.Ads.GoogleAds.V25.Errors\xca\x02\x1fGoogle\\Ads\\GoogleAds\\V25\\Errors\xea\x02#Google::Ads::GoogleAds::V25::Errorsb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Errors + CampaignCustomizerErrorEnum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.errors.CampaignCustomizerErrorEnum").msgclass + CampaignCustomizerErrorEnum::CampaignCustomizerError = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.errors.CampaignCustomizerErrorEnum.CampaignCustomizerError").enummodule + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/errors/campaign_draft_error_pb.rb b/lib/google/ads/google_ads/v25/errors/campaign_draft_error_pb.rb new file mode 100644 index 000000000..120790a9a --- /dev/null +++ b/lib/google/ads/google_ads/v25/errors/campaign_draft_error_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/errors/campaign_draft_error.proto + +require 'google/protobuf' + + +descriptor_data = "\n:google/ads/googleads/v25/errors/campaign_draft_error.proto\x12\x1fgoogle.ads.googleads.v25.errors\"\xc8\x03\n\x16\x43\x61mpaignDraftErrorEnum\"\xad\x03\n\x12\x43\x61mpaignDraftError\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x0b\n\x07UNKNOWN\x10\x01\x12\x18\n\x14\x44UPLICATE_DRAFT_NAME\x10\x02\x12*\n&INVALID_STATUS_TRANSITION_FROM_REMOVED\x10\x03\x12+\n\'INVALID_STATUS_TRANSITION_FROM_PROMOTED\x10\x04\x12\x31\n-INVALID_STATUS_TRANSITION_FROM_PROMOTE_FAILED\x10\x05\x12 \n\x1c\x43USTOMER_CANNOT_CREATE_DRAFT\x10\x06\x12 \n\x1c\x43\x41MPAIGN_CANNOT_CREATE_DRAFT\x10\x07\x12\x18\n\x14INVALID_DRAFT_CHANGE\x10\x08\x12\x1d\n\x19INVALID_STATUS_TRANSITION\x10\t\x12-\n)MAX_NUMBER_OF_DRAFTS_PER_CAMPAIGN_REACHED\x10\n\x12\'\n#LIST_ERRORS_FOR_PROMOTED_DRAFT_ONLY\x10\x0b\x42\xf7\x01\n#com.google.ads.googleads.v25.errorsB\x17\x43\x61mpaignDraftErrorProtoP\x01ZEgoogle.golang.org/genproto/googleapis/ads/googleads/v25/errors;errors\xa2\x02\x03GAA\xaa\x02\x1fGoogle.Ads.GoogleAds.V25.Errors\xca\x02\x1fGoogle\\Ads\\GoogleAds\\V25\\Errors\xea\x02#Google::Ads::GoogleAds::V25::Errorsb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Errors + CampaignDraftErrorEnum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.errors.CampaignDraftErrorEnum").msgclass + CampaignDraftErrorEnum::CampaignDraftError = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.errors.CampaignDraftErrorEnum.CampaignDraftError").enummodule + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/errors/campaign_error_pb.rb b/lib/google/ads/google_ads/v25/errors/campaign_error_pb.rb new file mode 100644 index 000000000..9f7c3826e --- /dev/null +++ b/lib/google/ads/google_ads/v25/errors/campaign_error_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/errors/campaign_error.proto + +require 'google/protobuf' + + +descriptor_data = "\n4google/ads/googleads/v25/errors/campaign_error.proto\x12\x1fgoogle.ads.googleads.v25.errors\"\xa5#\n\x11\x43\x61mpaignErrorEnum\"\x8f#\n\rCampaignError\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x0b\n\x07UNKNOWN\x10\x01\x12!\n\x1d\x43\x41NNOT_TARGET_CONTENT_NETWORK\x10\x03\x12 \n\x1c\x43\x41NNOT_TARGET_SEARCH_NETWORK\x10\x04\x12\x36\n2CANNOT_TARGET_SEARCH_NETWORK_WITHOUT_GOOGLE_SEARCH\x10\x05\x12\x30\n,CANNOT_TARGET_GOOGLE_SEARCH_FOR_CPM_CAMPAIGN\x10\x06\x12-\n)CAMPAIGN_MUST_TARGET_AT_LEAST_ONE_NETWORK\x10\x07\x12(\n$CANNOT_TARGET_PARTNER_SEARCH_NETWORK\x10\x08\x12K\nGCANNOT_TARGET_CONTENT_NETWORK_ONLY_WITH_CRITERIA_LEVEL_BIDDING_STRATEGY\x10\t\x12\x36\n2CAMPAIGN_DURATION_MUST_CONTAIN_ALL_RUNNABLE_TRIALS\x10\n\x12$\n CANNOT_MODIFY_FOR_TRIAL_CAMPAIGN\x10\x0b\x12\x1b\n\x17\x44UPLICATE_CAMPAIGN_NAME\x10\x0c\x12\x1f\n\x1bINCOMPATIBLE_CAMPAIGN_FIELD\x10\r\x12\x19\n\x15INVALID_CAMPAIGN_NAME\x10\x0e\x12*\n&INVALID_AD_SERVING_OPTIMIZATION_STATUS\x10\x0f\x12\x18\n\x14INVALID_TRACKING_URL\x10\x10\x12>\n:CANNOT_SET_BOTH_TRACKING_URL_TEMPLATE_AND_TRACKING_SETTING\x10\x11\x12 \n\x1cMAX_IMPRESSIONS_NOT_IN_RANGE\x10\x12\x12\x1b\n\x17TIME_UNIT_NOT_SUPPORTED\x10\x13\x12\x31\n-INVALID_OPERATION_IF_SERVING_STATUS_HAS_ENDED\x10\x14\x12\x1b\n\x17\x42UDGET_CANNOT_BE_SHARED\x10\x15\x12%\n!CAMPAIGN_CANNOT_USE_SHARED_BUDGET\x10\x16\x12\x30\n,CANNOT_CHANGE_BUDGET_ON_CAMPAIGN_WITH_TRIALS\x10\x17\x12!\n\x1d\x43\x41MPAIGN_LABEL_DOES_NOT_EXIST\x10\x18\x12!\n\x1d\x43\x41MPAIGN_LABEL_ALREADY_EXISTS\x10\x19\x12\x1c\n\x18MISSING_SHOPPING_SETTING\x10\x1a\x12\"\n\x1eINVALID_SHOPPING_SALES_COUNTRY\x10\x1b\x12;\n7ADVERTISING_CHANNEL_TYPE_NOT_AVAILABLE_FOR_ACCOUNT_TYPE\x10\x1f\x12(\n$INVALID_ADVERTISING_CHANNEL_SUB_TYPE\x10 \x12,\n(AT_LEAST_ONE_CONVERSION_MUST_BE_SELECTED\x10!\x12\x1f\n\x1b\x43\x41NNOT_SET_AD_ROTATION_MODE\x10\"\x12/\n+CANNOT_MODIFY_START_DATE_IF_ALREADY_STARTED\x10#\x12\x1b\n\x17\x43\x41NNOT_SET_DATE_TO_PAST\x10$\x12\x1f\n\x1bMISSING_HOTEL_CUSTOMER_LINK\x10%\x12\x1f\n\x1bINVALID_HOTEL_CUSTOMER_LINK\x10&\x12\x19\n\x15MISSING_HOTEL_SETTING\x10\'\x12\x42\n>CANNOT_USE_SHARED_CAMPAIGN_BUDGET_WHILE_PART_OF_CAMPAIGN_GROUP\x10(\x12\x11\n\rAPP_NOT_FOUND\x10)\x12\x39\n5SHOPPING_ENABLE_LOCAL_NOT_SUPPORTED_FOR_CAMPAIGN_TYPE\x10*\x12\x33\n/MERCHANT_NOT_ALLOWED_FOR_COMPARISON_LISTING_ADS\x10+\x12#\n\x1fINSUFFICIENT_APP_INSTALLS_COUNT\x10,\x12\x1a\n\x16SENSITIVE_CATEGORY_APP\x10-\x12\x1a\n\x16HEC_AGREEMENT_REQUIRED\x10.\x12<\n8NOT_COMPATIBLE_WITH_VIEW_THROUGH_CONVERSION_OPTIMIZATION\x10\x31\x12,\n(INVALID_EXCLUDED_PARENT_ASSET_FIELD_TYPE\x10\x30\x12:\n6CANNOT_CREATE_APP_PRE_REGISTRATION_FOR_NON_ANDROID_APP\x10\x32\x12=\n9APP_NOT_AVAILABLE_TO_CREATE_APP_PRE_REGISTRATION_CAMPAIGN\x10\x33\x12\x1c\n\x18INCOMPATIBLE_BUDGET_TYPE\x10\x34\x12)\n%LOCAL_SERVICES_DUPLICATE_CATEGORY_BID\x10\x35\x12\'\n#LOCAL_SERVICES_INVALID_CATEGORY_BID\x10\x36\x12\'\n#LOCAL_SERVICES_MISSING_CATEGORY_BID\x10\x37\x12\x19\n\x15INVALID_STATUS_CHANGE\x10\x39\x12 \n\x1cMISSING_TRAVEL_CUSTOMER_LINK\x10:\x12 \n\x1cINVALID_TRAVEL_CUSTOMER_LINK\x10;\x12*\n&INVALID_EXCLUDED_PARENT_ASSET_SET_TYPE\x10>\x12,\n(ASSET_SET_NOT_A_HOTEL_PROPERTY_ASSET_SET\x10?\x12\x46\nBHOTEL_PROPERTY_ASSET_SET_ONLY_FOR_PERFORMANCE_MAX_FOR_TRAVEL_GOALS\x10@\x12 \n\x1c\x41VERAGE_DAILY_SPEND_TOO_HIGH\x10\x41\x12+\n\'CANNOT_ATTACH_TO_REMOVED_CAMPAIGN_GROUP\x10\x42\x12%\n!CANNOT_ATTACH_TO_BIDDING_STRATEGY\x10\x43\x12\x1f\n\x1b\x43\x41NNOT_CHANGE_BUDGET_PERIOD\x10\x44\x12\x1a\n\x16NOT_ENOUGH_CONVERSIONS\x10G\x12.\n*CANNOT_SET_MORE_THAN_ONE_CONVERSION_ACTION\x10H\x12#\n\x1fNOT_COMPATIBLE_WITH_BUDGET_TYPE\x10I\x12\x30\n,NOT_COMPATIBLE_WITH_UPLOAD_CLICKS_CONVERSION\x10J\x12.\n*APP_ID_MUST_MATCH_CONVERSION_ACTION_APP_ID\x10L\x12\x38\n4CONVERSION_ACTION_WITH_DOWNLOAD_CATEGORY_NOT_ALLOWED\x10M\x12\x35\n1CONVERSION_ACTION_WITH_DOWNLOAD_CATEGORY_REQUIRED\x10N\x12#\n\x1f\x43ONVERSION_TRACKING_NOT_ENABLED\x10O\x12-\n)NOT_COMPATIBLE_WITH_BIDDING_STRATEGY_TYPE\x10P\x12\x36\n2NOT_COMPATIBLE_WITH_GOOGLE_ATTRIBUTION_CONVERSIONS\x10Q\x12\x1b\n\x17\x43ONVERSION_LAG_TOO_HIGH\x10R\x12\"\n\x1eNOT_LINKED_ADVERTISING_PARTNER\x10S\x12-\n)INVALID_NUMBER_OF_ADVERTISING_PARTNER_IDS\x10T\x12\x31\n-CANNOT_TARGET_DISPLAY_NETWORK_WITHOUT_YOUTUBE\x10U\x12\x36\n2CANNOT_LINK_TO_COMPARISON_SHOPPING_SERVICE_ACCOUNT\x10V\x12I\nECANNOT_TARGET_NETWORK_FOR_COMPARISON_SHOPPING_SERVICE_LINKED_ACCOUNTS\x10W\x12:\n6CANNOT_MODIFY_TEXT_ASSET_AUTOMATION_WITH_ENABLED_TRIAL\x10X\x12\x45\nADYNAMIC_TEXT_ASSET_CANNOT_OPT_OUT_WITH_FINAL_URL_EXPANSION_OPT_IN\x10Y\x12*\n&CANNOT_SET_CAMPAIGN_KEYWORD_MATCH_TYPE\x10Z\x12\x41\n=CANNOT_DISABLE_BROAD_MATCH_WHEN_KEYWORD_CONVERSION_IN_PROCESS\x10[\x12\x34\n0CANNOT_DISABLE_BROAD_MATCH_WHEN_TARGETING_BRANDS\x10\\\x12\x44\n@CANNOT_ENABLE_BROAD_MATCH_FOR_BASE_CAMPAIGN_WITH_PROMOTING_TRIAL\x10]\x12:\n6CANNOT_ENABLE_BROAD_MATCH_FOR_PROMOTING_TRIAL_CAMPAIGN\x10^\x12+\n\'REQUIRED_BUSINESS_NAME_ASSET_NOT_LINKED\x10_\x12\"\n\x1eREQUIRED_LOGO_ASSET_NOT_LINKED\x10`\x12+\n\'BRAND_TARGETING_OVERRIDES_NOT_SUPPORTED\x10\x61\x12-\n)BRAND_GUIDELINES_NOT_ENABLED_FOR_CAMPAIGN\x10\x62\x12\x34\n0BRAND_GUIDELINES_MAIN_AND_ACCENT_COLORS_REQUIRED\x10\x63\x12)\n%BRAND_GUIDELINES_COLOR_INVALID_FORMAT\x10\x64\x12,\n(BRAND_GUIDELINES_UNSUPPORTED_FONT_FAMILY\x10\x65\x12(\n$BRAND_GUIDELINES_UNSUPPORTED_CHANNEL\x10\x66\x12\x33\n/CANNOT_ENABLE_BRAND_GUIDELINES_FOR_TRAVEL_GOALS\x10g\x12\x31\n-CUSTOMER_NOT_ALLOWLISTED_FOR_BRAND_GUIDELINES\x10h\x12/\n+THIRD_PARTY_INTEGRATION_PARTNER_NOT_ALLOWED\x10i\x12:\n6THIRD_PARTY_INTEGRATION_PARTNER_SHARE_COST_NOT_ALLOWED\x10j\x12\x1e\n\x1a\x44UPLICATE_INTERACTION_TYPE\x10k\x12\x1c\n\x18INVALID_INTERACTION_TYPE\x10l\x12\x35\n1VIDEO_SEQUENCE_ERROR_SEQUENCE_DEFINITION_REQUIRED\x10m\x12\x1a\n\x16\x41I_MAX_MUST_BE_ENABLED\x10n\x12&\n\"DURATION_TOO_LONG_FOR_TOTAL_BUDGET\x10o\x12+\n\'END_DATE_TIME_REQUIRED_FOR_TOTAL_BUDGET\x10pB\xf2\x01\n#com.google.ads.googleads.v25.errorsB\x12\x43\x61mpaignErrorProtoP\x01ZEgoogle.golang.org/genproto/googleapis/ads/googleads/v25/errors;errors\xa2\x02\x03GAA\xaa\x02\x1fGoogle.Ads.GoogleAds.V25.Errors\xca\x02\x1fGoogle\\Ads\\GoogleAds\\V25\\Errors\xea\x02#Google::Ads::GoogleAds::V25::Errorsb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Errors + CampaignErrorEnum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.errors.CampaignErrorEnum").msgclass + CampaignErrorEnum::CampaignError = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.errors.CampaignErrorEnum.CampaignError").enummodule + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/errors/campaign_experiment_error_pb.rb b/lib/google/ads/google_ads/v25/errors/campaign_experiment_error_pb.rb new file mode 100644 index 000000000..9ef09ab2a --- /dev/null +++ b/lib/google/ads/google_ads/v25/errors/campaign_experiment_error_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/errors/campaign_experiment_error.proto + +require 'google/protobuf' + + +descriptor_data = "\n?google/ads/googleads/v25/errors/campaign_experiment_error.proto\x12\x1fgoogle.ads.googleads.v25.errors\"\x80\x04\n\x1b\x43\x61mpaignExperimentErrorEnum\"\xe0\x03\n\x17\x43\x61mpaignExperimentError\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x0b\n\x07UNKNOWN\x10\x01\x12\x12\n\x0e\x44UPLICATE_NAME\x10\x02\x12\x16\n\x12INVALID_TRANSITION\x10\x03\x12/\n+CANNOT_CREATE_EXPERIMENT_WITH_SHARED_BUDGET\x10\x04\x12\x36\n2CANNOT_CREATE_EXPERIMENT_FOR_REMOVED_BASE_CAMPAIGN\x10\x05\x12\x33\n/CANNOT_CREATE_EXPERIMENT_FOR_NON_PROPOSED_DRAFT\x10\x06\x12%\n!CUSTOMER_CANNOT_CREATE_EXPERIMENT\x10\x07\x12%\n!CAMPAIGN_CANNOT_CREATE_EXPERIMENT\x10\x08\x12)\n%EXPERIMENT_DURATIONS_MUST_NOT_OVERLAP\x10\t\x12\x38\n4EXPERIMENT_DURATION_MUST_BE_WITHIN_CAMPAIGN_DURATION\x10\n\x12*\n&CANNOT_MUTATE_EXPERIMENT_DUE_TO_STATUS\x10\x0b\x42\xfc\x01\n#com.google.ads.googleads.v25.errorsB\x1c\x43\x61mpaignExperimentErrorProtoP\x01ZEgoogle.golang.org/genproto/googleapis/ads/googleads/v25/errors;errors\xa2\x02\x03GAA\xaa\x02\x1fGoogle.Ads.GoogleAds.V25.Errors\xca\x02\x1fGoogle\\Ads\\GoogleAds\\V25\\Errors\xea\x02#Google::Ads::GoogleAds::V25::Errorsb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Errors + CampaignExperimentErrorEnum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.errors.CampaignExperimentErrorEnum").msgclass + CampaignExperimentErrorEnum::CampaignExperimentError = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.errors.CampaignExperimentErrorEnum.CampaignExperimentError").enummodule + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/errors/campaign_feed_error_pb.rb b/lib/google/ads/google_ads/v25/errors/campaign_feed_error_pb.rb new file mode 100644 index 000000000..d711c209d --- /dev/null +++ b/lib/google/ads/google_ads/v25/errors/campaign_feed_error_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/errors/campaign_feed_error.proto + +require 'google/protobuf' + + +descriptor_data = "\n9google/ads/googleads/v25/errors/campaign_feed_error.proto\x12\x1fgoogle.ads.googleads.v25.errors\"\x8c\x03\n\x15\x43\x61mpaignFeedErrorEnum\"\xf2\x02\n\x11\x43\x61mpaignFeedError\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x0b\n\x07UNKNOWN\x10\x01\x12,\n(FEED_ALREADY_EXISTS_FOR_PLACEHOLDER_TYPE\x10\x02\x12\"\n\x1e\x43\x41NNOT_CREATE_FOR_REMOVED_FEED\x10\x04\x12\x30\n,CANNOT_CREATE_ALREADY_EXISTING_CAMPAIGN_FEED\x10\x05\x12\'\n#CANNOT_MODIFY_REMOVED_CAMPAIGN_FEED\x10\x06\x12\x1c\n\x18INVALID_PLACEHOLDER_TYPE\x10\x07\x12,\n(MISSING_FEEDMAPPING_FOR_PLACEHOLDER_TYPE\x10\x08\x12&\n\"NO_EXISTING_LOCATION_CUSTOMER_FEED\x10\t\x12\x1e\n\x1aLEGACY_FEED_TYPE_READ_ONLY\x10\nB\xf6\x01\n#com.google.ads.googleads.v25.errorsB\x16\x43\x61mpaignFeedErrorProtoP\x01ZEgoogle.golang.org/genproto/googleapis/ads/googleads/v25/errors;errors\xa2\x02\x03GAA\xaa\x02\x1fGoogle.Ads.GoogleAds.V25.Errors\xca\x02\x1fGoogle\\Ads\\GoogleAds\\V25\\Errors\xea\x02#Google::Ads::GoogleAds::V25::Errorsb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Errors + CampaignFeedErrorEnum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.errors.CampaignFeedErrorEnum").msgclass + CampaignFeedErrorEnum::CampaignFeedError = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.errors.CampaignFeedErrorEnum.CampaignFeedError").enummodule + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/errors/campaign_goal_config_error_pb.rb b/lib/google/ads/google_ads/v25/errors/campaign_goal_config_error_pb.rb new file mode 100644 index 000000000..c250df2ee --- /dev/null +++ b/lib/google/ads/google_ads/v25/errors/campaign_goal_config_error_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/errors/campaign_goal_config_error.proto + +require 'google/protobuf' + + +descriptor_data = "\n@google/ads/googleads/v25/errors/campaign_goal_config_error.proto\x12\x1fgoogle.ads.googleads.v25.errors\"\xcd\x04\n\x1b\x43\x61mpaignGoalConfigErrorEnum\"\xad\x04\n\x17\x43\x61mpaignGoalConfigError\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x0b\n\x07UNKNOWN\x10\x01\x12\x12\n\x0eGOAL_NOT_FOUND\x10\x03\x12\x16\n\x12\x43\x41MPAIGN_NOT_FOUND\x10\x04\x12\x30\n,HIGH_LIFETIME_VALUE_PRESENT_BUT_VALUE_ABSENT\x10\t\x12\x33\n/HIGH_LIFETIME_VALUE_LESS_THAN_OR_EQUAL_TO_VALUE\x10\n\x12?\n;CUSTOMER_LIFECYCLE_OPTIMIZATION_CAMPAIGN_TYPE_NOT_SUPPORTED\x10\x0b\x12/\n+CUSTOMER_NOT_ALLOWLISTED_FOR_RETENTION_ONLY\x10\x0c\x12T\nPCAMPAIGN_OVERRIDE_VALUES_SET_FOR_NEW_CUSTOMER_ACQUISITION_TARGET_SPECIFIC_OPTION\x10\r\x12I\nECAMPAIGN_OVERRIDE_HIGH_LIFETIME_VALUE_NOT_SUPPORTED_FOR_CAMPAIGN_TYPE\x10\x0e\x12%\n!CANNOT_USE_INCOMPATIBLE_CLO_GOALS\x10\x0f\x12\'\n#LOYALTY_RETENTION_GOAL_INVALID_MODE\x10\x10\x42\xfc\x01\n#com.google.ads.googleads.v25.errorsB\x1c\x43\x61mpaignGoalConfigErrorProtoP\x01ZEgoogle.golang.org/genproto/googleapis/ads/googleads/v25/errors;errors\xa2\x02\x03GAA\xaa\x02\x1fGoogle.Ads.GoogleAds.V25.Errors\xca\x02\x1fGoogle\\Ads\\GoogleAds\\V25\\Errors\xea\x02#Google::Ads::GoogleAds::V25::Errorsb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Errors + CampaignGoalConfigErrorEnum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.errors.CampaignGoalConfigErrorEnum").msgclass + CampaignGoalConfigErrorEnum::CampaignGoalConfigError = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.errors.CampaignGoalConfigErrorEnum.CampaignGoalConfigError").enummodule + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/errors/campaign_shared_set_error_pb.rb b/lib/google/ads/google_ads/v25/errors/campaign_shared_set_error_pb.rb new file mode 100644 index 000000000..b4f8f9eaf --- /dev/null +++ b/lib/google/ads/google_ads/v25/errors/campaign_shared_set_error_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/errors/campaign_shared_set_error.proto + +require 'google/protobuf' + + +descriptor_data = "\n?google/ads/googleads/v25/errors/campaign_shared_set_error.proto\x12\x1fgoogle.ads.googleads.v25.errors\"r\n\x1a\x43\x61mpaignSharedSetErrorEnum\"T\n\x16\x43\x61mpaignSharedSetError\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x0b\n\x07UNKNOWN\x10\x01\x12\x1c\n\x18SHARED_SET_ACCESS_DENIED\x10\x02\x42\xfb\x01\n#com.google.ads.googleads.v25.errorsB\x1b\x43\x61mpaignSharedSetErrorProtoP\x01ZEgoogle.golang.org/genproto/googleapis/ads/googleads/v25/errors;errors\xa2\x02\x03GAA\xaa\x02\x1fGoogle.Ads.GoogleAds.V25.Errors\xca\x02\x1fGoogle\\Ads\\GoogleAds\\V25\\Errors\xea\x02#Google::Ads::GoogleAds::V25::Errorsb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Errors + CampaignSharedSetErrorEnum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.errors.CampaignSharedSetErrorEnum").msgclass + CampaignSharedSetErrorEnum::CampaignSharedSetError = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.errors.CampaignSharedSetErrorEnum.CampaignSharedSetError").enummodule + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/errors/change_event_error_pb.rb b/lib/google/ads/google_ads/v25/errors/change_event_error_pb.rb new file mode 100644 index 000000000..b754d1111 --- /dev/null +++ b/lib/google/ads/google_ads/v25/errors/change_event_error_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/errors/change_event_error.proto + +require 'google/protobuf' + + +descriptor_data = "\n8google/ads/googleads/v25/errors/change_event_error.proto\x12\x1fgoogle.ads.googleads.v25.errors\"\xd4\x01\n\x14\x43hangeEventErrorEnum\"\xbb\x01\n\x10\x43hangeEventError\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x0b\n\x07UNKNOWN\x10\x01\x12\x16\n\x12START_DATE_TOO_OLD\x10\x02\x12\x1e\n\x1a\x43HANGE_DATE_RANGE_INFINITE\x10\x03\x12\x1e\n\x1a\x43HANGE_DATE_RANGE_NEGATIVE\x10\x04\x12\x17\n\x13LIMIT_NOT_SPECIFIED\x10\x05\x12\x18\n\x14INVALID_LIMIT_CLAUSE\x10\x06\x42\xf5\x01\n#com.google.ads.googleads.v25.errorsB\x15\x43hangeEventErrorProtoP\x01ZEgoogle.golang.org/genproto/googleapis/ads/googleads/v25/errors;errors\xa2\x02\x03GAA\xaa\x02\x1fGoogle.Ads.GoogleAds.V25.Errors\xca\x02\x1fGoogle\\Ads\\GoogleAds\\V25\\Errors\xea\x02#Google::Ads::GoogleAds::V25::Errorsb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Errors + ChangeEventErrorEnum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.errors.ChangeEventErrorEnum").msgclass + ChangeEventErrorEnum::ChangeEventError = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.errors.ChangeEventErrorEnum.ChangeEventError").enummodule + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/errors/change_status_error_pb.rb b/lib/google/ads/google_ads/v25/errors/change_status_error_pb.rb new file mode 100644 index 000000000..ffbb2472d --- /dev/null +++ b/lib/google/ads/google_ads/v25/errors/change_status_error_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/errors/change_status_error.proto + +require 'google/protobuf' + + +descriptor_data = "\n9google/ads/googleads/v25/errors/change_status_error.proto\x12\x1fgoogle.ads.googleads.v25.errors\"\xd6\x01\n\x15\x43hangeStatusErrorEnum\"\xbc\x01\n\x11\x43hangeStatusError\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x0b\n\x07UNKNOWN\x10\x01\x12\x16\n\x12START_DATE_TOO_OLD\x10\x03\x12\x1e\n\x1a\x43HANGE_DATE_RANGE_INFINITE\x10\x04\x12\x1e\n\x1a\x43HANGE_DATE_RANGE_NEGATIVE\x10\x05\x12\x17\n\x13LIMIT_NOT_SPECIFIED\x10\x06\x12\x18\n\x14INVALID_LIMIT_CLAUSE\x10\x07\x42\xf6\x01\n#com.google.ads.googleads.v25.errorsB\x16\x43hangeStatusErrorProtoP\x01ZEgoogle.golang.org/genproto/googleapis/ads/googleads/v25/errors;errors\xa2\x02\x03GAA\xaa\x02\x1fGoogle.Ads.GoogleAds.V25.Errors\xca\x02\x1fGoogle\\Ads\\GoogleAds\\V25\\Errors\xea\x02#Google::Ads::GoogleAds::V25::Errorsb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Errors + ChangeStatusErrorEnum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.errors.ChangeStatusErrorEnum").msgclass + ChangeStatusErrorEnum::ChangeStatusError = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.errors.ChangeStatusErrorEnum.ChangeStatusError").enummodule + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/errors/click_view_error_pb.rb b/lib/google/ads/google_ads/v25/errors/click_view_error_pb.rb new file mode 100644 index 000000000..d2c7ab715 --- /dev/null +++ b/lib/google/ads/google_ads/v25/errors/click_view_error_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/errors/click_view_error.proto + +require 'google/protobuf' + + +descriptor_data = "\n6google/ads/googleads/v25/errors/click_view_error.proto\x12\x1fgoogle.ads.googleads.v25.errors\"{\n\x12\x43lickViewErrorEnum\"e\n\x0e\x43lickViewError\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x0b\n\x07UNKNOWN\x10\x01\x12#\n\x1f\x45XPECTED_FILTER_ON_A_SINGLE_DAY\x10\x02\x12\x10\n\x0c\x44\x41TE_TOO_OLD\x10\x03\x42\xf3\x01\n#com.google.ads.googleads.v25.errorsB\x13\x43lickViewErrorProtoP\x01ZEgoogle.golang.org/genproto/googleapis/ads/googleads/v25/errors;errors\xa2\x02\x03GAA\xaa\x02\x1fGoogle.Ads.GoogleAds.V25.Errors\xca\x02\x1fGoogle\\Ads\\GoogleAds\\V25\\Errors\xea\x02#Google::Ads::GoogleAds::V25::Errorsb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Errors + ClickViewErrorEnum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.errors.ClickViewErrorEnum").msgclass + ClickViewErrorEnum::ClickViewError = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.errors.ClickViewErrorEnum.ClickViewError").enummodule + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/errors/collection_size_error_pb.rb b/lib/google/ads/google_ads/v25/errors/collection_size_error_pb.rb new file mode 100644 index 000000000..26a6fea61 --- /dev/null +++ b/lib/google/ads/google_ads/v25/errors/collection_size_error_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/errors/collection_size_error.proto + +require 'google/protobuf' + + +descriptor_data = "\n;google/ads/googleads/v25/errors/collection_size_error.proto\x12\x1fgoogle.ads.googleads.v25.errors\"i\n\x17\x43ollectionSizeErrorEnum\"N\n\x13\x43ollectionSizeError\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x0b\n\x07UNKNOWN\x10\x01\x12\x0b\n\x07TOO_FEW\x10\x02\x12\x0c\n\x08TOO_MANY\x10\x03\x42\xf8\x01\n#com.google.ads.googleads.v25.errorsB\x18\x43ollectionSizeErrorProtoP\x01ZEgoogle.golang.org/genproto/googleapis/ads/googleads/v25/errors;errors\xa2\x02\x03GAA\xaa\x02\x1fGoogle.Ads.GoogleAds.V25.Errors\xca\x02\x1fGoogle\\Ads\\GoogleAds\\V25\\Errors\xea\x02#Google::Ads::GoogleAds::V25::Errorsb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Errors + CollectionSizeErrorEnum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.errors.CollectionSizeErrorEnum").msgclass + CollectionSizeErrorEnum::CollectionSizeError = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.errors.CollectionSizeErrorEnum.CollectionSizeError").enummodule + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/errors/content_creator_insights_error_pb.rb b/lib/google/ads/google_ads/v25/errors/content_creator_insights_error_pb.rb new file mode 100644 index 000000000..ef4753951 --- /dev/null +++ b/lib/google/ads/google_ads/v25/errors/content_creator_insights_error_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/errors/content_creator_insights_error.proto + +require 'google/protobuf' + + +descriptor_data = "\nDgoogle/ads/googleads/v25/errors/content_creator_insights_error.proto\x12\x1fgoogle.ads.googleads.v25.errors\"\x95\x01\n\x1f\x43ontentCreatorInsightsErrorEnum\"r\n\x1b\x43ontentCreatorInsightsError\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x0b\n\x07UNKNOWN\x10\x01\x12\x35\n1DIMENSION_INCOMPATIBLE_WITH_AUDIENCE_COMBINATIONS\x10\x02\x42\x80\x02\n#com.google.ads.googleads.v25.errorsB ContentCreatorInsightsErrorProtoP\x01ZEgoogle.golang.org/genproto/googleapis/ads/googleads/v25/errors;errors\xa2\x02\x03GAA\xaa\x02\x1fGoogle.Ads.GoogleAds.V25.Errors\xca\x02\x1fGoogle\\Ads\\GoogleAds\\V25\\Errors\xea\x02#Google::Ads::GoogleAds::V25::Errorsb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Errors + ContentCreatorInsightsErrorEnum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.errors.ContentCreatorInsightsErrorEnum").msgclass + ContentCreatorInsightsErrorEnum::ContentCreatorInsightsError = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.errors.ContentCreatorInsightsErrorEnum.ContentCreatorInsightsError").enummodule + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/errors/context_error_pb.rb b/lib/google/ads/google_ads/v25/errors/context_error_pb.rb new file mode 100644 index 000000000..234db8180 --- /dev/null +++ b/lib/google/ads/google_ads/v25/errors/context_error_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/errors/context_error.proto + +require 'google/protobuf' + + +descriptor_data = "\n3google/ads/googleads/v25/errors/context_error.proto\x12\x1fgoogle.ads.googleads.v25.errors\"\x9c\x01\n\x10\x43ontextErrorEnum\"\x87\x01\n\x0c\x43ontextError\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x0b\n\x07UNKNOWN\x10\x01\x12\'\n#OPERATION_NOT_PERMITTED_FOR_CONTEXT\x10\x02\x12\x30\n,OPERATION_NOT_PERMITTED_FOR_REMOVED_RESOURCE\x10\x03\x42\xf1\x01\n#com.google.ads.googleads.v25.errorsB\x11\x43ontextErrorProtoP\x01ZEgoogle.golang.org/genproto/googleapis/ads/googleads/v25/errors;errors\xa2\x02\x03GAA\xaa\x02\x1fGoogle.Ads.GoogleAds.V25.Errors\xca\x02\x1fGoogle\\Ads\\GoogleAds\\V25\\Errors\xea\x02#Google::Ads::GoogleAds::V25::Errorsb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Errors + ContextErrorEnum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.errors.ContextErrorEnum").msgclass + ContextErrorEnum::ContextError = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.errors.ContextErrorEnum.ContextError").enummodule + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/errors/conversion_action_error_pb.rb b/lib/google/ads/google_ads/v25/errors/conversion_action_error_pb.rb new file mode 100644 index 000000000..30205353b --- /dev/null +++ b/lib/google/ads/google_ads/v25/errors/conversion_action_error_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/errors/conversion_action_error.proto + +require 'google/protobuf' + + +descriptor_data = "\n=google/ads/googleads/v25/errors/conversion_action_error.proto\x12\x1fgoogle.ads.googleads.v25.errors\"\xd3\x03\n\x19\x43onversionActionErrorEnum\"\xb5\x03\n\x15\x43onversionActionError\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x0b\n\x07UNKNOWN\x10\x01\x12\x12\n\x0e\x44UPLICATE_NAME\x10\x02\x12\x14\n\x10\x44UPLICATE_APP_ID\x10\x03\x12\x37\n3TWO_CONVERSION_ACTIONS_BIDDING_ON_SAME_APP_DOWNLOAD\x10\x04\x12\x31\n-BIDDING_ON_SAME_APP_DOWNLOAD_AS_GLOBAL_ACTION\x10\x05\x12)\n%DATA_DRIVEN_MODEL_WAS_NEVER_GENERATED\x10\x06\x12\x1d\n\x19\x44\x41TA_DRIVEN_MODEL_EXPIRED\x10\x07\x12\x1b\n\x17\x44\x41TA_DRIVEN_MODEL_STALE\x10\x08\x12\x1d\n\x19\x44\x41TA_DRIVEN_MODEL_UNKNOWN\x10\t\x12\x1a\n\x16\x43REATION_NOT_SUPPORTED\x10\n\x12\x18\n\x14UPDATE_NOT_SUPPORTED\x10\x0b\x12,\n(CANNOT_SET_RULE_BASED_ATTRIBUTION_MODELS\x10\x0c\x42\xfa\x01\n#com.google.ads.googleads.v25.errorsB\x1a\x43onversionActionErrorProtoP\x01ZEgoogle.golang.org/genproto/googleapis/ads/googleads/v25/errors;errors\xa2\x02\x03GAA\xaa\x02\x1fGoogle.Ads.GoogleAds.V25.Errors\xca\x02\x1fGoogle\\Ads\\GoogleAds\\V25\\Errors\xea\x02#Google::Ads::GoogleAds::V25::Errorsb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Errors + ConversionActionErrorEnum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.errors.ConversionActionErrorEnum").msgclass + ConversionActionErrorEnum::ConversionActionError = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.errors.ConversionActionErrorEnum.ConversionActionError").enummodule + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/errors/conversion_adjustment_upload_error_pb.rb b/lib/google/ads/google_ads/v25/errors/conversion_adjustment_upload_error_pb.rb new file mode 100644 index 000000000..5024571ee --- /dev/null +++ b/lib/google/ads/google_ads/v25/errors/conversion_adjustment_upload_error_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/errors/conversion_adjustment_upload_error.proto + +require 'google/protobuf' + + +descriptor_data = "\nHgoogle/ads/googleads/v25/errors/conversion_adjustment_upload_error.proto\x12\x1fgoogle.ads.googleads.v25.errors\"\xf0\x07\n#ConversionAdjustmentUploadErrorEnum\"\xc8\x07\n\x1f\x43onversionAdjustmentUploadError\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x0b\n\x07UNKNOWN\x10\x01\x12 \n\x1cTOO_RECENT_CONVERSION_ACTION\x10\x02\x12 \n\x1c\x43ONVERSION_ALREADY_RETRACTED\x10\x04\x12\x18\n\x14\x43ONVERSION_NOT_FOUND\x10\x05\x12\x16\n\x12\x43ONVERSION_EXPIRED\x10\x06\x12\"\n\x1e\x41\x44JUSTMENT_PRECEDES_CONVERSION\x10\x07\x12!\n\x1dMORE_RECENT_RESTATEMENT_FOUND\x10\x08\x12\x19\n\x15TOO_RECENT_CONVERSION\x10\t\x12N\nJCANNOT_RESTATE_CONVERSION_ACTION_THAT_ALWAYS_USES_DEFAULT_CONVERSION_VALUE\x10\n\x12#\n\x1fTOO_MANY_ADJUSTMENTS_IN_REQUEST\x10\x0b\x12\x18\n\x14TOO_MANY_ADJUSTMENTS\x10\x0c\x12\x1e\n\x1aRESTATEMENT_ALREADY_EXISTS\x10\r\x12#\n\x1f\x44UPLICATE_ADJUSTMENT_IN_REQUEST\x10\x0e\x12-\n)CUSTOMER_NOT_ACCEPTED_CUSTOMER_DATA_TERMS\x10\x0f\x12\x32\n.CONVERSION_ACTION_NOT_ELIGIBLE_FOR_ENHANCEMENT\x10\x10\x12\x1b\n\x17INVALID_USER_IDENTIFIER\x10\x11\x12\x1f\n\x1bUNSUPPORTED_USER_IDENTIFIER\x10\x12\x12.\n*GCLID_DATE_TIME_PAIR_AND_ORDER_ID_BOTH_SET\x10\x14\x12\x1f\n\x1b\x43ONVERSION_ALREADY_ENHANCED\x10\x15\x12$\n DUPLICATE_ENHANCEMENT_IN_REQUEST\x10\x16\x12.\n*CUSTOMER_DATA_POLICY_PROHIBITS_ENHANCEMENT\x10\x17\x12 \n\x1cMISSING_ORDER_ID_FOR_WEBPAGE\x10\x18\x12\x19\n\x15ORDER_ID_CONTAINS_PII\x10\x19\x12\x12\n\x0eINVALID_JOB_ID\x10\x1a\x12\x1e\n\x1aNO_CONVERSION_ACTION_FOUND\x10\x1b\x12\"\n\x1eINVALID_CONVERSION_ACTION_TYPE\x10\x1c\x42\x84\x02\n#com.google.ads.googleads.v25.errorsB$ConversionAdjustmentUploadErrorProtoP\x01ZEgoogle.golang.org/genproto/googleapis/ads/googleads/v25/errors;errors\xa2\x02\x03GAA\xaa\x02\x1fGoogle.Ads.GoogleAds.V25.Errors\xca\x02\x1fGoogle\\Ads\\GoogleAds\\V25\\Errors\xea\x02#Google::Ads::GoogleAds::V25::Errorsb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Errors + ConversionAdjustmentUploadErrorEnum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.errors.ConversionAdjustmentUploadErrorEnum").msgclass + ConversionAdjustmentUploadErrorEnum::ConversionAdjustmentUploadError = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.errors.ConversionAdjustmentUploadErrorEnum.ConversionAdjustmentUploadError").enummodule + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/errors/conversion_custom_variable_error_pb.rb b/lib/google/ads/google_ads/v25/errors/conversion_custom_variable_error_pb.rb new file mode 100644 index 000000000..ab44c2f5f --- /dev/null +++ b/lib/google/ads/google_ads/v25/errors/conversion_custom_variable_error_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/errors/conversion_custom_variable_error.proto + +require 'google/protobuf' + + +descriptor_data = "\nFgoogle/ads/googleads/v25/errors/conversion_custom_variable_error.proto\x12\x1fgoogle.ads.googleads.v25.errors\"\x9b\x01\n!ConversionCustomVariableErrorEnum\"v\n\x1d\x43onversionCustomVariableError\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x0b\n\x07UNKNOWN\x10\x01\x12\x12\n\x0e\x44UPLICATE_NAME\x10\x02\x12\x11\n\rDUPLICATE_TAG\x10\x03\x12\x10\n\x0cRESERVED_TAG\x10\x04\x42\x82\x02\n#com.google.ads.googleads.v25.errorsB\"ConversionCustomVariableErrorProtoP\x01ZEgoogle.golang.org/genproto/googleapis/ads/googleads/v25/errors;errors\xa2\x02\x03GAA\xaa\x02\x1fGoogle.Ads.GoogleAds.V25.Errors\xca\x02\x1fGoogle\\Ads\\GoogleAds\\V25\\Errors\xea\x02#Google::Ads::GoogleAds::V25::Errorsb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Errors + ConversionCustomVariableErrorEnum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.errors.ConversionCustomVariableErrorEnum").msgclass + ConversionCustomVariableErrorEnum::ConversionCustomVariableError = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.errors.ConversionCustomVariableErrorEnum.ConversionCustomVariableError").enummodule + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/errors/conversion_goal_campaign_config_error_pb.rb b/lib/google/ads/google_ads/v25/errors/conversion_goal_campaign_config_error_pb.rb new file mode 100644 index 000000000..b045c679d --- /dev/null +++ b/lib/google/ads/google_ads/v25/errors/conversion_goal_campaign_config_error_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/errors/conversion_goal_campaign_config_error.proto + +require 'google/protobuf' + + +descriptor_data = "\nKgoogle/ads/googleads/v25/errors/conversion_goal_campaign_config_error.proto\x12\x1fgoogle.ads.googleads.v25.errors\"\xad\x03\n%ConversionGoalCampaignConfigErrorEnum\"\x83\x03\n!ConversionGoalCampaignConfigError\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x0b\n\x07UNKNOWN\x10\x01\x12@\n\x12(\n$CANNOT_BID_MODIFY_NEGATIVE_CRITERION\x10?\x12\x1f\n\x1b\x42ID_MODIFIER_ALREADY_EXISTS\x10@\x12\x17\n\x13\x46\x45\x45\x44_ID_NOT_ALLOWED\x10\x41\x12(\n$ACCOUNT_INELIGIBLE_FOR_CRITERIA_TYPE\x10\x42\x12.\n*CRITERIA_TYPE_INVALID_FOR_BIDDING_STRATEGY\x10\x43\x12\x1c\n\x18\x43\x41NNOT_EXCLUDE_CRITERION\x10\x44\x12\x1b\n\x17\x43\x41NNOT_REMOVE_CRITERION\x10\x45\x12$\n INVALID_PRODUCT_BIDDING_CATEGORY\x10L\x12\x1c\n\x18MISSING_SHOPPING_SETTING\x10M\x12\x1d\n\x19INVALID_MATCHING_FUNCTION\x10N\x12\x1f\n\x1bLOCATION_FILTER_NOT_ALLOWED\x10O\x12$\n INVALID_FEED_FOR_LOCATION_FILTER\x10\x62\x12\x1b\n\x17LOCATION_FILTER_INVALID\x10P\x12\x37\n3CANNOT_SET_GEO_TARGET_CONSTANTS_WITH_FEED_ITEM_SETS\x10{\x12\'\n\"CANNOT_SET_BOTH_ASSET_SET_AND_FEED\x10\x8c\x01\x12\x33\n.CANNOT_SET_FEED_OR_FEED_ITEM_SETS_FOR_CUSTOMER\x10\x8e\x01\x12,\n\'CANNOT_SET_ASSET_SET_FIELD_FOR_CUSTOMER\x10\x96\x01\x12\x34\n/CANNOT_SET_GEO_TARGET_CONSTANTS_WITH_ASSET_SETS\x10\x8f\x01\x12.\n)CANNOT_SET_ASSET_SETS_WITH_FEED_ITEM_SETS\x10\x90\x01\x12%\n INVALID_LOCATION_GROUP_ASSET_SET\x10\x8d\x01\x12!\n\x1dINVALID_LOCATION_GROUP_RADIUS\x10|\x12&\n\"INVALID_LOCATION_GROUP_RADIUS_UNIT\x10}\x12\x32\n.CANNOT_ATTACH_CRITERIA_AT_CAMPAIGN_AND_ADGROUP\x10Q\x12\x39\n5HOTEL_LENGTH_OF_STAY_OVERLAPS_WITH_EXISTING_CRITERION\x10R\x12\x41\n=HOTEL_ADVANCE_BOOKING_WINDOW_OVERLAPS_WITH_EXISTING_CRITERION\x10S\x12.\n*FIELD_INCOMPATIBLE_WITH_NEGATIVE_TARGETING\x10T\x12\x1d\n\x19INVALID_WEBPAGE_CONDITION\x10U\x12!\n\x1dINVALID_WEBPAGE_CONDITION_URL\x10V\x12)\n%WEBPAGE_CONDITION_URL_CANNOT_BE_EMPTY\x10W\x12.\n*WEBPAGE_CONDITION_URL_UNSUPPORTED_PROTOCOL\x10X\x12.\n*WEBPAGE_CONDITION_URL_CANNOT_BE_IP_ADDRESS\x10Y\x12\x45\nAWEBPAGE_CONDITION_URL_DOMAIN_NOT_CONSISTENT_WITH_CAMPAIGN_SETTING\x10Z\x12\x31\n-WEBPAGE_CONDITION_URL_CANNOT_BE_PUBLIC_SUFFIX\x10[\x12/\n+WEBPAGE_CONDITION_URL_INVALID_PUBLIC_SUFFIX\x10\\\x12\x39\n5WEBPAGE_CONDITION_URL_VALUE_TRACK_VALUE_NOT_SUPPORTED\x10]\x12<\n8WEBPAGE_CRITERION_URL_EQUALS_CAN_HAVE_ONLY_ONE_CONDITION\x10^\x12\x37\n3WEBPAGE_CRITERION_NOT_SUPPORTED_ON_NON_DSA_AD_GROUP\x10_\x12\x37\n3CANNOT_TARGET_USER_LIST_FOR_SMART_DISPLAY_CAMPAIGNS\x10\x63\x12\x31\n-CANNOT_TARGET_PLACEMENTS_FOR_SEARCH_CAMPAIGNS\x10~\x12*\n&LISTING_SCOPE_TOO_MANY_DIMENSION_TYPES\x10\x64\x12\'\n#LISTING_SCOPE_TOO_MANY_IN_OPERATORS\x10\x65\x12+\n\'LISTING_SCOPE_IN_OPERATOR_NOT_SUPPORTED\x10\x66\x12$\n DUPLICATE_LISTING_DIMENSION_TYPE\x10g\x12%\n!DUPLICATE_LISTING_DIMENSION_VALUE\x10h\x12\x30\n,CANNOT_SET_BIDS_ON_LISTING_GROUP_SUBDIVISION\x10i\x12-\n(LISTING_GROUP_ERROR_IN_ANOTHER_OPERATION\x10\xa9\x01\x12#\n\x1fINVALID_LISTING_GROUP_HIERARCHY\x10j\x12\x33\n.LISTING_GROUP_TREE_WAS_INVALID_BEFORE_MUTATION\x10\xaa\x01\x12+\n\'LISTING_GROUP_UNIT_CANNOT_HAVE_CHILDREN\x10k\x12\x32\n.LISTING_GROUP_SUBDIVISION_REQUIRES_OTHERS_CASE\x10l\x12:\n6LISTING_GROUP_REQUIRES_SAME_DIMENSION_TYPE_AS_SIBLINGS\x10m\x12 \n\x1cLISTING_GROUP_ALREADY_EXISTS\x10n\x12 \n\x1cLISTING_GROUP_DOES_NOT_EXIST\x10o\x12#\n\x1fLISTING_GROUP_CANNOT_BE_REMOVED\x10p\x12\x1e\n\x1aINVALID_LISTING_GROUP_TYPE\x10q\x12*\n&LISTING_GROUP_ADD_MAY_ONLY_USE_TEMP_ID\x10r\x12\x1a\n\x16LISTING_SCOPE_TOO_LONG\x10s\x12%\n!LISTING_SCOPE_TOO_MANY_DIMENSIONS\x10t\x12\x1a\n\x16LISTING_GROUP_TOO_LONG\x10u\x12\x1f\n\x1bLISTING_GROUP_TREE_TOO_DEEP\x10v\x12\x1d\n\x19INVALID_LISTING_DIMENSION\x10w\x12\"\n\x1eINVALID_LISTING_DIMENSION_TYPE\x10x\x12@\n\n\nerror_code\x18\x01 \x01(\x0b\x32*.google.ads.googleads.v25.errors.ErrorCode\x12\x0f\n\x07message\x18\x02 \x01(\t\x12\x37\n\x07trigger\x18\x03 \x01(\x0b\x32&.google.ads.googleads.v25.common.Value\x12@\n\x08location\x18\x04 \x01(\x0b\x32..google.ads.googleads.v25.errors.ErrorLocation\x12>\n\x07\x64\x65tails\x18\x05 \x01(\x0b\x32-.google.ads.googleads.v25.errors.ErrorDetails\"\xe1\x90\x01\n\tErrorCode\x12W\n\rrequest_error\x18\x01 \x01(\x0e\x32>.google.ads.googleads.v25.errors.RequestErrorEnum.RequestErrorH\x00\x12p\n\x16\x62idding_strategy_error\x18\x02 \x01(\x0e\x32N.google.ads.googleads.v25.errors.BiddingStrategyErrorEnum.BiddingStrategyErrorH\x00\x12[\n\x0furl_field_error\x18\x03 \x01(\x0e\x32@.google.ads.googleads.v25.errors.UrlFieldErrorEnum.UrlFieldErrorH\x00\x12j\n\x14list_operation_error\x18\x04 \x01(\x0e\x32J.google.ads.googleads.v25.errors.ListOperationErrorEnum.ListOperationErrorH\x00\x12Q\n\x0bquery_error\x18\x05 \x01(\x0e\x32:.google.ads.googleads.v25.errors.QueryErrorEnum.QueryErrorH\x00\x12T\n\x0cmutate_error\x18\x07 \x01(\x0e\x32<.google.ads.googleads.v25.errors.MutateErrorEnum.MutateErrorH\x00\x12^\n\x10\x66ield_mask_error\x18\x08 \x01(\x0e\x32\x42.google.ads.googleads.v25.errors.FieldMaskErrorEnum.FieldMaskErrorH\x00\x12i\n\x13\x61uthorization_error\x18\t \x01(\x0e\x32J.google.ads.googleads.v25.errors.AuthorizationErrorEnum.AuthorizationErrorH\x00\x12Z\n\x0einternal_error\x18\n \x01(\x0e\x32@.google.ads.googleads.v25.errors.InternalErrorEnum.InternalErrorH\x00\x12Q\n\x0bquota_error\x18\x0b \x01(\x0e\x32:.google.ads.googleads.v25.errors.QuotaErrorEnum.QuotaErrorH\x00\x12H\n\x08\x61\x64_error\x18\x0c \x01(\x0e\x32\x34.google.ads.googleads.v25.errors.AdErrorEnum.AdErrorH\x00\x12X\n\x0e\x61\x64_group_error\x18\r \x01(\x0e\x32>.google.ads.googleads.v25.errors.AdGroupErrorEnum.AdGroupErrorH\x00\x12m\n\x15\x63\x61mpaign_budget_error\x18\x0e \x01(\x0e\x32L.google.ads.googleads.v25.errors.CampaignBudgetErrorEnum.CampaignBudgetErrorH\x00\x12Z\n\x0e\x63\x61mpaign_error\x18\x0f \x01(\x0e\x32@.google.ads.googleads.v25.errors.CampaignErrorEnum.CampaignErrorH\x00\x12k\n\x14video_campaign_error\x18\xb6\x01 \x01(\x0e\x32J.google.ads.googleads.v25.errors.VideoCampaignErrorEnum.VideoCampaignErrorH\x00\x12l\n\x14\x61uthentication_error\x18\x11 \x01(\x0e\x32L.google.ads.googleads.v25.errors.AuthenticationErrorEnum.AuthenticationErrorH\x00\x12U\n\x0c\x61\x63tion_error\x18\xc4\x01 \x01(\x0e\x32<.google.ads.googleads.v25.errors.ActionErrorEnum.ActionErrorH\x00\x12\x94\x01\n#ad_group_criterion_customizer_error\x18\xa1\x01 \x01(\x0e\x32\x64.google.ads.googleads.v25.errors.AdGroupCriterionCustomizerErrorEnum.AdGroupCriterionCustomizerErrorH\x00\x12t\n\x18\x61\x64_group_criterion_error\x18\x12 \x01(\x0e\x32P.google.ads.googleads.v25.errors.AdGroupCriterionErrorEnum.AdGroupCriterionErrorH\x00\x12x\n\x19\x61\x64_group_customizer_error\x18\x9f\x01 \x01(\x0e\x32R.google.ads.googleads.v25.errors.AdGroupCustomizerErrorEnum.AdGroupCustomizerErrorH\x00\x12g\n\x13\x61\x64_customizer_error\x18\x13 \x01(\x0e\x32H.google.ads.googleads.v25.errors.AdCustomizerErrorEnum.AdCustomizerErrorH\x00\x12_\n\x11\x61\x64_group_ad_error\x18\x15 \x01(\x0e\x32\x42.google.ads.googleads.v25.errors.AdGroupAdErrorEnum.AdGroupAdErrorH\x00\x12^\n\x10\x61\x64_sharing_error\x18\x18 \x01(\x0e\x32\x42.google.ads.googleads.v25.errors.AdSharingErrorEnum.AdSharingErrorH\x00\x12K\n\tadx_error\x18\x19 \x01(\x0e\x32\x36.google.ads.googleads.v25.errors.AdxErrorEnum.AdxErrorH\x00\x12Q\n\x0b\x61sset_error\x18k \x01(\x0e\x32:.google.ads.googleads.v25.errors.AssetErrorEnum.AssetErrorH\x00\x12r\n\x17\x61sset_group_asset_error\x18\x95\x01 \x01(\x0e\x32N.google.ads.googleads.v25.errors.AssetGroupAssetErrorEnum.AssetGroupAssetErrorH\x00\x12\x9b\x01\n&asset_group_listing_group_filter_error\x18\x9b\x01 \x01(\x0e\x32h.google.ads.googleads.v25.errors.AssetGroupListingGroupFilterErrorEnum.AssetGroupListingGroupFilterErrorH\x00\x12\x62\n\x11\x61sset_group_error\x18\x94\x01 \x01(\x0e\x32\x44.google.ads.googleads.v25.errors.AssetGroupErrorEnum.AssetGroupErrorH\x00\x12l\n\x15\x61sset_set_asset_error\x18\x99\x01 \x01(\x0e\x32J.google.ads.googleads.v25.errors.AssetSetAssetErrorEnum.AssetSetAssetErrorH\x00\x12i\n\x14\x61sset_set_link_error\x18\x9a\x01 \x01(\x0e\x32H.google.ads.googleads.v25.errors.AssetSetLinkErrorEnum.AssetSetLinkErrorH\x00\x12\\\n\x0f\x61sset_set_error\x18\x98\x01 \x01(\x0e\x32@.google.ads.googleads.v25.errors.AssetSetErrorEnum.AssetSetErrorH\x00\x12W\n\rbidding_error\x18\x1a \x01(\x0e\x32>.google.ads.googleads.v25.errors.BiddingErrorEnum.BiddingErrorH\x00\x12v\n\x18\x63\x61mpaign_criterion_error\x18\x1d \x01(\x0e\x32R.google.ads.googleads.v25.errors.CampaignCriterionErrorEnum.CampaignCriterionErrorH\x00\x12\x87\x01\n\x1e\x63\x61mpaign_conversion_goal_error\x18\xa6\x01 \x01(\x0e\x32\\.google.ads.googleads.v25.errors.CampaignConversionGoalErrorEnum.CampaignConversionGoalErrorH\x00\x12z\n\x19\x63\x61mpaign_customizer_error\x18\xa0\x01 \x01(\x0e\x32T.google.ads.googleads.v25.errors.CampaignCustomizerErrorEnum.CampaignCustomizerErrorH\x00\x12m\n\x15\x63ollection_size_error\x18\x1f \x01(\x0e\x32L.google.ads.googleads.v25.errors.CollectionSizeErrorEnum.CollectionSizeErrorH\x00\x12\x9a\x01\n%conversion_goal_campaign_config_error\x18\xa5\x01 \x01(\x0e\x32h.google.ads.googleads.v25.errors.ConversionGoalCampaignConfigErrorEnum.ConversionGoalCampaignConfigErrorH\x00\x12\x64\n\x12\x63ountry_code_error\x18m \x01(\x0e\x32\x46.google.ads.googleads.v25.errors.CountryCodeErrorEnum.CountryCodeErrorH\x00\x12]\n\x0f\x63riterion_error\x18 \x01(\x0e\x32\x42.google.ads.googleads.v25.errors.CriterionErrorEnum.CriterionErrorH\x00\x12\x81\x01\n\x1c\x63ustom_conversion_goal_error\x18\x96\x01 \x01(\x0e\x32X.google.ads.googleads.v25.errors.CustomConversionGoalErrorEnum.CustomConversionGoalErrorH\x00\x12z\n\x19\x63ustomer_customizer_error\x18\x9e\x01 \x01(\x0e\x32T.google.ads.googleads.v25.errors.CustomerCustomizerErrorEnum.CustomerCustomizerErrorH\x00\x12Z\n\x0e\x63ustomer_error\x18Z \x01(\x0e\x32@.google.ads.googleads.v25.errors.CustomerErrorEnum.CustomerErrorH\x00\x12}\n\x1a\x63ustomizer_attribute_error\x18\x97\x01 \x01(\x0e\x32V.google.ads.googleads.v25.errors.CustomizerAttributeErrorEnum.CustomizerAttributeErrorH\x00\x12N\n\ndate_error\x18! \x01(\x0e\x32\x38.google.ads.googleads.v25.errors.DateErrorEnum.DateErrorH\x00\x12^\n\x10\x64\x61te_range_error\x18\" \x01(\x0e\x32\x42.google.ads.googleads.v25.errors.DateRangeErrorEnum.DateRangeErrorH\x00\x12Z\n\x0e\x64istinct_error\x18# \x01(\x0e\x32@.google.ads.googleads.v25.errors.DistinctErrorEnum.DistinctErrorH\x00\x12\x86\x01\n\x1e\x66\x65\x65\x64_attribute_reference_error\x18$ \x01(\x0e\x32\\.google.ads.googleads.v25.errors.FeedAttributeReferenceErrorEnum.FeedAttributeReferenceErrorH\x00\x12\x95\x01\n$final_url_expansion_asset_view_error\x18\xc1\x01 \x01(\x0e\x32\x64.google.ads.googleads.v25.errors.FinalUrlExpansionAssetViewErrorEnum.FinalUrlExpansionAssetViewErrorH\x00\x12Z\n\x0e\x66unction_error\x18% \x01(\x0e\x32@.google.ads.googleads.v25.errors.FunctionErrorEnum.FunctionErrorH\x00\x12p\n\x16\x66unction_parsing_error\x18& \x01(\x0e\x32N.google.ads.googleads.v25.errors.FunctionParsingErrorEnum.FunctionParsingErrorH\x00\x12H\n\x08id_error\x18\' \x01(\x0e\x32\x34.google.ads.googleads.v25.errors.IdErrorEnum.IdErrorH\x00\x12Q\n\x0bimage_error\x18( \x01(\x0e\x32:.google.ads.googleads.v25.errors.ImageErrorEnum.ImageErrorH\x00\x12g\n\x13language_code_error\x18n \x01(\x0e\x32H.google.ads.googleads.v25.errors.LanguageCodeErrorEnum.LanguageCodeErrorH\x00\x12\x64\n\x12media_bundle_error\x18* \x01(\x0e\x32\x46.google.ads.googleads.v25.errors.MediaBundleErrorEnum.MediaBundleErrorH\x00\x12\x64\n\x12media_upload_error\x18t \x01(\x0e\x32\x46.google.ads.googleads.v25.errors.MediaUploadErrorEnum.MediaUploadErrorH\x00\x12^\n\x10media_file_error\x18V \x01(\x0e\x32\x42.google.ads.googleads.v25.errors.MediaFileErrorEnum.MediaFileErrorH\x00\x12n\n\x15merchant_center_error\x18\xa2\x01 \x01(\x0e\x32L.google.ads.googleads.v25.errors.MerchantCenterErrorEnum.MerchantCenterErrorH\x00\x12`\n\x10multiplier_error\x18, \x01(\x0e\x32\x44.google.ads.googleads.v25.errors.MultiplierErrorEnum.MultiplierErrorH\x00\x12}\n\x1bnew_resource_creation_error\x18- \x01(\x0e\x32V.google.ads.googleads.v25.errors.NewResourceCreationErrorEnum.NewResourceCreationErrorH\x00\x12[\n\x0fnot_empty_error\x18. \x01(\x0e\x32@.google.ads.googleads.v25.errors.NotEmptyErrorEnum.NotEmptyErrorH\x00\x12N\n\nnull_error\x18/ \x01(\x0e\x32\x38.google.ads.googleads.v25.errors.NullErrorEnum.NullErrorH\x00\x12Z\n\x0eoperator_error\x18\x30 \x01(\x0e\x32@.google.ads.googleads.v25.errors.OperatorErrorEnum.OperatorErrorH\x00\x12Q\n\x0brange_error\x18\x31 \x01(\x0e\x32:.google.ads.googleads.v25.errors.RangeErrorEnum.RangeErrorH\x00\x12l\n\x14recommendation_error\x18: \x01(\x0e\x32L.google.ads.googleads.v25.errors.RecommendationErrorEnum.RecommendationErrorH\x00\x12\x92\x01\n!recommendation_subscription_error\x18\xb4\x01 \x01(\x0e\x32\x64.google.ads.googleads.v25.errors.RecommendationSubscriptionErrorEnum.RecommendationSubscriptionErrorH\x00\x12\x61\n\x11region_code_error\x18\x33 \x01(\x0e\x32\x44.google.ads.googleads.v25.errors.RegionCodeErrorEnum.RegionCodeErrorH\x00\x12W\n\rsetting_error\x18\x34 \x01(\x0e\x32>.google.ads.googleads.v25.errors.SettingErrorEnum.SettingErrorH\x00\x12g\n\x13string_format_error\x18\x35 \x01(\x0e\x32H.google.ads.googleads.v25.errors.StringFormatErrorEnum.StringFormatErrorH\x00\x12g\n\x13string_length_error\x18\x36 \x01(\x0e\x32H.google.ads.googleads.v25.errors.StringLengthErrorEnum.StringLengthErrorH\x00\x12\x83\x01\n\x1doperation_access_denied_error\x18\x37 \x01(\x0e\x32Z.google.ads.googleads.v25.errors.OperationAccessDeniedErrorEnum.OperationAccessDeniedErrorH\x00\x12\x80\x01\n\x1cresource_access_denied_error\x18\x38 \x01(\x0e\x32X.google.ads.googleads.v25.errors.ResourceAccessDeniedErrorEnum.ResourceAccessDeniedErrorH\x00\x12\x93\x01\n#resource_count_limit_exceeded_error\x18\x39 \x01(\x0e\x32\x64.google.ads.googleads.v25.errors.ResourceCountLimitExceededErrorEnum.ResourceCountLimitExceededErrorH\x00\x12\x8c\x01\n youtube_video_registration_error\x18u \x01(\x0e\x32`.google.ads.googleads.v25.errors.YoutubeVideoRegistrationErrorEnum.YoutubeVideoRegistrationErrorH\x00\x12{\n\x1b\x61\x64_group_bid_modifier_error\x18; \x01(\x0e\x32T.google.ads.googleads.v25.errors.AdGroupBidModifierErrorEnum.AdGroupBidModifierErrorH\x00\x12W\n\rcontext_error\x18< \x01(\x0e\x32>.google.ads.googleads.v25.errors.ContextErrorEnum.ContextErrorH\x00\x12Q\n\x0b\x66ield_error\x18= \x01(\x0e\x32:.google.ads.googleads.v25.errors.FieldErrorEnum.FieldErrorH\x00\x12^\n\x10shared_set_error\x18> \x01(\x0e\x32\x42.google.ads.googleads.v25.errors.SharedSetErrorEnum.SharedSetErrorH\x00\x12p\n\x16shared_criterion_error\x18? \x01(\x0e\x32N.google.ads.googleads.v25.errors.SharedCriterionErrorEnum.SharedCriterionErrorH\x00\x12w\n\x19\x63\x61mpaign_shared_set_error\x18@ \x01(\x0e\x32R.google.ads.googleads.v25.errors.CampaignSharedSetErrorEnum.CampaignSharedSetErrorH\x00\x12s\n\x17\x63onversion_action_error\x18\x41 \x01(\x0e\x32P.google.ads.googleads.v25.errors.ConversionActionErrorEnum.ConversionActionErrorH\x00\x12\x92\x01\n\"conversion_adjustment_upload_error\x18s \x01(\x0e\x32\x64.google.ads.googleads.v25.errors.ConversionAdjustmentUploadErrorEnum.ConversionAdjustmentUploadErrorH\x00\x12\x8d\x01\n conversion_custom_variable_error\x18\x8f\x01 \x01(\x0e\x32`.google.ads.googleads.v25.errors.ConversionCustomVariableErrorEnum.ConversionCustomVariableErrorH\x00\x12s\n\x17\x63onversion_upload_error\x18o \x01(\x0e\x32P.google.ads.googleads.v25.errors.ConversionUploadErrorEnum.ConversionUploadErrorH\x00\x12~\n\x1b\x63onversion_value_rule_error\x18\x91\x01 \x01(\x0e\x32V.google.ads.googleads.v25.errors.ConversionValueRuleErrorEnum.ConversionValueRuleErrorH\x00\x12\x88\x01\n\x1f\x63onversion_value_rule_set_error\x18\x92\x01 \x01(\x0e\x32\\.google.ads.googleads.v25.errors.ConversionValueRuleSetErrorEnum.ConversionValueRuleSetErrorH\x00\x12T\n\x0cheader_error\x18\x42 \x01(\x0e\x32<.google.ads.googleads.v25.errors.HeaderErrorEnum.HeaderErrorH\x00\x12Z\n\x0e\x64\x61tabase_error\x18\x43 \x01(\x0e\x32@.google.ads.googleads.v25.errors.DatabaseErrorEnum.DatabaseErrorH\x00\x12j\n\x14policy_finding_error\x18\x44 \x01(\x0e\x32J.google.ads.googleads.v25.errors.PolicyFindingErrorEnum.PolicyFindingErrorH\x00\x12N\n\nenum_error\x18\x46 \x01(\x0e\x32\x38.google.ads.googleads.v25.errors.EnumErrorEnum.EnumErrorH\x00\x12\x64\n\x12keyword_plan_error\x18G \x01(\x0e\x32\x46.google.ads.googleads.v25.errors.KeywordPlanErrorEnum.KeywordPlanErrorH\x00\x12}\n\x1bkeyword_plan_campaign_error\x18H \x01(\x0e\x32V.google.ads.googleads.v25.errors.KeywordPlanCampaignErrorEnum.KeywordPlanCampaignErrorH\x00\x12\x94\x01\n#keyword_plan_campaign_keyword_error\x18\x84\x01 \x01(\x0e\x32\x64.google.ads.googleads.v25.errors.KeywordPlanCampaignKeywordErrorEnum.KeywordPlanCampaignKeywordErrorH\x00\x12{\n\x1bkeyword_plan_ad_group_error\x18J \x01(\x0e\x32T.google.ads.googleads.v25.errors.KeywordPlanAdGroupErrorEnum.KeywordPlanAdGroupErrorH\x00\x12\x92\x01\n#keyword_plan_ad_group_keyword_error\x18\x85\x01 \x01(\x0e\x32\x62.google.ads.googleads.v25.errors.KeywordPlanAdGroupKeywordErrorEnum.KeywordPlanAdGroupKeywordErrorH\x00\x12q\n\x17keyword_plan_idea_error\x18L \x01(\x0e\x32N.google.ads.googleads.v25.errors.KeywordPlanIdeaErrorEnum.KeywordPlanIdeaErrorH\x00\x12\x83\x01\n\x1d\x61\x63\x63ount_budget_proposal_error\x18M \x01(\x0e\x32Z.google.ads.googleads.v25.errors.AccountBudgetProposalErrorEnum.AccountBudgetProposalErrorH\x00\x12[\n\x0fuser_list_error\x18N \x01(\x0e\x32@.google.ads.googleads.v25.errors.UserListErrorEnum.UserListErrorH\x00\x12\x65\n\x12\x63hange_event_error\x18\x88\x01 \x01(\x0e\x32\x46.google.ads.googleads.v25.errors.ChangeEventErrorEnum.ChangeEventErrorH\x00\x12g\n\x13\x63hange_status_error\x18O \x01(\x0e\x32H.google.ads.googleads.v25.errors.ChangeStatusErrorEnum.ChangeStatusErrorH\x00\x12N\n\nfeed_error\x18P \x01(\x0e\x32\x38.google.ads.googleads.v25.errors.FeedErrorEnum.FeedErrorH\x00\x12\x96\x01\n$geo_target_constant_suggestion_error\x18Q \x01(\x0e\x32\x66.google.ads.googleads.v25.errors.GeoTargetConstantSuggestionErrorEnum.GeoTargetConstantSuggestionErrorH\x00\x12j\n\x14\x63\x61mpaign_draft_error\x18R \x01(\x0e\x32J.google.ads.googleads.v25.errors.CampaignDraftErrorEnum.CampaignDraftErrorH\x00\x12[\n\x0f\x66\x65\x65\x64_item_error\x18S \x01(\x0e\x32@.google.ads.googleads.v25.errors.FeedItemErrorEnum.FeedItemErrorH\x00\x12Q\n\x0blabel_error\x18T \x01(\x0e\x32:.google.ads.googleads.v25.errors.LabelErrorEnum.LabelErrorH\x00\x12g\n\x13\x62illing_setup_error\x18W \x01(\x0e\x32H.google.ads.googleads.v25.errors.BillingSetupErrorEnum.BillingSetupErrorH\x00\x12z\n\x1a\x63ustomer_client_link_error\x18X \x01(\x0e\x32T.google.ads.googleads.v25.errors.CustomerClientLinkErrorEnum.CustomerClientLinkErrorH\x00\x12}\n\x1b\x63ustomer_manager_link_error\x18[ \x01(\x0e\x32V.google.ads.googleads.v25.errors.CustomerManagerLinkErrorEnum.CustomerManagerLinkErrorH\x00\x12\x64\n\x12\x66\x65\x65\x64_mapping_error\x18\\ \x01(\x0e\x32\x46.google.ads.googleads.v25.errors.FeedMappingErrorEnum.FeedMappingErrorH\x00\x12g\n\x13\x63ustomer_feed_error\x18] \x01(\x0e\x32H.google.ads.googleads.v25.errors.CustomerFeedErrorEnum.CustomerFeedErrorH\x00\x12\x65\n\x13\x61\x64_group_feed_error\x18^ \x01(\x0e\x32\x46.google.ads.googleads.v25.errors.AdGroupFeedErrorEnum.AdGroupFeedErrorH\x00\x12g\n\x13\x63\x61mpaign_feed_error\x18` \x01(\x0e\x32H.google.ads.googleads.v25.errors.CampaignFeedErrorEnum.CampaignFeedErrorH\x00\x12m\n\x15\x63ustom_interest_error\x18\x61 \x01(\x0e\x32L.google.ads.googleads.v25.errors.CustomInterestErrorEnum.CustomInterestErrorH\x00\x12y\n\x19\x63\x61mpaign_experiment_error\x18\x62 \x01(\x0e\x32T.google.ads.googleads.v25.errors.CampaignExperimentErrorEnum.CampaignExperimentErrorH\x00\x12w\n\x19\x65xtension_feed_item_error\x18\x64 \x01(\x0e\x32R.google.ads.googleads.v25.errors.ExtensionFeedItemErrorEnum.ExtensionFeedItemErrorH\x00\x12\x64\n\x12\x61\x64_parameter_error\x18\x65 \x01(\x0e\x32\x46.google.ads.googleads.v25.errors.AdParameterErrorEnum.AdParameterErrorH\x00\x12z\n\x1a\x66\x65\x65\x64_item_validation_error\x18\x66 \x01(\x0e\x32T.google.ads.googleads.v25.errors.FeedItemValidationErrorEnum.FeedItemValidationErrorH\x00\x12s\n\x17\x65xtension_setting_error\x18g \x01(\x0e\x32P.google.ads.googleads.v25.errors.ExtensionSettingErrorEnum.ExtensionSettingErrorH\x00\x12\x66\n\x13\x66\x65\x65\x64_item_set_error\x18\x8c\x01 \x01(\x0e\x32\x46.google.ads.googleads.v25.errors.FeedItemSetErrorEnum.FeedItemSetErrorH\x00\x12s\n\x18\x66\x65\x65\x64_item_set_link_error\x18\x8d\x01 \x01(\x0e\x32N.google.ads.googleads.v25.errors.FeedItemSetLinkErrorEnum.FeedItemSetLinkErrorH\x00\x12n\n\x16\x66\x65\x65\x64_item_target_error\x18h \x01(\x0e\x32L.google.ads.googleads.v25.errors.FeedItemTargetErrorEnum.FeedItemTargetErrorH\x00\x12p\n\x16policy_violation_error\x18i \x01(\x0e\x32N.google.ads.googleads.v25.errors.PolicyViolationErrorEnum.PolicyViolationErrorH\x00\x12m\n\x15partial_failure_error\x18p \x01(\x0e\x32L.google.ads.googleads.v25.errors.PartialFailureErrorEnum.PartialFailureErrorH\x00\x12^\n\x10\x63lick_view_error\x18q \x01(\x0e\x32\x42.google.ads.googleads.v25.errors.ClickViewErrorEnum.ClickViewErrorH\x00\x12\x8f\x01\n!policy_validation_parameter_error\x18r \x01(\x0e\x32\x62.google.ads.googleads.v25.errors.PolicyValidationParameterErrorEnum.PolicyValidationParameterErrorH\x00\x12^\n\x10size_limit_error\x18v \x01(\x0e\x32\x42.google.ads.googleads.v25.errors.SizeLimitErrorEnum.SizeLimitErrorH\x00\x12{\n\x1boffline_user_data_job_error\x18w \x01(\x0e\x32T.google.ads.googleads.v25.errors.OfflineUserDataJobErrorEnum.OfflineUserDataJobErrorH\x00\x12n\n\x15not_allowlisted_error\x18\x89\x01 \x01(\x0e\x32L.google.ads.googleads.v25.errors.NotAllowlistedErrorEnum.NotAllowlistedErrorH\x00\x12\x64\n\x12manager_link_error\x18y \x01(\x0e\x32\x46.google.ads.googleads.v25.errors.ManagerLinkErrorEnum.ManagerLinkErrorH\x00\x12g\n\x13\x63urrency_code_error\x18z \x01(\x0e\x32H.google.ads.googleads.v25.errors.CurrencyCodeErrorEnum.CurrencyCodeErrorH\x00\x12`\n\x10\x65xperiment_error\x18{ \x01(\x0e\x32\x44.google.ads.googleads.v25.errors.ExperimentErrorEnum.ExperimentErrorH\x00\x12s\n\x17\x61\x63\x63\x65ss_invitation_error\x18| \x01(\x0e\x32P.google.ads.googleads.v25.errors.AccessInvitationErrorEnum.AccessInvitationErrorH\x00\x12^\n\x10reach_plan_error\x18} \x01(\x0e\x32\x42.google.ads.googleads.v25.errors.ReachPlanErrorEnum.ReachPlanErrorH\x00\x12W\n\rinvoice_error\x18~ \x01(\x0e\x32>.google.ads.googleads.v25.errors.InvoiceErrorEnum.InvoiceErrorH\x00\x12p\n\x16payments_account_error\x18\x7f \x01(\x0e\x32N.google.ads.googleads.v25.errors.PaymentsAccountErrorEnum.PaymentsAccountErrorH\x00\x12\\\n\x0ftime_zone_error\x18\x80\x01 \x01(\x0e\x32@.google.ads.googleads.v25.errors.TimeZoneErrorEnum.TimeZoneErrorH\x00\x12_\n\x10\x61sset_link_error\x18\x81\x01 \x01(\x0e\x32\x42.google.ads.googleads.v25.errors.AssetLinkErrorEnum.AssetLinkErrorH\x00\x12\\\n\x0fuser_data_error\x18\x82\x01 \x01(\x0e\x32@.google.ads.googleads.v25.errors.UserDataErrorEnum.UserDataErrorH\x00\x12\\\n\x0f\x62\x61tch_job_error\x18\x83\x01 \x01(\x0e\x32@.google.ads.googleads.v25.errors.BatchJobErrorEnum.BatchJobErrorH\x00\x12\x65\n\x12\x61\x63\x63ount_link_error\x18\x86\x01 \x01(\x0e\x32\x46.google.ads.googleads.v25.errors.AccountLinkErrorEnum.AccountLinkErrorH\x00\x12\x95\x01\n$third_party_app_analytics_link_error\x18\x87\x01 \x01(\x0e\x32\x64.google.ads.googleads.v25.errors.ThirdPartyAppAnalyticsLinkErrorEnum.ThirdPartyAppAnalyticsLinkErrorH\x00\x12{\n\x1a\x63ustomer_user_access_error\x18\x8a\x01 \x01(\x0e\x32T.google.ads.googleads.v25.errors.CustomerUserAccessErrorEnum.CustomerUserAccessErrorH\x00\x12n\n\x15\x63ustom_audience_error\x18\x8b\x01 \x01(\x0e\x32L.google.ads.googleads.v25.errors.CustomAudienceErrorEnum.CustomAudienceErrorH\x00\x12[\n\x0e\x61udience_error\x18\xa4\x01 \x01(\x0e\x32@.google.ads.googleads.v25.errors.AudienceErrorEnum.AudienceErrorH\x00\x12x\n\x19search_term_insight_error\x18\xae\x01 \x01(\x0e\x32R.google.ads.googleads.v25.errors.SearchTermInsightErrorEnum.SearchTermInsightErrorH\x00\x12k\n\x14smart_campaign_error\x18\x93\x01 \x01(\x0e\x32J.google.ads.googleads.v25.errors.SmartCampaignErrorEnum.SmartCampaignErrorH\x00\x12k\n\x14\x65xperiment_arm_error\x18\x9c\x01 \x01(\x0e\x32J.google.ads.googleads.v25.errors.ExperimentArmErrorEnum.ExperimentArmErrorH\x00\x12t\n\x17\x61udience_insights_error\x18\xa7\x01 \x01(\x0e\x32P.google.ads.googleads.v25.errors.AudienceInsightsErrorEnum.AudienceInsightsErrorH\x00\x12\x65\n\x12product_link_error\x18\xa9\x01 \x01(\x0e\x32\x46.google.ads.googleads.v25.errors.ProductLinkErrorEnum.ProductLinkErrorH\x00\x12\\\n\x0f\x64\x61ta_link_error\x18\xbb\x01 \x01(\x0e\x32@.google.ads.googleads.v25.errors.DataLinkErrorEnum.DataLinkErrorH\x00\x12\xc2\x01\n4customer_sk_ad_network_conversion_value_schema_error\x18\xaa\x01 \x01(\x0e\x32\x80\x01.google.ads.googleads.v25.errors.CustomerSkAdNetworkConversionValueSchemaErrorEnum.CustomerSkAdNetworkConversionValueSchemaErrorH\x00\x12[\n\x0e\x63urrency_error\x18\xab\x01 \x01(\x0e\x32@.google.ads.googleads.v25.errors.CurrencyErrorEnum.CurrencyErrorH\x00\x12u\n\x18\x61sset_group_signal_error\x18\xb0\x01 \x01(\x0e\x32P.google.ads.googleads.v25.errors.AssetGroupSignalErrorEnum.AssetGroupSignalErrorH\x00\x12\x84\x01\n\x1dproduct_link_invitation_error\x18\xb1\x01 \x01(\x0e\x32Z.google.ads.googleads.v25.errors.ProductLinkInvitationErrorEnum.ProductLinkInvitationErrorH\x00\x12\x80\x01\n\x1bidentity_verification_error\x18\xb5\x01 \x01(\x0e\x32X.google.ads.googleads.v25.errors.IdentityVerificationErrorEnum.IdentityVerificationErrorH\x00\x12\x82\x01\n\x1duser_list_customer_type_error\x18\xb7\x01 \x01(\x0e\x32X.google.ads.googleads.v25.errors.UserListCustomerTypeErrorEnum.UserListCustomerTypeErrorH\x00\x12q\n\x16shopping_product_error\x18\xb8\x01 \x01(\x0e\x32N.google.ads.googleads.v25.errors.ShoppingProductErrorEnum.ShoppingProductErrorH\x00\x12\xa6\x01\n)automatically_created_asset_removal_error\x18\xb9\x01 \x01(\x0e\x32p.google.ads.googleads.v25.errors.AutomaticallyCreatedAssetRemovalErrorEnum.AutomaticallyCreatedAssetRemovalErrorH\x00\x12t\n\x17shareable_preview_error\x18\xba\x01 \x01(\x0e\x32P.google.ads.googleads.v25.errors.ShareablePreviewErrorEnum.ShareablePreviewErrorH\x00\x12{\n\x1a\x63\x61mpaign_goal_config_error\x18\xbc\x01 \x01(\x0e\x32T.google.ads.googleads.v25.errors.CampaignGoalConfigErrorEnum.CampaignGoalConfigErrorH\x00\x12O\n\ngoal_error\x18\xbd\x01 \x01(\x0e\x32\x38.google.ads.googleads.v25.errors.GoalErrorEnum.GoalErrorH\x00\x12\x8d\x01\n brand_guidelines_migration_error\x18\xbf\x01 \x01(\x0e\x32`.google.ads.googleads.v25.errors.BrandGuidelinesMigrationErrorEnum.BrandGuidelinesMigrationErrorH\x00\x12q\n\x16\x61sset_generation_error\x18\xc2\x01 \x01(\x0e\x32N.google.ads.googleads.v25.errors.AssetGenerationErrorEnum.AssetGenerationErrorH\x00\x12\x61\n\x10\x62\x65nchmarks_error\x18\xc3\x01 \x01(\x0e\x32\x44.google.ads.googleads.v25.errors.BenchmarksErrorEnum.BenchmarksErrorH\x00\x12^\n\x0fincentive_error\x18\xc5\x01 \x01(\x0e\x32\x42.google.ads.googleads.v25.errors.IncentiveErrorEnum.IncentiveErrorH\x00\x12\x87\x01\n\x1e\x63ontent_creator_insights_error\x18\xc6\x01 \x01(\x0e\x32\\.google.ads.googleads.v25.errors.ContentCreatorInsightsErrorEnum.ContentCreatorInsightsErrorH\x00\x12t\n\x17video_reservation_error\x18\xc7\x01 \x01(\x0e\x32P.google.ads.googleads.v25.errors.VideoReservationErrorEnum.VideoReservationErrorH\x00\x12\x82\x01\n\x1dmulti_party_auth_review_error\x18\xc8\x01 \x01(\x0e\x32X.google.ads.googleads.v25.errors.MultiPartyAuthReviewErrorEnum.MultiPartyAuthReviewErrorH\x00\x42\x0c\n\nerror_code\"\xb3\x01\n\rErrorLocation\x12\\\n\x13\x66ield_path_elements\x18\x02 \x03(\x0b\x32?.google.ads.googleads.v25.errors.ErrorLocation.FieldPathElement\x1a\x44\n\x10\x46ieldPathElement\x12\x12\n\nfield_name\x18\x01 \x01(\t\x12\x12\n\x05index\x18\x03 \x01(\x05H\x00\x88\x01\x01\x42\x08\n\x06_index\"\xc5\x05\n\x0c\x45rrorDetails\x12\x1e\n\x16unpublished_error_code\x18\x01 \x01(\t\x12Y\n\x18policy_violation_details\x18\x02 \x01(\x0b\x32\x37.google.ads.googleads.v25.errors.PolicyViolationDetails\x12U\n\x16policy_finding_details\x18\x03 \x01(\x0b\x32\x35.google.ads.googleads.v25.errors.PolicyFindingDetails\x12O\n\x13quota_error_details\x18\x04 \x01(\x0b\x32\x32.google.ads.googleads.v25.errors.QuotaErrorDetails\x12U\n\x16resource_count_details\x18\x05 \x01(\x0b\x32\x35.google.ads.googleads.v25.errors.ResourceCountDetails\x12n\n$budget_per_day_minimum_error_details\x18\x06 \x01(\x0b\x32@.google.ads.googleads.v25.errors.BudgetPerDayMinimumErrorDetails\x12[\n\x19reservation_error_details\x18\x07 \x01(\x0b\x32\x38.google.ads.googleads.v25.errors.ReservationErrorDetails\x12n\n#incompatible_clo_goal_error_details\x18\x08 \x01(\x0b\x32\x41.google.ads.googleads.v25.errors.IncompatibleCloGoalsErrorDetails\"\xb4\x01\n\x16PolicyViolationDetails\x12#\n\x1b\x65xternal_policy_description\x18\x02 \x01(\t\x12@\n\x03key\x18\x04 \x01(\x0b\x32\x33.google.ads.googleads.v25.common.PolicyViolationKey\x12\x1c\n\x14\x65xternal_policy_name\x18\x05 \x01(\t\x12\x15\n\ris_exemptible\x18\x06 \x01(\x08\"g\n\x14PolicyFindingDetails\x12O\n\x14policy_topic_entries\x18\x01 \x03(\x0b\x32\x31.google.ads.googleads.v25.common.PolicyTopicEntry\"\xf9\x01\n\x11QuotaErrorDetails\x12U\n\nrate_scope\x18\x01 \x01(\x0e\x32\x41.google.ads.googleads.v25.errors.QuotaErrorDetails.QuotaRateScope\x12\x11\n\trate_name\x18\x02 \x01(\t\x12.\n\x0bretry_delay\x18\x03 \x01(\x0b\x32\x19.google.protobuf.Duration\"J\n\x0eQuotaRateScope\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x0b\n\x07UNKNOWN\x10\x01\x12\x0b\n\x07\x41\x43\x43OUNT\x10\x02\x12\r\n\tDEVELOPER\x10\x03\"\xcc\x01\n\x14ResourceCountDetails\x12\x14\n\x0c\x65nclosing_id\x18\x01 \x01(\t\x12\x1a\n\x12\x65nclosing_resource\x18\x05 \x01(\t\x12\r\n\x05limit\x18\x02 \x01(\x05\x12[\n\nlimit_type\x18\x03 \x01(\x0e\x32G.google.ads.googleads.v25.enums.ResourceLimitTypeEnum.ResourceLimitType\x12\x16\n\x0e\x65xisting_count\x18\x04 \x01(\x05\"\x81\x02\n\x1f\x42udgetPerDayMinimumErrorDetails\x12\x15\n\rcurrency_code\x18\x01 \x01(\t\x12%\n\x1d\x62udget_per_day_minimum_micros\x18\x02 \x01(\x03\x12$\n\x1cminimum_budget_amount_micros\x18\x03 \x01(\x03\x12*\n\"minimum_budget_total_amount_micros\x18\x04 \x01(\x03\x12#\n\x1b\x66\x61iled_budget_amount_micros\x18\x05 \x01(\x03\x12)\n!failed_budget_total_amount_micros\x18\x06 \x01(\x03\"\x8f\x01\n\x17ReservationErrorDetails\x12\x10\n\x08\x63\x61mpaign\x18\x01 \x01(\t\x12I\n\x06quotes\x18\x02 \x03(\x0b\x32\x39.google.ads.googleads.v25.common.CampaignReservationQuote\x12\x17\n\x0fquote_signature\x18\x03 \x01(\t\"\xca\x02\n IncompatibleCloGoalsErrorDetails\x12\x91\x01\n\x12\x63lo_goal_sub_type1\x18\x01 \x01(\x0e\x32u.google.ads.googleads.v25.enums.CustomerLifecycleOptimizationGoalSubTypeEnum.CustomerLifecycleOptimizationGoalSubType\x12\x91\x01\n\x12\x63lo_goal_sub_type2\x18\x02 \x01(\x0e\x32u.google.ads.googleads.v25.enums.CustomerLifecycleOptimizationGoalSubTypeEnum.CustomerLifecycleOptimizationGoalSubTypeB\xeb\x01\n#com.google.ads.googleads.v25.errorsB\x0b\x45rrorsProtoP\x01ZEgoogle.golang.org/genproto/googleapis/ads/googleads/v25/errors;errors\xa2\x02\x03GAA\xaa\x02\x1fGoogle.Ads.GoogleAds.V25.Errors\xca\x02\x1fGoogle\\Ads\\GoogleAds\\V25\\Errors\xea\x02#Google::Ads::GoogleAds::V25::Errorsb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Errors + GoogleAdsFailure = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.errors.GoogleAdsFailure").msgclass + GoogleAdsError = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.errors.GoogleAdsError").msgclass + ErrorCode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.errors.ErrorCode").msgclass + ErrorLocation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.errors.ErrorLocation").msgclass + ErrorLocation::FieldPathElement = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.errors.ErrorLocation.FieldPathElement").msgclass + ErrorDetails = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.errors.ErrorDetails").msgclass + PolicyViolationDetails = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.errors.PolicyViolationDetails").msgclass + PolicyFindingDetails = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.errors.PolicyFindingDetails").msgclass + QuotaErrorDetails = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.errors.QuotaErrorDetails").msgclass + QuotaErrorDetails::QuotaRateScope = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.errors.QuotaErrorDetails.QuotaRateScope").enummodule + ResourceCountDetails = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.errors.ResourceCountDetails").msgclass + BudgetPerDayMinimumErrorDetails = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.errors.BudgetPerDayMinimumErrorDetails").msgclass + ReservationErrorDetails = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.errors.ReservationErrorDetails").msgclass + IncompatibleCloGoalsErrorDetails = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.errors.IncompatibleCloGoalsErrorDetails").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/errors/experiment_arm_error_pb.rb b/lib/google/ads/google_ads/v25/errors/experiment_arm_error_pb.rb new file mode 100644 index 000000000..65fb0eb4f --- /dev/null +++ b/lib/google/ads/google_ads/v25/errors/experiment_arm_error_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/errors/experiment_arm_error.proto + +require 'google/protobuf' + + +descriptor_data = "\n:google/ads/googleads/v25/errors/experiment_arm_error.proto\x12\x1fgoogle.ads.googleads.v25.errors\"\xb9\x08\n\x16\x45xperimentArmErrorEnum\"\x9e\x08\n\x12\x45xperimentArmError\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x0b\n\x07UNKNOWN\x10\x01\x12\'\n#EXPERIMENT_ARM_COUNT_LIMIT_EXCEEDED\x10\x02\x12\x1b\n\x17INVALID_CAMPAIGN_STATUS\x10\x03\x12!\n\x1d\x44UPLICATE_EXPERIMENT_ARM_NAME\x10\x04\x12%\n!CANNOT_SET_TREATMENT_ARM_CAMPAIGN\x10\x05\x12\x1e\n\x1a\x43\x41NNOT_MODIFY_CAMPAIGN_IDS\x10\x06\x12-\n)CANNOT_MODIFY_CAMPAIGN_WITHOUT_SUFFIX_SET\x10\x07\x12+\n\'CANNOT_MUTATE_TRAFFIC_SPLIT_AFTER_START\x10\x08\x12*\n&CANNOT_ADD_CAMPAIGN_WITH_SHARED_BUDGET\x10\t\x12*\n&CANNOT_ADD_CAMPAIGN_WITH_CUSTOM_BUDGET\x10\n\x12\x34\n0CANNOT_ADD_CAMPAIGNS_WITH_DYNAMIC_ASSETS_ENABLED\x10\x0b\x12\x35\n1UNSUPPORTED_CAMPAIGN_ADVERTISING_CHANNEL_SUB_TYPE\x10\x0c\x12,\n(CANNOT_ADD_BASE_CAMPAIGN_WITH_DATE_RANGE\x10\r\x12\x31\n-BIDDING_STRATEGY_NOT_SUPPORTED_IN_EXPERIMENTS\x10\x0e\x12\x30\n,TRAFFIC_SPLIT_NOT_SUPPORTED_FOR_CHANNEL_TYPE\x10\x0f\x12\x1d\n\x19\x42UDGET_MUST_NOT_BE_SHARED\x10\x10\x12<\n8ADOPT_AI_MAX_CAMPAIGN_MISSING_PERFORMANCE_SEARCH_ENABLED\x10\x11\x12(\n$TOO_MANY_CAMPAIGNS_IN_EXPERIMENT_ARM\x10\x12\x12\x41\n=CANNOT_ADD_CAMPAIGN_WITH_TARGET_ROAS_TOLERANCE_PERCENT_MILLIS\x10\x13\x12:\n6CANNOT_HAVE_SAME_CAMPAIGN_CROSS_ARMS_IN_ONE_EXPERIMENT\x10\x14\x12$\n SEARCH_PLUS_CAMPAIGN_NOT_ALLOWED\x10\x15\x12-\n)DUPLICATE_ASSET_GROUP_ASSETS_BETWEEN_ARMS\x10\x16\x12+\n\'DUPLICATE_ASSET_GROUP_ASSETS_IN_ONE_ARM\x10\x17\x42\xf7\x01\n#com.google.ads.googleads.v25.errorsB\x17\x45xperimentArmErrorProtoP\x01ZEgoogle.golang.org/genproto/googleapis/ads/googleads/v25/errors;errors\xa2\x02\x03GAA\xaa\x02\x1fGoogle.Ads.GoogleAds.V25.Errors\xca\x02\x1fGoogle\\Ads\\GoogleAds\\V25\\Errors\xea\x02#Google::Ads::GoogleAds::V25::Errorsb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Errors + ExperimentArmErrorEnum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.errors.ExperimentArmErrorEnum").msgclass + ExperimentArmErrorEnum::ExperimentArmError = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.errors.ExperimentArmErrorEnum.ExperimentArmError").enummodule + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/errors/experiment_error_pb.rb b/lib/google/ads/google_ads/v25/errors/experiment_error_pb.rb new file mode 100644 index 000000000..7f64c6fe2 --- /dev/null +++ b/lib/google/ads/google_ads/v25/errors/experiment_error_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/errors/experiment_error.proto + +require 'google/protobuf' + + +descriptor_data = "\n6google/ads/googleads/v25/errors/experiment_error.proto\x12\x1fgoogle.ads.googleads.v25.errors\"\xa2\n\n\x13\x45xperimentErrorEnum\"\x8a\n\n\x0f\x45xperimentError\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x0b\n\x07UNKNOWN\x10\x01\x12!\n\x1d\x43\x41NNOT_SET_START_DATE_IN_PAST\x10\x02\x12\x1e\n\x1a\x45ND_DATE_BEFORE_START_DATE\x10\x03\x12 \n\x1cSTART_DATE_TOO_FAR_IN_FUTURE\x10\x04\x12\x1d\n\x19\x44UPLICATE_EXPERIMENT_NAME\x10\x05\x12$\n CANNOT_MODIFY_REMOVED_EXPERIMENT\x10\x06\x12\x1d\n\x19START_DATE_ALREADY_PASSED\x10\x07\x12\x1f\n\x1b\x43\x41NNOT_SET_END_DATE_IN_PAST\x10\x08\x12 \n\x1c\x43\x41NNOT_SET_STATUS_TO_REMOVED\x10\t\x12\x1f\n\x1b\x43\x41NNOT_MODIFY_PAST_END_DATE\x10\n\x12\x12\n\x0eINVALID_STATUS\x10\x0b\x12!\n\x1dINVALID_CAMPAIGN_CHANNEL_TYPE\x10\x0c\x12&\n\"OVERLAPPING_MEMBERS_AND_DATE_RANGE\x10\r\x12#\n\x1fINVALID_TRIAL_ARM_TRAFFIC_SPLIT\x10\x0e\x12\x1d\n\x19TRAFFIC_SPLIT_OVERLAPPING\x10\x0f\x12\x45\nASUM_TRIAL_ARM_TRAFFIC_UNEQUALS_TO_TRIAL_TRAFFIC_SPLIT_DENOMINATOR\x10\x10\x12+\n\'CANNOT_MODIFY_TRAFFIC_SPLIT_AFTER_START\x10\x11\x12\x18\n\x14\x45XPERIMENT_NOT_FOUND\x10\x12\x12\x1e\n\x1a\x45XPERIMENT_NOT_YET_STARTED\x10\x13\x12%\n!CANNOT_HAVE_MULTIPLE_CONTROL_ARMS\x10\x14\x12\x1f\n\x1bIN_DESIGN_CAMPAIGNS_NOT_SET\x10\x15\x12\"\n\x1e\x43\x41NNOT_SET_STATUS_TO_GRADUATED\x10\x16\x12\x38\n4CANNOT_CREATE_EXPERIMENT_CAMPAIGN_WITH_SHARED_BUDGET\x10\x17\x12\x38\n4CANNOT_CREATE_EXPERIMENT_CAMPAIGN_WITH_CUSTOM_BUDGET\x10\x18\x12\x1d\n\x19STATUS_TRANSITION_INVALID\x10\x19\x12&\n\"DUPLICATE_EXPERIMENT_CAMPAIGN_NAME\x10\x1a\x12(\n$CANNOT_REMOVE_IN_CREATION_EXPERIMENT\x10\x1b\x12\x30\n,CANNOT_ADD_CAMPAIGN_WITH_DEPRECATED_AD_TYPES\x10\x1c\x12\x36\n2CANNOT_ENABLE_SYNC_FOR_UNSUPPORTED_EXPERIMENT_TYPE\x10\x1d\x12&\n\"INVALID_DURATION_FOR_AN_EXPERIMENT\x10\x1e\x12\x35\n1MISSING_EU_POLITICAL_ADVERTISING_SELF_DECLARATION\x10\x1f\x12\x1b\n\x17MISSING_EXPERIMENT_ARMS\x10 \x12$\n MISSING_VIDEO_EXPERIMENT_SUBTYPE\x10\"B\xf4\x01\n#com.google.ads.googleads.v25.errorsB\x14\x45xperimentErrorProtoP\x01ZEgoogle.golang.org/genproto/googleapis/ads/googleads/v25/errors;errors\xa2\x02\x03GAA\xaa\x02\x1fGoogle.Ads.GoogleAds.V25.Errors\xca\x02\x1fGoogle\\Ads\\GoogleAds\\V25\\Errors\xea\x02#Google::Ads::GoogleAds::V25::Errorsb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Errors + ExperimentErrorEnum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.errors.ExperimentErrorEnum").msgclass + ExperimentErrorEnum::ExperimentError = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.errors.ExperimentErrorEnum.ExperimentError").enummodule + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/errors/extension_feed_item_error_pb.rb b/lib/google/ads/google_ads/v25/errors/extension_feed_item_error_pb.rb new file mode 100644 index 000000000..6abbedab8 --- /dev/null +++ b/lib/google/ads/google_ads/v25/errors/extension_feed_item_error_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/errors/extension_feed_item_error.proto + +require 'google/protobuf' + + +descriptor_data = "\n?google/ads/googleads/v25/errors/extension_feed_item_error.proto\x12\x1fgoogle.ads.googleads.v25.errors\"\xf6\r\n\x1a\x45xtensionFeedItemErrorEnum\"\xd7\r\n\x16\x45xtensionFeedItemError\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x0b\n\x07UNKNOWN\x10\x01\x12\x16\n\x12VALUE_OUT_OF_RANGE\x10\x02\x12\x15\n\x11URL_LIST_TOO_LONG\x10\x03\x12\x32\n.CANNOT_HAVE_RESTRICTION_ON_EMPTY_GEO_TARGETING\x10\x04\x12\x1e\n\x1a\x43\x41NNOT_SET_WITH_FINAL_URLS\x10\x05\x12!\n\x1d\x43\x41NNOT_SET_WITHOUT_FINAL_URLS\x10\x06\x12\x18\n\x14INVALID_PHONE_NUMBER\x10\x07\x12*\n&PHONE_NUMBER_NOT_SUPPORTED_FOR_COUNTRY\x10\x08\x12-\n)CARRIER_SPECIFIC_SHORT_NUMBER_NOT_ALLOWED\x10\t\x12#\n\x1fPREMIUM_RATE_NUMBER_NOT_ALLOWED\x10\n\x12\x1a\n\x16\x44ISALLOWED_NUMBER_TYPE\x10\x0b\x12(\n$INVALID_DOMESTIC_PHONE_NUMBER_FORMAT\x10\x0c\x12#\n\x1fVANITY_PHONE_NUMBER_NOT_ALLOWED\x10\r\x12\"\n\x1eINVALID_CALL_CONVERSION_ACTION\x10\x0e\x12.\n*CUSTOMER_NOT_ON_ALLOWLIST_FOR_CALLTRACKING\x10/\x12*\n&CALLTRACKING_NOT_SUPPORTED_FOR_COUNTRY\x10\x10\x12\x30\n,CUSTOMER_CONSENT_FOR_CALL_RECORDING_REQUIRED\x10\x11\x12\x12\n\x0eINVALID_APP_ID\x10\x12\x12&\n\"QUOTES_IN_REVIEW_EXTENSION_SNIPPET\x10\x13\x12\'\n#HYPHENS_IN_REVIEW_EXTENSION_SNIPPET\x10\x14\x12&\n\"REVIEW_EXTENSION_SOURCE_INELIGIBLE\x10\x15\x12(\n$SOURCE_NAME_IN_REVIEW_EXTENSION_TEXT\x10\x16\x12\x1f\n\x1bINCONSISTENT_CURRENCY_CODES\x10\x17\x12*\n&PRICE_EXTENSION_HAS_DUPLICATED_HEADERS\x10\x18\x12\x34\n0PRICE_ITEM_HAS_DUPLICATED_HEADER_AND_DESCRIPTION\x10\x19\x12%\n!PRICE_EXTENSION_HAS_TOO_FEW_ITEMS\x10\x1a\x12&\n\"PRICE_EXTENSION_HAS_TOO_MANY_ITEMS\x10\x1b\x12\x15\n\x11UNSUPPORTED_VALUE\x10\x1c\x12*\n&UNSUPPORTED_VALUE_IN_SELECTED_LANGUAGE\x10\x1d\x12\x1d\n\x19INVALID_DEVICE_PREFERENCE\x10\x1e\x12\x18\n\x14INVALID_SCHEDULE_END\x10\x1f\x12*\n&DATE_TIME_MUST_BE_IN_ACCOUNT_TIME_ZONE\x10 \x12\x1b\n\x17INVALID_SNIPPETS_HEADER\x10!\x12\'\n#CANNOT_OPERATE_ON_REMOVED_FEED_ITEM\x10\"\x12<\n8PHONE_NUMBER_NOT_SUPPORTED_WITH_CALLTRACKING_FOR_COUNTRY\x10#\x12(\n$CONFLICTING_CALL_CONVERSION_SETTINGS\x10$\x12\x1b\n\x17\x45XTENSION_TYPE_MISMATCH\x10%\x12\x1e\n\x1a\x45XTENSION_SUBTYPE_REQUIRED\x10&\x12\x1e\n\x1a\x45XTENSION_TYPE_UNSUPPORTED\x10\'\x12\x31\n-CANNOT_OPERATE_ON_FEED_WITH_MULTIPLE_MAPPINGS\x10(\x12.\n*CANNOT_OPERATE_ON_FEED_WITH_KEY_ATTRIBUTES\x10)\x12\x18\n\x14INVALID_PRICE_FORMAT\x10*\x12\x1a\n\x16PROMOTION_INVALID_TIME\x10+\x12%\n!TOO_MANY_DECIMAL_PLACES_SPECIFIED\x10,\x12$\n CONCRETE_EXTENSION_TYPE_REQUIRED\x10-\x12 \n\x1cSCHEDULE_END_NOT_AFTER_START\x10.B\xfb\x01\n#com.google.ads.googleads.v25.errorsB\x1b\x45xtensionFeedItemErrorProtoP\x01ZEgoogle.golang.org/genproto/googleapis/ads/googleads/v25/errors;errors\xa2\x02\x03GAA\xaa\x02\x1fGoogle.Ads.GoogleAds.V25.Errors\xca\x02\x1fGoogle\\Ads\\GoogleAds\\V25\\Errors\xea\x02#Google::Ads::GoogleAds::V25::Errorsb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Errors + ExtensionFeedItemErrorEnum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.errors.ExtensionFeedItemErrorEnum").msgclass + ExtensionFeedItemErrorEnum::ExtensionFeedItemError = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.errors.ExtensionFeedItemErrorEnum.ExtensionFeedItemError").enummodule + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/errors/extension_setting_error_pb.rb b/lib/google/ads/google_ads/v25/errors/extension_setting_error_pb.rb new file mode 100644 index 000000000..76b02d34e --- /dev/null +++ b/lib/google/ads/google_ads/v25/errors/extension_setting_error_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/errors/extension_setting_error.proto + +require 'google/protobuf' + + +descriptor_data = "\n=google/ads/googleads/v25/errors/extension_setting_error.proto\x12\x1fgoogle.ads.googleads.v25.errors\"\xae\x14\n\x19\x45xtensionSettingErrorEnum\"\x90\x14\n\x15\x45xtensionSettingError\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x0b\n\x07UNKNOWN\x10\x01\x12\x17\n\x13\x45XTENSIONS_REQUIRED\x10\x02\x12%\n!FEED_TYPE_EXTENSION_TYPE_MISMATCH\x10\x03\x12\x15\n\x11INVALID_FEED_TYPE\x10\x04\x12\x34\n0INVALID_FEED_TYPE_FOR_CUSTOMER_EXTENSION_SETTING\x10\x05\x12%\n!CANNOT_CHANGE_FEED_ITEM_ON_CREATE\x10\x06\x12)\n%CANNOT_UPDATE_NEWLY_CREATED_EXTENSION\x10\x07\x12\x33\n/NO_EXISTING_AD_GROUP_EXTENSION_SETTING_FOR_TYPE\x10\x08\x12\x33\n/NO_EXISTING_CAMPAIGN_EXTENSION_SETTING_FOR_TYPE\x10\t\x12\x33\n/NO_EXISTING_CUSTOMER_EXTENSION_SETTING_FOR_TYPE\x10\n\x12-\n)AD_GROUP_EXTENSION_SETTING_ALREADY_EXISTS\x10\x0b\x12-\n)CAMPAIGN_EXTENSION_SETTING_ALREADY_EXISTS\x10\x0c\x12-\n)CUSTOMER_EXTENSION_SETTING_ALREADY_EXISTS\x10\r\x12\x35\n1AD_GROUP_FEED_ALREADY_EXISTS_FOR_PLACEHOLDER_TYPE\x10\x0e\x12\x35\n1CAMPAIGN_FEED_ALREADY_EXISTS_FOR_PLACEHOLDER_TYPE\x10\x0f\x12\x35\n1CUSTOMER_FEED_ALREADY_EXISTS_FOR_PLACEHOLDER_TYPE\x10\x10\x12\x16\n\x12VALUE_OUT_OF_RANGE\x10\x11\x12$\n CANNOT_SET_FIELD_WITH_FINAL_URLS\x10\x12\x12\x16\n\x12\x46INAL_URLS_NOT_SET\x10\x13\x12\x18\n\x14INVALID_PHONE_NUMBER\x10\x14\x12*\n&PHONE_NUMBER_NOT_SUPPORTED_FOR_COUNTRY\x10\x15\x12-\n)CARRIER_SPECIFIC_SHORT_NUMBER_NOT_ALLOWED\x10\x16\x12#\n\x1fPREMIUM_RATE_NUMBER_NOT_ALLOWED\x10\x17\x12\x1a\n\x16\x44ISALLOWED_NUMBER_TYPE\x10\x18\x12(\n$INVALID_DOMESTIC_PHONE_NUMBER_FORMAT\x10\x19\x12#\n\x1fVANITY_PHONE_NUMBER_NOT_ALLOWED\x10\x1a\x12\x18\n\x14INVALID_COUNTRY_CODE\x10\x1b\x12#\n\x1fINVALID_CALL_CONVERSION_TYPE_ID\x10\x1c\x12.\n*CUSTOMER_NOT_IN_ALLOWLIST_FOR_CALLTRACKING\x10\x45\x12*\n&CALLTRACKING_NOT_SUPPORTED_FOR_COUNTRY\x10\x1e\x12\x12\n\x0eINVALID_APP_ID\x10\x1f\x12&\n\"QUOTES_IN_REVIEW_EXTENSION_SNIPPET\x10 \x12\'\n#HYPHENS_IN_REVIEW_EXTENSION_SNIPPET\x10!\x12(\n$REVIEW_EXTENSION_SOURCE_NOT_ELIGIBLE\x10\"\x12(\n$SOURCE_NAME_IN_REVIEW_EXTENSION_TEXT\x10#\x12\x11\n\rMISSING_FIELD\x10$\x12\x1f\n\x1bINCONSISTENT_CURRENCY_CODES\x10%\x12*\n&PRICE_EXTENSION_HAS_DUPLICATED_HEADERS\x10&\x12\x34\n0PRICE_ITEM_HAS_DUPLICATED_HEADER_AND_DESCRIPTION\x10\'\x12%\n!PRICE_EXTENSION_HAS_TOO_FEW_ITEMS\x10(\x12&\n\"PRICE_EXTENSION_HAS_TOO_MANY_ITEMS\x10)\x12\x15\n\x11UNSUPPORTED_VALUE\x10*\x12\x1d\n\x19INVALID_DEVICE_PREFERENCE\x10+\x12\x18\n\x14INVALID_SCHEDULE_END\x10-\x12*\n&DATE_TIME_MUST_BE_IN_ACCOUNT_TIME_ZONE\x10/\x12%\n!OVERLAPPING_SCHEDULES_NOT_ALLOWED\x10\x30\x12 \n\x1cSCHEDULE_END_NOT_AFTER_START\x10\x31\x12\x1e\n\x1aTOO_MANY_SCHEDULES_PER_DAY\x10\x32\x12&\n\"DUPLICATE_EXTENSION_FEED_ITEM_EDIT\x10\x33\x12\x1b\n\x17INVALID_SNIPPETS_HEADER\x10\x34\x12<\n8PHONE_NUMBER_NOT_SUPPORTED_WITH_CALLTRACKING_FOR_COUNTRY\x10\x35\x12\x1f\n\x1b\x43\x41MPAIGN_TARGETING_MISMATCH\x10\x36\x12\"\n\x1e\x43\x41NNOT_OPERATE_ON_REMOVED_FEED\x10\x37\x12\x1b\n\x17\x45XTENSION_TYPE_REQUIRED\x10\x38\x12-\n)INCOMPATIBLE_UNDERLYING_MATCHING_FUNCTION\x10\x39\x12\x1d\n\x19START_DATE_AFTER_END_DATE\x10:\x12\x18\n\x14INVALID_PRICE_FORMAT\x10;\x12\x1a\n\x16PROMOTION_INVALID_TIME\x10<\x12<\n8PROMOTION_CANNOT_SET_PERCENT_DISCOUNT_AND_MONEY_DISCOUNT\x10=\x12>\n:PROMOTION_CANNOT_SET_PROMOTION_CODE_AND_ORDERS_OVER_AMOUNT\x10>\x12%\n!TOO_MANY_DECIMAL_PLACES_SPECIFIED\x10?\x12\x19\n\x15INVALID_LANGUAGE_CODE\x10@\x12\x18\n\x14UNSUPPORTED_LANGUAGE\x10\x41\x12\x30\n,CUSTOMER_CONSENT_FOR_CALL_RECORDING_REQUIRED\x10\x42\x12&\n\"EXTENSION_SETTING_UPDATE_IS_A_NOOP\x10\x43\x12\x13\n\x0f\x44ISALLOWED_TEXT\x10\x44\x42\xfa\x01\n#com.google.ads.googleads.v25.errorsB\x1a\x45xtensionSettingErrorProtoP\x01ZEgoogle.golang.org/genproto/googleapis/ads/googleads/v25/errors;errors\xa2\x02\x03GAA\xaa\x02\x1fGoogle.Ads.GoogleAds.V25.Errors\xca\x02\x1fGoogle\\Ads\\GoogleAds\\V25\\Errors\xea\x02#Google::Ads::GoogleAds::V25::Errorsb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Errors + ExtensionSettingErrorEnum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.errors.ExtensionSettingErrorEnum").msgclass + ExtensionSettingErrorEnum::ExtensionSettingError = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.errors.ExtensionSettingErrorEnum.ExtensionSettingError").enummodule + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/errors/feed_attribute_reference_error_pb.rb b/lib/google/ads/google_ads/v25/errors/feed_attribute_reference_error_pb.rb new file mode 100644 index 000000000..74ec4b734 --- /dev/null +++ b/lib/google/ads/google_ads/v25/errors/feed_attribute_reference_error_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/errors/feed_attribute_reference_error.proto + +require 'google/protobuf' + + +descriptor_data = "\nDgoogle/ads/googleads/v25/errors/feed_attribute_reference_error.proto\x12\x1fgoogle.ads.googleads.v25.errors\"\xba\x01\n\x1f\x46\x65\x65\x64\x41ttributeReferenceErrorEnum\"\x96\x01\n\x1b\x46\x65\x65\x64\x41ttributeReferenceError\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x0b\n\x07UNKNOWN\x10\x01\x12!\n\x1d\x43\x41NNOT_REFERENCE_REMOVED_FEED\x10\x02\x12\x15\n\x11INVALID_FEED_NAME\x10\x03\x12\x1f\n\x1bINVALID_FEED_ATTRIBUTE_NAME\x10\x04\x42\x80\x02\n#com.google.ads.googleads.v25.errorsB FeedAttributeReferenceErrorProtoP\x01ZEgoogle.golang.org/genproto/googleapis/ads/googleads/v25/errors;errors\xa2\x02\x03GAA\xaa\x02\x1fGoogle.Ads.GoogleAds.V25.Errors\xca\x02\x1fGoogle\\Ads\\GoogleAds\\V25\\Errors\xea\x02#Google::Ads::GoogleAds::V25::Errorsb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Errors + FeedAttributeReferenceErrorEnum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.errors.FeedAttributeReferenceErrorEnum").msgclass + FeedAttributeReferenceErrorEnum::FeedAttributeReferenceError = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.errors.FeedAttributeReferenceErrorEnum.FeedAttributeReferenceError").enummodule + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/errors/feed_error_pb.rb b/lib/google/ads/google_ads/v25/errors/feed_error_pb.rb new file mode 100644 index 000000000..38e3627de --- /dev/null +++ b/lib/google/ads/google_ads/v25/errors/feed_error_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/errors/feed_error.proto + +require 'google/protobuf' + + +descriptor_data = "\n0google/ads/googleads/v25/errors/feed_error.proto\x12\x1fgoogle.ads.googleads.v25.errors\"\xeb\x06\n\rFeedErrorEnum\"\xd9\x06\n\tFeedError\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x0b\n\x07UNKNOWN\x10\x01\x12\x1e\n\x1a\x41TTRIBUTE_NAMES_NOT_UNIQUE\x10\x02\x12/\n+ATTRIBUTES_DO_NOT_MATCH_EXISTING_ATTRIBUTES\x10\x03\x12.\n*CANNOT_SPECIFY_USER_ORIGIN_FOR_SYSTEM_FEED\x10\x04\x12\x34\n0CANNOT_SPECIFY_GOOGLE_ORIGIN_FOR_NON_SYSTEM_FEED\x10\x05\x12\x32\n.CANNOT_SPECIFY_FEED_ATTRIBUTES_FOR_SYSTEM_FEED\x10\x06\x12\x34\n0CANNOT_UPDATE_FEED_ATTRIBUTES_WITH_ORIGIN_GOOGLE\x10\x07\x12\x10\n\x0c\x46\x45\x45\x44_REMOVED\x10\x08\x12\x18\n\x14INVALID_ORIGIN_VALUE\x10\t\x12\x1b\n\x17\x46\x45\x45\x44_ORIGIN_IS_NOT_USER\x10\n\x12 \n\x1cINVALID_AUTH_TOKEN_FOR_EMAIL\x10\x0b\x12\x11\n\rINVALID_EMAIL\x10\x0c\x12\x17\n\x13\x44UPLICATE_FEED_NAME\x10\r\x12\x15\n\x11INVALID_FEED_NAME\x10\x0e\x12\x16\n\x12MISSING_OAUTH_INFO\x10\x0f\x12.\n*NEW_ATTRIBUTE_CANNOT_BE_PART_OF_UNIQUE_KEY\x10\x10\x12\x17\n\x13TOO_MANY_ATTRIBUTES\x10\x11\x12\x1c\n\x18INVALID_BUSINESS_ACCOUNT\x10\x12\x12\x33\n/BUSINESS_ACCOUNT_CANNOT_ACCESS_LOCATION_ACCOUNT\x10\x13\x12\x1e\n\x1aINVALID_AFFILIATE_CHAIN_ID\x10\x14\x12\x19\n\x15\x44UPLICATE_SYSTEM_FEED\x10\x15\x12\x14\n\x10GMB_ACCESS_ERROR\x10\x16\x12\x35\n1CANNOT_HAVE_LOCATION_AND_AFFILIATE_LOCATION_FEEDS\x10\x17\x12#\n\x1fLEGACY_EXTENSION_TYPE_READ_ONLY\x10\x18\x42\xee\x01\n#com.google.ads.googleads.v25.errorsB\x0e\x46\x65\x65\x64\x45rrorProtoP\x01ZEgoogle.golang.org/genproto/googleapis/ads/googleads/v25/errors;errors\xa2\x02\x03GAA\xaa\x02\x1fGoogle.Ads.GoogleAds.V25.Errors\xca\x02\x1fGoogle\\Ads\\GoogleAds\\V25\\Errors\xea\x02#Google::Ads::GoogleAds::V25::Errorsb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Errors + FeedErrorEnum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.errors.FeedErrorEnum").msgclass + FeedErrorEnum::FeedError = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.errors.FeedErrorEnum.FeedError").enummodule + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/errors/feed_item_error_pb.rb b/lib/google/ads/google_ads/v25/errors/feed_item_error_pb.rb new file mode 100644 index 000000000..f53a35fa4 --- /dev/null +++ b/lib/google/ads/google_ads/v25/errors/feed_item_error_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/errors/feed_item_error.proto + +require 'google/protobuf' + + +descriptor_data = "\n5google/ads/googleads/v25/errors/feed_item_error.proto\x12\x1fgoogle.ads.googleads.v25.errors\"\xa7\x03\n\x11\x46\x65\x65\x64ItemErrorEnum\"\x91\x03\n\rFeedItemError\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x0b\n\x07UNKNOWN\x10\x01\x12.\n*CANNOT_CONVERT_ATTRIBUTE_VALUE_FROM_STRING\x10\x02\x12\'\n#CANNOT_OPERATE_ON_REMOVED_FEED_ITEM\x10\x03\x12*\n&DATE_TIME_MUST_BE_IN_ACCOUNT_TIME_ZONE\x10\x04\x12\x1c\n\x18KEY_ATTRIBUTES_NOT_FOUND\x10\x05\x12\x0f\n\x0bINVALID_URL\x10\x06\x12\x1a\n\x16MISSING_KEY_ATTRIBUTES\x10\x07\x12\x1d\n\x19KEY_ATTRIBUTES_NOT_UNIQUE\x10\x08\x12%\n!CANNOT_MODIFY_KEY_ATTRIBUTE_VALUE\x10\t\x12,\n(SIZE_TOO_LARGE_FOR_MULTI_VALUE_ATTRIBUTE\x10\n\x12\x1e\n\x1aLEGACY_FEED_TYPE_READ_ONLY\x10\x0b\x42\xf2\x01\n#com.google.ads.googleads.v25.errorsB\x12\x46\x65\x65\x64ItemErrorProtoP\x01ZEgoogle.golang.org/genproto/googleapis/ads/googleads/v25/errors;errors\xa2\x02\x03GAA\xaa\x02\x1fGoogle.Ads.GoogleAds.V25.Errors\xca\x02\x1fGoogle\\Ads\\GoogleAds\\V25\\Errors\xea\x02#Google::Ads::GoogleAds::V25::Errorsb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Errors + FeedItemErrorEnum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.errors.FeedItemErrorEnum").msgclass + FeedItemErrorEnum::FeedItemError = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.errors.FeedItemErrorEnum.FeedItemError").enummodule + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/errors/feed_item_set_error_pb.rb b/lib/google/ads/google_ads/v25/errors/feed_item_set_error_pb.rb new file mode 100644 index 000000000..dec44e38b --- /dev/null +++ b/lib/google/ads/google_ads/v25/errors/feed_item_set_error_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/errors/feed_item_set_error.proto + +require 'google/protobuf' + + +descriptor_data = "\n9google/ads/googleads/v25/errors/feed_item_set_error.proto\x12\x1fgoogle.ads.googleads.v25.errors\"\xa0\x02\n\x14\x46\x65\x65\x64ItemSetErrorEnum\"\x87\x02\n\x10\x46\x65\x65\x64ItemSetError\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x0b\n\x07UNKNOWN\x10\x01\x12\x19\n\x15\x46\x45\x45\x44_ITEM_SET_REMOVED\x10\x02\x12\x1f\n\x1b\x43\x41NNOT_CLEAR_DYNAMIC_FILTER\x10\x03\x12 \n\x1c\x43\x41NNOT_CREATE_DYNAMIC_FILTER\x10\x04\x12\x15\n\x11INVALID_FEED_TYPE\x10\x05\x12\x12\n\x0e\x44UPLICATE_NAME\x10\x06\x12&\n\"WRONG_DYNAMIC_FILTER_FOR_FEED_TYPE\x10\x07\x12$\n DYNAMIC_FILTER_INVALID_CHAIN_IDS\x10\x08\x42\xf5\x01\n#com.google.ads.googleads.v25.errorsB\x15\x46\x65\x65\x64ItemSetErrorProtoP\x01ZEgoogle.golang.org/genproto/googleapis/ads/googleads/v25/errors;errors\xa2\x02\x03GAA\xaa\x02\x1fGoogle.Ads.GoogleAds.V25.Errors\xca\x02\x1fGoogle\\Ads\\GoogleAds\\V25\\Errors\xea\x02#Google::Ads::GoogleAds::V25::Errorsb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Errors + FeedItemSetErrorEnum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.errors.FeedItemSetErrorEnum").msgclass + FeedItemSetErrorEnum::FeedItemSetError = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.errors.FeedItemSetErrorEnum.FeedItemSetError").enummodule + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/errors/feed_item_set_link_error_pb.rb b/lib/google/ads/google_ads/v25/errors/feed_item_set_link_error_pb.rb new file mode 100644 index 000000000..03c83ed02 --- /dev/null +++ b/lib/google/ads/google_ads/v25/errors/feed_item_set_link_error_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/errors/feed_item_set_link_error.proto + +require 'google/protobuf' + + +descriptor_data = "\n>google/ads/googleads/v25/errors/feed_item_set_link_error.proto\x12\x1fgoogle.ads.googleads.v25.errors\"\x8d\x01\n\x18\x46\x65\x65\x64ItemSetLinkErrorEnum\"q\n\x14\x46\x65\x65\x64ItemSetLinkError\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x0b\n\x07UNKNOWN\x10\x01\x12\x14\n\x10\x46\x45\x45\x44_ID_MISMATCH\x10\x02\x12%\n!NO_MUTATE_ALLOWED_FOR_DYNAMIC_SET\x10\x03\x42\xf9\x01\n#com.google.ads.googleads.v25.errorsB\x19\x46\x65\x65\x64ItemSetLinkErrorProtoP\x01ZEgoogle.golang.org/genproto/googleapis/ads/googleads/v25/errors;errors\xa2\x02\x03GAA\xaa\x02\x1fGoogle.Ads.GoogleAds.V25.Errors\xca\x02\x1fGoogle\\Ads\\GoogleAds\\V25\\Errors\xea\x02#Google::Ads::GoogleAds::V25::Errorsb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Errors + FeedItemSetLinkErrorEnum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.errors.FeedItemSetLinkErrorEnum").msgclass + FeedItemSetLinkErrorEnum::FeedItemSetLinkError = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.errors.FeedItemSetLinkErrorEnum.FeedItemSetLinkError").enummodule + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/errors/feed_item_target_error_pb.rb b/lib/google/ads/google_ads/v25/errors/feed_item_target_error_pb.rb new file mode 100644 index 000000000..6253298b5 --- /dev/null +++ b/lib/google/ads/google_ads/v25/errors/feed_item_target_error_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/errors/feed_item_target_error.proto + +require 'google/protobuf' + + +descriptor_data = "\n\x12*\n&PRICE_EXTENSION_HAS_DUPLICATED_HEADERS\x10?\x12.\n*ITEM_HAS_DUPLICATED_HEADER_AND_DESCRIPTION\x10@\x12%\n!PRICE_EXTENSION_HAS_TOO_FEW_ITEMS\x10\x41\x12\x15\n\x11UNSUPPORTED_VALUE\x10\x42\x12\x1c\n\x18INVALID_FINAL_MOBILE_URL\x10\x43\x12%\n!INVALID_KEYWORDLESS_AD_RULE_LABEL\x10\x44\x12\'\n#VALUE_TRACK_PARAMETER_NOT_SUPPORTED\x10\x45\x12*\n&UNSUPPORTED_VALUE_IN_SELECTED_LANGUAGE\x10\x46\x12\x18\n\x14INVALID_IOS_APP_LINK\x10G\x12,\n(MISSING_IOS_APP_LINK_OR_IOS_APP_STORE_ID\x10H\x12\x1a\n\x16PROMOTION_INVALID_TIME\x10I\x12\x39\n5PROMOTION_CANNOT_SET_PERCENT_OFF_AND_MONEY_AMOUNT_OFF\x10J\x12>\n:PROMOTION_CANNOT_SET_PROMOTION_CODE_AND_ORDERS_OVER_AMOUNT\x10K\x12%\n!TOO_MANY_DECIMAL_PLACES_SPECIFIED\x10L\x12\x1e\n\x1a\x41\x44_CUSTOMIZERS_NOT_ALLOWED\x10M\x12\x19\n\x15INVALID_LANGUAGE_CODE\x10N\x12\x18\n\x14UNSUPPORTED_LANGUAGE\x10O\x12\x1b\n\x17IF_FUNCTION_NOT_ALLOWED\x10P\x12\x1c\n\x18INVALID_FINAL_URL_SUFFIX\x10Q\x12#\n\x1fINVALID_TAG_IN_FINAL_URL_SUFFIX\x10R\x12#\n\x1fINVALID_FINAL_URL_SUFFIX_FORMAT\x10S\x12\x30\n,CUSTOMER_CONSENT_FOR_CALL_RECORDING_REQUIRED\x10T\x12\'\n#ONLY_ONE_DELIVERY_OPTION_IS_ALLOWED\x10U\x12\x1d\n\x19NO_DELIVERY_OPTION_IS_SET\x10V\x12&\n\"INVALID_CONVERSION_REPORTING_STATE\x10W\x12\x14\n\x10IMAGE_SIZE_WRONG\x10X\x12+\n\'EMAIL_DELIVERY_NOT_AVAILABLE_IN_COUNTRY\x10Y\x12\'\n#AUTO_REPLY_NOT_AVAILABLE_IN_COUNTRY\x10Z\x12\x1a\n\x16INVALID_LATITUDE_VALUE\x10[\x12\x1b\n\x17INVALID_LONGITUDE_VALUE\x10\\\x12\x13\n\x0fTOO_MANY_LABELS\x10]\x12\x15\n\x11INVALID_IMAGE_URL\x10^\x12\x1a\n\x16MISSING_LATITUDE_VALUE\x10_\x12\x1b\n\x17MISSING_LONGITUDE_VALUE\x10`\x12\x15\n\x11\x41\x44\x44RESS_NOT_FOUND\x10\x61\x12\x1a\n\x16\x41\x44\x44RESS_NOT_TARGETABLE\x10\x62\x12\x14\n\x10INVALID_ASSET_ID\x10\x64\x12\x1b\n\x17INCOMPATIBLE_ASSET_TYPE\x10\x65\x12\x1f\n\x1bIMAGE_ERROR_UNEXPECTED_SIZE\x10\x66\x12(\n$IMAGE_ERROR_ASPECT_RATIO_NOT_ALLOWED\x10g\x12\x1e\n\x1aIMAGE_ERROR_FILE_TOO_LARGE\x10h\x12\"\n\x1eIMAGE_ERROR_FORMAT_NOT_ALLOWED\x10i\x12$\n IMAGE_ERROR_CONSTRAINTS_VIOLATED\x10j\x12\x1c\n\x18IMAGE_ERROR_SERVER_ERROR\x10kB\xfc\x01\n#com.google.ads.googleads.v25.errorsB\x1c\x46\x65\x65\x64ItemValidationErrorProtoP\x01ZEgoogle.golang.org/genproto/googleapis/ads/googleads/v25/errors;errors\xa2\x02\x03GAA\xaa\x02\x1fGoogle.Ads.GoogleAds.V25.Errors\xca\x02\x1fGoogle\\Ads\\GoogleAds\\V25\\Errors\xea\x02#Google::Ads::GoogleAds::V25::Errorsb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Errors + FeedItemValidationErrorEnum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.errors.FeedItemValidationErrorEnum").msgclass + FeedItemValidationErrorEnum::FeedItemValidationError = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.errors.FeedItemValidationErrorEnum.FeedItemValidationError").enummodule + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/errors/feed_mapping_error_pb.rb b/lib/google/ads/google_ads/v25/errors/feed_mapping_error_pb.rb new file mode 100644 index 000000000..3fd266a19 --- /dev/null +++ b/lib/google/ads/google_ads/v25/errors/feed_mapping_error_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/errors/feed_mapping_error.proto + +require 'google/protobuf' + + +descriptor_data = "\n8google/ads/googleads/v25/errors/feed_mapping_error.proto\x12\x1fgoogle.ads.googleads.v25.errors\"\xb2\x06\n\x14\x46\x65\x65\x64MappingErrorEnum\"\x99\x06\n\x10\x46\x65\x65\x64MappingError\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x0b\n\x07UNKNOWN\x10\x01\x12\x1d\n\x19INVALID_PLACEHOLDER_FIELD\x10\x02\x12\x1b\n\x17INVALID_CRITERION_FIELD\x10\x03\x12\x1c\n\x18INVALID_PLACEHOLDER_TYPE\x10\x04\x12\x1a\n\x16INVALID_CRITERION_TYPE\x10\x05\x12\x1f\n\x1bNO_ATTRIBUTE_FIELD_MAPPINGS\x10\x07\x12 \n\x1c\x46\x45\x45\x44_ATTRIBUTE_TYPE_MISMATCH\x10\x08\x12\x38\n4CANNOT_OPERATE_ON_MAPPINGS_FOR_SYSTEM_GENERATED_FEED\x10\t\x12*\n&MULTIPLE_MAPPINGS_FOR_PLACEHOLDER_TYPE\x10\n\x12(\n$MULTIPLE_MAPPINGS_FOR_CRITERION_TYPE\x10\x0b\x12+\n\'MULTIPLE_MAPPINGS_FOR_PLACEHOLDER_FIELD\x10\x0c\x12)\n%MULTIPLE_MAPPINGS_FOR_CRITERION_FIELD\x10\r\x12\'\n#UNEXPECTED_ATTRIBUTE_FIELD_MAPPINGS\x10\x0e\x12.\n*LOCATION_PLACEHOLDER_ONLY_FOR_PLACES_FEEDS\x10\x0f\x12)\n%CANNOT_MODIFY_MAPPINGS_FOR_TYPED_FEED\x10\x10\x12:\n6INVALID_PLACEHOLDER_TYPE_FOR_NON_SYSTEM_GENERATED_FEED\x10\x11\x12;\n7INVALID_PLACEHOLDER_TYPE_FOR_SYSTEM_GENERATED_FEED_TYPE\x10\x12\x12)\n%ATTRIBUTE_FIELD_MAPPING_MISSING_FIELD\x10\x13\x12\x1e\n\x1aLEGACY_FEED_TYPE_READ_ONLY\x10\x14\x42\xf5\x01\n#com.google.ads.googleads.v25.errorsB\x15\x46\x65\x65\x64MappingErrorProtoP\x01ZEgoogle.golang.org/genproto/googleapis/ads/googleads/v25/errors;errors\xa2\x02\x03GAA\xaa\x02\x1fGoogle.Ads.GoogleAds.V25.Errors\xca\x02\x1fGoogle\\Ads\\GoogleAds\\V25\\Errors\xea\x02#Google::Ads::GoogleAds::V25::Errorsb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Errors + FeedMappingErrorEnum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.errors.FeedMappingErrorEnum").msgclass + FeedMappingErrorEnum::FeedMappingError = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.errors.FeedMappingErrorEnum.FeedMappingError").enummodule + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/errors/field_error_pb.rb b/lib/google/ads/google_ads/v25/errors/field_error_pb.rb new file mode 100644 index 000000000..8860be5f2 --- /dev/null +++ b/lib/google/ads/google_ads/v25/errors/field_error_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/errors/field_error.proto + +require 'google/protobuf' + + +descriptor_data = "\n1google/ads/googleads/v25/errors/field_error.proto\x12\x1fgoogle.ads.googleads.v25.errors\"\xf7\x01\n\x0e\x46ieldErrorEnum\"\xe4\x01\n\nFieldError\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x0b\n\x07UNKNOWN\x10\x01\x12\x0c\n\x08REQUIRED\x10\x02\x12\x13\n\x0fIMMUTABLE_FIELD\x10\x03\x12\x11\n\rINVALID_VALUE\x10\x04\x12\x17\n\x13VALUE_MUST_BE_UNSET\x10\x05\x12\x1a\n\x16REQUIRED_NONEMPTY_LIST\x10\x06\x12\x1b\n\x17\x46IELD_CANNOT_BE_CLEARED\x10\x07\x12\x11\n\rBLOCKED_VALUE\x10\t\x12\x1d\n\x19\x46IELD_CAN_ONLY_BE_CLEARED\x10\nB\xef\x01\n#com.google.ads.googleads.v25.errorsB\x0f\x46ieldErrorProtoP\x01ZEgoogle.golang.org/genproto/googleapis/ads/googleads/v25/errors;errors\xa2\x02\x03GAA\xaa\x02\x1fGoogle.Ads.GoogleAds.V25.Errors\xca\x02\x1fGoogle\\Ads\\GoogleAds\\V25\\Errors\xea\x02#Google::Ads::GoogleAds::V25::Errorsb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Errors + FieldErrorEnum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.errors.FieldErrorEnum").msgclass + FieldErrorEnum::FieldError = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.errors.FieldErrorEnum.FieldError").enummodule + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/errors/field_mask_error_pb.rb b/lib/google/ads/google_ads/v25/errors/field_mask_error_pb.rb new file mode 100644 index 000000000..2f77f8582 --- /dev/null +++ b/lib/google/ads/google_ads/v25/errors/field_mask_error_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/errors/field_mask_error.proto + +require 'google/protobuf' + + +descriptor_data = "\n6google/ads/googleads/v25/errors/field_mask_error.proto\x12\x1fgoogle.ads.googleads.v25.errors\"\xa7\x01\n\x12\x46ieldMaskErrorEnum\"\x90\x01\n\x0e\x46ieldMaskError\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x0b\n\x07UNKNOWN\x10\x01\x12\x16\n\x12\x46IELD_MASK_MISSING\x10\x05\x12\x1a\n\x16\x46IELD_MASK_NOT_ALLOWED\x10\x04\x12\x13\n\x0f\x46IELD_NOT_FOUND\x10\x02\x12\x17\n\x13\x46IELD_HAS_SUBFIELDS\x10\x03\x42\xf3\x01\n#com.google.ads.googleads.v25.errorsB\x13\x46ieldMaskErrorProtoP\x01ZEgoogle.golang.org/genproto/googleapis/ads/googleads/v25/errors;errors\xa2\x02\x03GAA\xaa\x02\x1fGoogle.Ads.GoogleAds.V25.Errors\xca\x02\x1fGoogle\\Ads\\GoogleAds\\V25\\Errors\xea\x02#Google::Ads::GoogleAds::V25::Errorsb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Errors + FieldMaskErrorEnum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.errors.FieldMaskErrorEnum").msgclass + FieldMaskErrorEnum::FieldMaskError = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.errors.FieldMaskErrorEnum.FieldMaskError").enummodule + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/errors/final_url_expansion_asset_view_error_pb.rb b/lib/google/ads/google_ads/v25/errors/final_url_expansion_asset_view_error_pb.rb new file mode 100644 index 000000000..7f0ea53af --- /dev/null +++ b/lib/google/ads/google_ads/v25/errors/final_url_expansion_asset_view_error_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/errors/final_url_expansion_asset_view_error.proto + +require 'google/protobuf' + + +descriptor_data = "\nJgoogle/ads/googleads/v25/errors/final_url_expansion_asset_view_error.proto\x12\x1fgoogle.ads.googleads.v25.errors\"\xaa\x03\n#FinalUrlExpansionAssetViewErrorEnum\"\x82\x03\n\x1f\x46inalUrlExpansionAssetViewError\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x0b\n\x07UNKNOWN\x10\x01\x12\x1b\n\x17MISSING_REQUIRED_FILTER\x10\x02\x12,\n(REQUIRES_ADVERTISING_CHANNEL_TYPE_FILTER\x10\x03\x12.\n*INVALID_ADVERTISING_CHANNEL_TYPE_IN_FILTER\x10\x04\x12\x1d\n\x19\x43\x41NNOT_SELECT_ASSET_GROUP\x10\x05\x12\x1a\n\x16\x43\x41NNOT_SELECT_AD_GROUP\x10\x06\x12&\n\"REQUIRES_FILTER_BY_SINGLE_RESOURCE\x10\x07\x12/\n+CANNOT_SELECT_BOTH_AD_GROUP_AND_ASSET_GROUP\x10\x08\x12\x32\n.CANNOT_FILTER_BY_BOTH_AD_GROUP_AND_ASSET_GROUP\x10\tB\x84\x02\n#com.google.ads.googleads.v25.errorsB$FinalUrlExpansionAssetViewErrorProtoP\x01ZEgoogle.golang.org/genproto/googleapis/ads/googleads/v25/errors;errors\xa2\x02\x03GAA\xaa\x02\x1fGoogle.Ads.GoogleAds.V25.Errors\xca\x02\x1fGoogle\\Ads\\GoogleAds\\V25\\Errors\xea\x02#Google::Ads::GoogleAds::V25::Errorsb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Errors + FinalUrlExpansionAssetViewErrorEnum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.errors.FinalUrlExpansionAssetViewErrorEnum").msgclass + FinalUrlExpansionAssetViewErrorEnum::FinalUrlExpansionAssetViewError = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.errors.FinalUrlExpansionAssetViewErrorEnum.FinalUrlExpansionAssetViewError").enummodule + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/errors/function_error_pb.rb b/lib/google/ads/google_ads/v25/errors/function_error_pb.rb new file mode 100644 index 000000000..1fe3f21ad --- /dev/null +++ b/lib/google/ads/google_ads/v25/errors/function_error_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/errors/function_error.proto + +require 'google/protobuf' + + +descriptor_data = "\n4google/ads/googleads/v25/errors/function_error.proto\x12\x1fgoogle.ads.googleads.v25.errors\"\xc1\x04\n\x11\x46unctionErrorEnum\"\xab\x04\n\rFunctionError\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x0b\n\x07UNKNOWN\x10\x01\x12\x1b\n\x17INVALID_FUNCTION_FORMAT\x10\x02\x12\x16\n\x12\x44\x41TA_TYPE_MISMATCH\x10\x03\x12 \n\x1cINVALID_CONJUNCTION_OPERANDS\x10\x04\x12\x1e\n\x1aINVALID_NUMBER_OF_OPERANDS\x10\x05\x12\x18\n\x14INVALID_OPERAND_TYPE\x10\x06\x12\x14\n\x10INVALID_OPERATOR\x10\x07\x12 \n\x1cINVALID_REQUEST_CONTEXT_TYPE\x10\x08\x12)\n%INVALID_FUNCTION_FOR_CALL_PLACEHOLDER\x10\t\x12$\n INVALID_FUNCTION_FOR_PLACEHOLDER\x10\n\x12\x13\n\x0fINVALID_OPERAND\x10\x0b\x12\"\n\x1eMISSING_CONSTANT_OPERAND_VALUE\x10\x0c\x12\"\n\x1eINVALID_CONSTANT_OPERAND_VALUE\x10\r\x12\x13\n\x0fINVALID_NESTING\x10\x0e\x12#\n\x1fMULTIPLE_FEED_IDS_NOT_SUPPORTED\x10\x0f\x12/\n+INVALID_FUNCTION_FOR_FEED_WITH_FIXED_SCHEMA\x10\x10\x12\x1a\n\x16INVALID_ATTRIBUTE_NAME\x10\x11\x42\xf2\x01\n#com.google.ads.googleads.v25.errorsB\x12\x46unctionErrorProtoP\x01ZEgoogle.golang.org/genproto/googleapis/ads/googleads/v25/errors;errors\xa2\x02\x03GAA\xaa\x02\x1fGoogle.Ads.GoogleAds.V25.Errors\xca\x02\x1fGoogle\\Ads\\GoogleAds\\V25\\Errors\xea\x02#Google::Ads::GoogleAds::V25::Errorsb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Errors + FunctionErrorEnum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.errors.FunctionErrorEnum").msgclass + FunctionErrorEnum::FunctionError = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.errors.FunctionErrorEnum.FunctionError").enummodule + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/errors/function_parsing_error_pb.rb b/lib/google/ads/google_ads/v25/errors/function_parsing_error_pb.rb new file mode 100644 index 000000000..e842b23b3 --- /dev/null +++ b/lib/google/ads/google_ads/v25/errors/function_parsing_error_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/errors/function_parsing_error.proto + +require 'google/protobuf' + + +descriptor_data = "\n\x12$\n BAD_RESOURCE_TYPE_IN_FROM_CLAUSE\x10-\x12\x0e\n\nBAD_SYMBOL\x10\x02\x12\r\n\tBAD_VALUE\x10\x04\x12\x17\n\x13\x44\x41TE_RANGE_TOO_WIDE\x10$\x12\x19\n\x15\x44\x41TE_RANGE_TOO_NARROW\x10<\x12\x10\n\x0c\x45XPECTED_AND\x10\x1e\x12\x0f\n\x0b\x45XPECTED_BY\x10\x0e\x12-\n)EXPECTED_DIMENSION_FIELD_IN_SELECT_CLAUSE\x10%\x12\"\n\x1e\x45XPECTED_FILTERS_ON_DATE_RANGE\x10\x37\x12\x11\n\rEXPECTED_FROM\x10,\x12\x11\n\rEXPECTED_LIST\x10)\x12.\n*EXPECTED_REFERENCED_FIELD_IN_SELECT_CLAUSE\x10\x10\x12\x13\n\x0f\x45XPECTED_SELECT\x10\r\x12\x19\n\x15\x45XPECTED_SINGLE_VALUE\x10*\x12(\n$EXPECTED_VALUE_WITH_BETWEEN_OPERATOR\x10\x1d\x12\x17\n\x13INVALID_DATE_FORMAT\x10&\x12\x1e\n\x1aMISALIGNED_DATE_FOR_FILTER\x10@\x12\x18\n\x14INVALID_STRING_VALUE\x10\x39\x12\'\n#INVALID_VALUE_WITH_BETWEEN_OPERATOR\x10\x1a\x12&\n\"INVALID_VALUE_WITH_DURING_OPERATOR\x10\x16\x12$\n INVALID_VALUE_WITH_LIKE_OPERATOR\x10\x38\x12\x1b\n\x17OPERATOR_FIELD_MISMATCH\x10#\x12&\n\"PROHIBITED_EMPTY_LIST_IN_CONDITION\x10\x1c\x12\x1c\n\x18PROHIBITED_ENUM_CONSTANT\x10\x36\x12\x31\n-PROHIBITED_FIELD_COMBINATION_IN_SELECT_CLAUSE\x10\x1f\x12\'\n#PROHIBITED_FIELD_IN_ORDER_BY_CLAUSE\x10(\x12%\n!PROHIBITED_FIELD_IN_SELECT_CLAUSE\x10\x17\x12$\n PROHIBITED_FIELD_IN_WHERE_CLAUSE\x10\x18\x12+\n\'PROHIBITED_RESOURCE_TYPE_IN_FROM_CLAUSE\x10+\x12-\n)PROHIBITED_RESOURCE_TYPE_IN_SELECT_CLAUSE\x10\x30\x12,\n(PROHIBITED_RESOURCE_TYPE_IN_WHERE_CLAUSE\x10:\x12/\n+PROHIBITED_METRIC_IN_SELECT_OR_WHERE_CLAUSE\x10\x31\x12\x30\n,PROHIBITED_SEGMENT_IN_SELECT_OR_WHERE_CLAUSE\x10\x33\x12<\n8PROHIBITED_SEGMENT_WITH_METRIC_IN_SELECT_OR_WHERE_CLAUSE\x10\x35\x12+\n\'PROHIBITED_FIELD_OR_SEGMENT_WITH_METRIC\x10\x41\x12\x17\n\x13LIMIT_VALUE_TOO_LOW\x10\x19\x12 \n\x1cPROHIBITED_NEWLINE_IN_STRING\x10\x08\x12(\n$PROHIBITED_VALUE_COMBINATION_IN_LIST\x10\n\x12\x36\n2PROHIBITED_VALUE_COMBINATION_WITH_BETWEEN_OPERATOR\x10\x15\x12\x19\n\x15STRING_NOT_TERMINATED\x10\x06\x12\x15\n\x11TOO_MANY_SEGMENTS\x10\"\x12\x1b\n\x17UNEXPECTED_END_OF_QUERY\x10\t\x12\x1a\n\x16UNEXPECTED_FROM_CLAUSE\x10/\x12\x16\n\x12UNRECOGNIZED_FIELD\x10 \x12\x14\n\x10UNEXPECTED_INPUT\x10\x0b\x12!\n\x1dREQUESTED_METRICS_FOR_MANAGER\x10;\x12\x1e\n\x1a\x46ILTER_HAS_TOO_MANY_VALUES\x10?\x12\"\n\x1eREQUIRED_SEGMENT_FIELD_MISSING\x10\x42\x42\xef\x01\n#com.google.ads.googleads.v25.errorsB\x0fQueryErrorProtoP\x01ZEgoogle.golang.org/genproto/googleapis/ads/googleads/v25/errors;errors\xa2\x02\x03GAA\xaa\x02\x1fGoogle.Ads.GoogleAds.V25.Errors\xca\x02\x1fGoogle\\Ads\\GoogleAds\\V25\\Errors\xea\x02#Google::Ads::GoogleAds::V25::Errorsb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Errors + QueryErrorEnum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.errors.QueryErrorEnum").msgclass + QueryErrorEnum::QueryError = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.errors.QueryErrorEnum.QueryError").enummodule + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/errors/quota_error_pb.rb b/lib/google/ads/google_ads/v25/errors/quota_error_pb.rb new file mode 100644 index 000000000..9dc26bba7 --- /dev/null +++ b/lib/google/ads/google_ads/v25/errors/quota_error_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/errors/quota_error.proto + +require 'google/protobuf' + + +descriptor_data = "\n1google/ads/googleads/v25/errors/quota_error.proto\x12\x1fgoogle.ads.googleads.v25.errors\"\xae\x02\n\x0eQuotaErrorEnum\"\x9b\x02\n\nQuotaError\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x0b\n\x07UNKNOWN\x10\x01\x12\x16\n\x12RESOURCE_EXHAUSTED\x10\x02\x12\x15\n\x11\x41\x43\x43\x45SS_PROHIBITED\x10\x03\x12\"\n\x1eRESOURCE_TEMPORARILY_EXHAUSTED\x10\x04\x12\x33\n/EXCESSIVE_SHORT_TERM_QUERY_RESOURCE_CONSUMPTION\x10\x05\x12\x32\n.EXCESSIVE_LONG_TERM_QUERY_RESOURCE_CONSUMPTION\x10\x06\x12\x33\n/PAYMENTS_PROFILE_ACTIVATION_RATE_LIMIT_EXCEEDED\x10\x07\x42\xef\x01\n#com.google.ads.googleads.v25.errorsB\x0fQuotaErrorProtoP\x01ZEgoogle.golang.org/genproto/googleapis/ads/googleads/v25/errors;errors\xa2\x02\x03GAA\xaa\x02\x1fGoogle.Ads.GoogleAds.V25.Errors\xca\x02\x1fGoogle\\Ads\\GoogleAds\\V25\\Errors\xea\x02#Google::Ads::GoogleAds::V25::Errorsb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Errors + QuotaErrorEnum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.errors.QuotaErrorEnum").msgclass + QuotaErrorEnum::QuotaError = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.errors.QuotaErrorEnum.QuotaError").enummodule + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/errors/range_error_pb.rb b/lib/google/ads/google_ads/v25/errors/range_error_pb.rb new file mode 100644 index 000000000..1fbb920e2 --- /dev/null +++ b/lib/google/ads/google_ads/v25/errors/range_error_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/errors/range_error.proto + +require 'google/protobuf' + + +descriptor_data = "\n1google/ads/googleads/v25/errors/range_error.proto\x12\x1fgoogle.ads.googleads.v25.errors\"W\n\x0eRangeErrorEnum\"E\n\nRangeError\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x0b\n\x07UNKNOWN\x10\x01\x12\x0b\n\x07TOO_LOW\x10\x02\x12\x0c\n\x08TOO_HIGH\x10\x03\x42\xef\x01\n#com.google.ads.googleads.v25.errorsB\x0fRangeErrorProtoP\x01ZEgoogle.golang.org/genproto/googleapis/ads/googleads/v25/errors;errors\xa2\x02\x03GAA\xaa\x02\x1fGoogle.Ads.GoogleAds.V25.Errors\xca\x02\x1fGoogle\\Ads\\GoogleAds\\V25\\Errors\xea\x02#Google::Ads::GoogleAds::V25::Errorsb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Errors + RangeErrorEnum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.errors.RangeErrorEnum").msgclass + RangeErrorEnum::RangeError = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.errors.RangeErrorEnum.RangeError").enummodule + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/errors/reach_plan_error_pb.rb b/lib/google/ads/google_ads/v25/errors/reach_plan_error_pb.rb new file mode 100644 index 000000000..a54f28a6d --- /dev/null +++ b/lib/google/ads/google_ads/v25/errors/reach_plan_error_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/errors/reach_plan_error.proto + +require 'google/protobuf' + + +descriptor_data = "\n6google/ads/googleads/v25/errors/reach_plan_error.proto\x12\x1fgoogle.ads.googleads.v25.errors\"\xbd\x01\n\x12ReachPlanErrorEnum\"\xa6\x01\n\x0eReachPlanError\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x0b\n\x07UNKNOWN\x10\x01\x12!\n\x1dNOT_FORECASTABLE_MISSING_RATE\x10\x02\x12)\n%NOT_FORECASTABLE_NOT_ENOUGH_INVENTORY\x10\x03\x12(\n$NOT_FORECASTABLE_ACCOUNT_NOT_ENABLED\x10\x04\x42\xf3\x01\n#com.google.ads.googleads.v25.errorsB\x13ReachPlanErrorProtoP\x01ZEgoogle.golang.org/genproto/googleapis/ads/googleads/v25/errors;errors\xa2\x02\x03GAA\xaa\x02\x1fGoogle.Ads.GoogleAds.V25.Errors\xca\x02\x1fGoogle\\Ads\\GoogleAds\\V25\\Errors\xea\x02#Google::Ads::GoogleAds::V25::Errorsb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Errors + ReachPlanErrorEnum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.errors.ReachPlanErrorEnum").msgclass + ReachPlanErrorEnum::ReachPlanError = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.errors.ReachPlanErrorEnum.ReachPlanError").enummodule + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/errors/recommendation_error_pb.rb b/lib/google/ads/google_ads/v25/errors/recommendation_error_pb.rb new file mode 100644 index 000000000..36f75a813 --- /dev/null +++ b/lib/google/ads/google_ads/v25/errors/recommendation_error_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/errors/recommendation_error.proto + +require 'google/protobuf' + + +descriptor_data = "\n:google/ads/googleads/v25/errors/recommendation_error.proto\x12\x1fgoogle.ads.googleads.v25.errors\"\xb8\x10\n\x17RecommendationErrorEnum\"\x9c\x10\n\x13RecommendationError\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x0b\n\x07UNKNOWN\x10\x01\x12\x1b\n\x17\x42UDGET_AMOUNT_TOO_SMALL\x10\x02\x12\x1b\n\x17\x42UDGET_AMOUNT_TOO_LARGE\x10\x03\x12\x19\n\x15INVALID_BUDGET_AMOUNT\x10\x04\x12\x10\n\x0cPOLICY_ERROR\x10\x05\x12\x16\n\x12INVALID_BID_AMOUNT\x10\x06\x12\x19\n\x15\x41\x44GROUP_KEYWORD_LIMIT\x10\x07\x12\"\n\x1eRECOMMENDATION_ALREADY_APPLIED\x10\x08\x12\x1e\n\x1aRECOMMENDATION_INVALIDATED\x10\t\x12\x17\n\x13TOO_MANY_OPERATIONS\x10\n\x12\x11\n\rNO_OPERATIONS\x10\x0b\x12!\n\x1d\x44IFFERENT_TYPES_NOT_SUPPORTED\x10\x0c\x12\x1b\n\x17\x44UPLICATE_RESOURCE_NAME\x10\r\x12$\n RECOMMENDATION_ALREADY_DISMISSED\x10\x0e\x12\x19\n\x15INVALID_APPLY_REQUEST\x10\x0f\x12+\n\'RECOMMENDATION_TYPE_APPLY_NOT_SUPPORTED\x10\x11\x12\x16\n\x12INVALID_MULTIPLIER\x10\x12\x12\x33\n/ADVERTISING_CHANNEL_TYPE_GENERATE_NOT_SUPPORTED\x10\x13\x12.\n*RECOMMENDATION_TYPE_GENERATE_NOT_SUPPORTED\x10\x14\x12(\n$RECOMMENDATION_TYPES_CANNOT_BE_EMPTY\x10\x15\x12=\n9CAMPAIGN_BUDGET_RECOMMENDATION_TYPE_REQUIRES_BIDDING_INFO\x10\x16\x12\x46\nBCAMPAIGN_BUDGET_RECOMMENDATION_TYPE_REQUIRES_BIDDING_STRATEGY_TYPE\x10\x17\x12\x41\n=CAMPAIGN_BUDGET_RECOMMENDATION_TYPE_REQUIRES_ASSET_GROUP_INFO\x10\x18\x12P\nLCAMPAIGN_BUDGET_RECOMMENDATION_TYPE_REQUIRES_ASSET_GROUP_INFO_WITH_FINAL_URL\x10\x19\x12Q\nMCAMPAIGN_BUDGET_RECOMMENDATION_TYPE_REQUIRES_COUNTRY_CODES_FOR_SEARCH_CHANNEL\x10\x1a\x12O\nKCAMPAIGN_BUDGET_RECOMMENDATION_TYPE_INVALID_COUNTRY_CODE_FOR_SEARCH_CHANNEL\x10\x1b\x12R\nNCAMPAIGN_BUDGET_RECOMMENDATION_TYPE_REQUIRES_LANGUAGE_CODES_FOR_SEARCH_CHANNEL\x10\x1c\x12l\nhCAMPAIGN_BUDGET_RECOMMENDATION_TYPE_REQUIRES_EITHER_POSITIVE_OR_NEGATIVE_LOCATION_IDS_FOR_SEARCH_CHANNEL\x10\x1d\x12Q\nMCAMPAIGN_BUDGET_RECOMMENDATION_TYPE_REQUIRES_AD_GROUP_INFO_FOR_SEARCH_CHANNEL\x10\x1e\x12L\nHCAMPAIGN_BUDGET_RECOMMENDATION_TYPE_REQUIRES_KEYWORDS_FOR_SEARCH_CHANNEL\x10\x1f\x12\x85\x01\n\x80\x01\x43\x41MPAIGN_BUDGET_RECOMMENDATION_TYPE_WITH_CHANNEL_TYPE_SEARCH_AND_BIDDING_STRATEGY_TYPE_TARGET_IMPRESSION_SHARE_REQUIRES_LOCATION\x10 \x12\x9b\x01\n\x96\x01\x43\x41MPAIGN_BUDGET_RECOMMENDATION_TYPE_WITH_CHANNEL_TYPE_SEARCH_AND_BIDDING_STRATEGY_TYPE_TARGET_IMPRESSION_SHARE_REQUIRES_TARGET_IMPRESSION_SHARE_MICROS\x10!\x12\\\nXCAMPAIGN_BUDGET_RECOMMENDATION_TYPE_TARGET_IMPRESSION_SHARE_MICROS_BETWEEN_1_AND_1000000\x10\"\x12\x99\x01\n\x94\x01\x43\x41MPAIGN_BUDGET_RECOMMENDATION_TYPE_WITH_CHANNEL_TYPE_SEARCH_AND_BIDDING_STRATEGY_TYPE_TARGET_IMPRESSION_SHARE_REQUIRES_TARGET_IMPRESSION_SHARE_INFO\x10#\x12\x45\nAMERCHANT_CENTER_ACCOUNT_ID_NOT_SUPPORTED_ADVERTISING_CHANNEL_TYPE\x10$B\xf8\x01\n#com.google.ads.googleads.v25.errorsB\x18RecommendationErrorProtoP\x01ZEgoogle.golang.org/genproto/googleapis/ads/googleads/v25/errors;errors\xa2\x02\x03GAA\xaa\x02\x1fGoogle.Ads.GoogleAds.V25.Errors\xca\x02\x1fGoogle\\Ads\\GoogleAds\\V25\\Errors\xea\x02#Google::Ads::GoogleAds::V25::Errorsb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Errors + RecommendationErrorEnum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.errors.RecommendationErrorEnum").msgclass + RecommendationErrorEnum::RecommendationError = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.errors.RecommendationErrorEnum.RecommendationError").enummodule + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/errors/recommendation_subscription_error_pb.rb b/lib/google/ads/google_ads/v25/errors/recommendation_subscription_error_pb.rb new file mode 100644 index 000000000..a6e654ef7 --- /dev/null +++ b/lib/google/ads/google_ads/v25/errors/recommendation_subscription_error_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/errors/recommendation_subscription_error.proto + +require 'google/protobuf' + + +descriptor_data = "\nGgoogle/ads/googleads/v25/errors/recommendation_subscription_error.proto\x12\x1fgoogle.ads.googleads.v25.errors\"f\n#RecommendationSubscriptionErrorEnum\"?\n\x1fRecommendationSubscriptionError\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x0b\n\x07UNKNOWN\x10\x01\x42\x84\x02\n#com.google.ads.googleads.v25.errorsB$RecommendationSubscriptionErrorProtoP\x01ZEgoogle.golang.org/genproto/googleapis/ads/googleads/v25/errors;errors\xa2\x02\x03GAA\xaa\x02\x1fGoogle.Ads.GoogleAds.V25.Errors\xca\x02\x1fGoogle\\Ads\\GoogleAds\\V25\\Errors\xea\x02#Google::Ads::GoogleAds::V25::Errorsb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Errors + RecommendationSubscriptionErrorEnum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.errors.RecommendationSubscriptionErrorEnum").msgclass + RecommendationSubscriptionErrorEnum::RecommendationSubscriptionError = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.errors.RecommendationSubscriptionErrorEnum.RecommendationSubscriptionError").enummodule + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/errors/region_code_error_pb.rb b/lib/google/ads/google_ads/v25/errors/region_code_error_pb.rb new file mode 100644 index 000000000..39cf5123e --- /dev/null +++ b/lib/google/ads/google_ads/v25/errors/region_code_error_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/errors/region_code_error.proto + +require 'google/protobuf' + + +descriptor_data = "\n7google/ads/googleads/v25/errors/region_code_error.proto\x12\x1fgoogle.ads.googleads.v25.errors\"_\n\x13RegionCodeErrorEnum\"H\n\x0fRegionCodeError\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x0b\n\x07UNKNOWN\x10\x01\x12\x17\n\x13INVALID_REGION_CODE\x10\x02\x42\xf4\x01\n#com.google.ads.googleads.v25.errorsB\x14RegionCodeErrorProtoP\x01ZEgoogle.golang.org/genproto/googleapis/ads/googleads/v25/errors;errors\xa2\x02\x03GAA\xaa\x02\x1fGoogle.Ads.GoogleAds.V25.Errors\xca\x02\x1fGoogle\\Ads\\GoogleAds\\V25\\Errors\xea\x02#Google::Ads::GoogleAds::V25::Errorsb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Errors + RegionCodeErrorEnum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.errors.RegionCodeErrorEnum").msgclass + RegionCodeErrorEnum::RegionCodeError = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.errors.RegionCodeErrorEnum.RegionCodeError").enummodule + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/errors/request_error_pb.rb b/lib/google/ads/google_ads/v25/errors/request_error_pb.rb new file mode 100644 index 000000000..225d3de99 --- /dev/null +++ b/lib/google/ads/google_ads/v25/errors/request_error_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/errors/request_error.proto + +require 'google/protobuf' + + +descriptor_data = "\n3google/ads/googleads/v25/errors/request_error.proto\x12\x1fgoogle.ads.googleads.v25.errors\"\xae\x07\n\x10RequestErrorEnum\"\x99\x07\n\x0cRequestError\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x0b\n\x07UNKNOWN\x10\x01\x12\x19\n\x15RESOURCE_NAME_MISSING\x10\x03\x12\x1b\n\x17RESOURCE_NAME_MALFORMED\x10\x04\x12\x13\n\x0f\x42\x41\x44_RESOURCE_ID\x10\x11\x12\x17\n\x13INVALID_CUSTOMER_ID\x10\x10\x12\x16\n\x12OPERATION_REQUIRED\x10\x05\x12\x16\n\x12RESOURCE_NOT_FOUND\x10\x06\x12\x16\n\x12INVALID_PAGE_TOKEN\x10\x07\x12\x16\n\x12\x45XPIRED_PAGE_TOKEN\x10\x08\x12\x15\n\x11INVALID_PAGE_SIZE\x10\x16\x12\x1b\n\x17PAGE_SIZE_NOT_SUPPORTED\x10(\x12\x1a\n\x16REQUIRED_FIELD_MISSING\x10\t\x12\x13\n\x0fIMMUTABLE_FIELD\x10\x0b\x12\x1e\n\x1aTOO_MANY_MUTATE_OPERATIONS\x10\r\x12\x1e\n\x1aTOO_MANY_ACTION_OPERATIONS\x10)\x12)\n%CANNOT_BE_EXECUTED_BY_MANAGER_ACCOUNT\x10\x0e\x12\x1f\n\x1b\x43\x41NNOT_MODIFY_FOREIGN_FIELD\x10\x0f\x12\x16\n\x12INVALID_ENUM_VALUE\x10\x12\x12%\n!DEVELOPER_TOKEN_PARAMETER_MISSING\x10\x13\x12\'\n#LOGIN_CUSTOMER_ID_PARAMETER_MISSING\x10\x14\x12(\n$VALIDATE_ONLY_REQUEST_HAS_PAGE_TOKEN\x10\x15\x12\x39\n5CANNOT_RETURN_SUMMARY_ROW_FOR_REQUEST_WITHOUT_METRICS\x10\x1d\x12\x38\n4CANNOT_RETURN_SUMMARY_ROW_FOR_VALIDATE_ONLY_REQUESTS\x10\x1e\x12)\n%INCONSISTENT_RETURN_SUMMARY_ROW_VALUE\x10\x1f\x12\x30\n,TOTAL_RESULTS_COUNT_NOT_ORIGINALLY_REQUESTED\x10 \x12\x1a\n\x16RPC_DEADLINE_TOO_SHORT\x10!\x12\x17\n\x13UNSUPPORTED_VERSION\x10&\x12\x1b\n\x17\x43LOUD_PROJECT_NOT_FOUND\x10\'B\xf1\x01\n#com.google.ads.googleads.v25.errorsB\x11RequestErrorProtoP\x01ZEgoogle.golang.org/genproto/googleapis/ads/googleads/v25/errors;errors\xa2\x02\x03GAA\xaa\x02\x1fGoogle.Ads.GoogleAds.V25.Errors\xca\x02\x1fGoogle\\Ads\\GoogleAds\\V25\\Errors\xea\x02#Google::Ads::GoogleAds::V25::Errorsb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Errors + RequestErrorEnum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.errors.RequestErrorEnum").msgclass + RequestErrorEnum::RequestError = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.errors.RequestErrorEnum.RequestError").enummodule + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/errors/resource_access_denied_error_pb.rb b/lib/google/ads/google_ads/v25/errors/resource_access_denied_error_pb.rb new file mode 100644 index 000000000..31015a51c --- /dev/null +++ b/lib/google/ads/google_ads/v25/errors/resource_access_denied_error_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/errors/resource_access_denied_error.proto + +require 'google/protobuf' + + +descriptor_data = "\nBgoogle/ads/googleads/v25/errors/resource_access_denied_error.proto\x12\x1fgoogle.ads.googleads.v25.errors\"s\n\x1dResourceAccessDeniedErrorEnum\"R\n\x19ResourceAccessDeniedError\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x0b\n\x07UNKNOWN\x10\x01\x12\x17\n\x13WRITE_ACCESS_DENIED\x10\x03\x42\xfe\x01\n#com.google.ads.googleads.v25.errorsB\x1eResourceAccessDeniedErrorProtoP\x01ZEgoogle.golang.org/genproto/googleapis/ads/googleads/v25/errors;errors\xa2\x02\x03GAA\xaa\x02\x1fGoogle.Ads.GoogleAds.V25.Errors\xca\x02\x1fGoogle\\Ads\\GoogleAds\\V25\\Errors\xea\x02#Google::Ads::GoogleAds::V25::Errorsb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Errors + ResourceAccessDeniedErrorEnum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.errors.ResourceAccessDeniedErrorEnum").msgclass + ResourceAccessDeniedErrorEnum::ResourceAccessDeniedError = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.errors.ResourceAccessDeniedErrorEnum.ResourceAccessDeniedError").enummodule + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/errors/resource_count_limit_exceeded_error_pb.rb b/lib/google/ads/google_ads/v25/errors/resource_count_limit_exceeded_error_pb.rb new file mode 100644 index 000000000..293568a17 --- /dev/null +++ b/lib/google/ads/google_ads/v25/errors/resource_count_limit_exceeded_error_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/errors/resource_count_limit_exceeded_error.proto + +require 'google/protobuf' + + +descriptor_data = "\nIgoogle/ads/googleads/v25/errors/resource_count_limit_exceeded_error.proto\x12\x1fgoogle.ads.googleads.v25.errors\"\xbe\x02\n#ResourceCountLimitExceededErrorEnum\"\x96\x02\n\x1fResourceCountLimitExceededError\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x0b\n\x07UNKNOWN\x10\x01\x12\x11\n\rACCOUNT_LIMIT\x10\x02\x12\x12\n\x0e\x43\x41MPAIGN_LIMIT\x10\x03\x12\x11\n\rADGROUP_LIMIT\x10\x04\x12\x15\n\x11\x41\x44_GROUP_AD_LIMIT\x10\x05\x12\x1c\n\x18\x41\x44_GROUP_CRITERION_LIMIT\x10\x06\x12\x14\n\x10SHARED_SET_LIMIT\x10\x07\x12\x1b\n\x17MATCHING_FUNCTION_LIMIT\x10\x08\x12\x1f\n\x1bRESPONSE_ROW_LIMIT_EXCEEDED\x10\t\x12\x12\n\x0eRESOURCE_LIMIT\x10\nB\x84\x02\n#com.google.ads.googleads.v25.errorsB$ResourceCountLimitExceededErrorProtoP\x01ZEgoogle.golang.org/genproto/googleapis/ads/googleads/v25/errors;errors\xa2\x02\x03GAA\xaa\x02\x1fGoogle.Ads.GoogleAds.V25.Errors\xca\x02\x1fGoogle\\Ads\\GoogleAds\\V25\\Errors\xea\x02#Google::Ads::GoogleAds::V25::Errorsb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Errors + ResourceCountLimitExceededErrorEnum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.errors.ResourceCountLimitExceededErrorEnum").msgclass + ResourceCountLimitExceededErrorEnum::ResourceCountLimitExceededError = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.errors.ResourceCountLimitExceededErrorEnum.ResourceCountLimitExceededError").enummodule + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/errors/search_term_insight_error_pb.rb b/lib/google/ads/google_ads/v25/errors/search_term_insight_error_pb.rb new file mode 100644 index 000000000..354db6ac5 --- /dev/null +++ b/lib/google/ads/google_ads/v25/errors/search_term_insight_error_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/errors/search_term_insight_error.proto + +require 'google/protobuf' + + +descriptor_data = "\n?google/ads/googleads/v25/errors/search_term_insight_error.proto\x12\x1fgoogle.ads.googleads.v25.errors\"\xc1\x02\n\x1aSearchTermInsightErrorEnum\"\xa2\x02\n\x16SearchTermInsightError\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x0b\n\x07UNKNOWN\x10\x01\x12\'\n#FILTERING_NOT_ALLOWED_WITH_SEGMENTS\x10\x02\x12#\n\x1fLIMIT_NOT_ALLOWED_WITH_SEGMENTS\x10\x03\x12\"\n\x1eMISSING_FIELD_IN_SELECT_CLAUSE\x10\x04\x12&\n\"REQUIRES_FILTER_BY_SINGLE_RESOURCE\x10\x05\x12%\n!SORTING_NOT_ALLOWED_WITH_SEGMENTS\x10\x06\x12)\n%SUMMARY_ROW_NOT_ALLOWED_WITH_SEGMENTS\x10\x07\x42\xfb\x01\n#com.google.ads.googleads.v25.errorsB\x1bSearchTermInsightErrorProtoP\x01ZEgoogle.golang.org/genproto/googleapis/ads/googleads/v25/errors;errors\xa2\x02\x03GAA\xaa\x02\x1fGoogle.Ads.GoogleAds.V25.Errors\xca\x02\x1fGoogle\\Ads\\GoogleAds\\V25\\Errors\xea\x02#Google::Ads::GoogleAds::V25::Errorsb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Errors + SearchTermInsightErrorEnum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.errors.SearchTermInsightErrorEnum").msgclass + SearchTermInsightErrorEnum::SearchTermInsightError = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.errors.SearchTermInsightErrorEnum.SearchTermInsightError").enummodule + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/errors/setting_error_pb.rb b/lib/google/ads/google_ads/v25/errors/setting_error_pb.rb new file mode 100644 index 000000000..41c066d0f --- /dev/null +++ b/lib/google/ads/google_ads/v25/errors/setting_error_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/errors/setting_error.proto + +require 'google/protobuf' + + +descriptor_data = "\n3google/ads/googleads/v25/errors/setting_error.proto\x12\x1fgoogle.ads.googleads.v25.errors\"\xb7\x06\n\x10SettingErrorEnum\"\xa2\x06\n\x0cSettingError\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x0b\n\x07UNKNOWN\x10\x01\x12!\n\x1dSETTING_TYPE_IS_NOT_AVAILABLE\x10\x03\x12\x30\n,SETTING_TYPE_IS_NOT_COMPATIBLE_WITH_CAMPAIGN\x10\x04\x12;\n7TARGETING_SETTING_CONTAINS_INVALID_CRITERION_TYPE_GROUP\x10\x05\x12Q\nMTARGETING_SETTING_DEMOGRAPHIC_CRITERION_TYPE_GROUPS_MUST_BE_SET_TO_TARGET_ALL\x10\x06\x12\\\nXTARGETING_SETTING_CANNOT_CHANGE_TARGET_ALL_TO_FALSE_FOR_DEMOGRAPHIC_CRITERION_TYPE_GROUP\x10\x07\x12\x43\n?DYNAMIC_SEARCH_ADS_SETTING_AT_LEAST_ONE_FEED_ID_MUST_BE_PRESENT\x10\x08\x12;\n7DYNAMIC_SEARCH_ADS_SETTING_CONTAINS_INVALID_DOMAIN_NAME\x10\t\x12\x36\n2DYNAMIC_SEARCH_ADS_SETTING_CONTAINS_SUBDOMAIN_NAME\x10\n\x12=\n9DYNAMIC_SEARCH_ADS_SETTING_CONTAINS_INVALID_LANGUAGE_CODE\x10\x0b\x12>\n:TARGET_ALL_IS_NOT_ALLOWED_FOR_PLACEMENT_IN_SEARCH_CAMPAIGN\x10\x0c\x12.\n*SETTING_VALUE_NOT_COMPATIBLE_WITH_CAMPAIGN\x10\x14\x12H\nDBID_ONLY_IS_NOT_ALLOWED_TO_BE_MODIFIED_WITH_CUSTOMER_MATCH_TARGETING\x10\x15\x42\xf1\x01\n#com.google.ads.googleads.v25.errorsB\x11SettingErrorProtoP\x01ZEgoogle.golang.org/genproto/googleapis/ads/googleads/v25/errors;errors\xa2\x02\x03GAA\xaa\x02\x1fGoogle.Ads.GoogleAds.V25.Errors\xca\x02\x1fGoogle\\Ads\\GoogleAds\\V25\\Errors\xea\x02#Google::Ads::GoogleAds::V25::Errorsb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Errors + SettingErrorEnum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.errors.SettingErrorEnum").msgclass + SettingErrorEnum::SettingError = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.errors.SettingErrorEnum.SettingError").enummodule + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/errors/shareable_preview_error_pb.rb b/lib/google/ads/google_ads/v25/errors/shareable_preview_error_pb.rb new file mode 100644 index 000000000..d2f4e1cab --- /dev/null +++ b/lib/google/ads/google_ads/v25/errors/shareable_preview_error_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/errors/shareable_preview_error.proto + +require 'google/protobuf' + + +descriptor_data = "\n=google/ads/googleads/v25/errors/shareable_preview_error.proto\x12\x1fgoogle.ads.googleads.v25.errors\"\x8e\x01\n\x19ShareablePreviewErrorEnum\"q\n\x15ShareablePreviewError\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x0b\n\x07UNKNOWN\x10\x01\x12\x17\n\x13UNSUPPORTED_AD_TYPE\x10\x04\x12!\n\x1dTOO_MANY_RESOURCES_IN_REQUEST\x10\x06\x42\xfa\x01\n#com.google.ads.googleads.v25.errorsB\x1aShareablePreviewErrorProtoP\x01ZEgoogle.golang.org/genproto/googleapis/ads/googleads/v25/errors;errors\xa2\x02\x03GAA\xaa\x02\x1fGoogle.Ads.GoogleAds.V25.Errors\xca\x02\x1fGoogle\\Ads\\GoogleAds\\V25\\Errors\xea\x02#Google::Ads::GoogleAds::V25::Errorsb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Errors + ShareablePreviewErrorEnum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.errors.ShareablePreviewErrorEnum").msgclass + ShareablePreviewErrorEnum::ShareablePreviewError = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.errors.ShareablePreviewErrorEnum.ShareablePreviewError").enummodule + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/errors/shared_criterion_error_pb.rb b/lib/google/ads/google_ads/v25/errors/shared_criterion_error_pb.rb new file mode 100644 index 000000000..21cdbef2f --- /dev/null +++ b/lib/google/ads/google_ads/v25/errors/shared_criterion_error_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/errors/shared_criterion_error.proto + +require 'google/protobuf' + + +descriptor_data = "\n\n:CONVERSION_TRACKING_NOT_ENABLED_OR_NOT_MCC_MANAGER_ACCOUNT\x10\x05\x12-\n)TOO_MANY_USER_LISTS_FOR_THE_CUSTOMER_TYPE\x10\x06\x42\xfe\x01\n#com.google.ads.googleads.v25.errorsB\x1eUserListCustomerTypeErrorProtoP\x01ZEgoogle.golang.org/genproto/googleapis/ads/googleads/v25/errors;errors\xa2\x02\x03GAA\xaa\x02\x1fGoogle.Ads.GoogleAds.V25.Errors\xca\x02\x1fGoogle\\Ads\\GoogleAds\\V25\\Errors\xea\x02#Google::Ads::GoogleAds::V25::Errorsb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Errors + UserListCustomerTypeErrorEnum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.errors.UserListCustomerTypeErrorEnum").msgclass + UserListCustomerTypeErrorEnum::UserListCustomerTypeError = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.errors.UserListCustomerTypeErrorEnum.UserListCustomerTypeError").enummodule + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/errors/user_list_error_pb.rb b/lib/google/ads/google_ads/v25/errors/user_list_error_pb.rb new file mode 100644 index 000000000..eb42f3ee2 --- /dev/null +++ b/lib/google/ads/google_ads/v25/errors/user_list_error_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/errors/user_list_error.proto + +require 'google/protobuf' + + +descriptor_data = "\n5google/ads/googleads/v25/errors/user_list_error.proto\x12\x1fgoogle.ads.googleads.v25.errors\"\xfb\x0c\n\x11UserListErrorEnum\"\xe5\x0c\n\rUserListError\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x0b\n\x07UNKNOWN\x10\x01\x12\x37\n3EXTERNAL_REMARKETING_USER_LIST_MUTATE_NOT_SUPPORTED\x10\x02\x12\x1a\n\x16\x43ONCRETE_TYPE_REQUIRED\x10\x03\x12\x1f\n\x1b\x43ONVERSION_TYPE_ID_REQUIRED\x10\x04\x12\x1e\n\x1a\x44UPLICATE_CONVERSION_TYPES\x10\x05\x12\x1b\n\x17INVALID_CONVERSION_TYPE\x10\x06\x12\x17\n\x13INVALID_DESCRIPTION\x10\x07\x12\x10\n\x0cINVALID_NAME\x10\x08\x12\x10\n\x0cINVALID_TYPE\x10\t\x12\x34\n0CAN_NOT_ADD_LOGICAL_LIST_AS_LOGICAL_LIST_OPERAND\x10\n\x12*\n&INVALID_USER_LIST_LOGICAL_RULE_OPERAND\x10\x0b\x12\x15\n\x11NAME_ALREADY_USED\x10\x0c\x12%\n!NEW_CONVERSION_TYPE_NAME_REQUIRED\x10\r\x12%\n!CONVERSION_TYPE_NAME_ALREADY_USED\x10\x0e\x12\x1e\n\x1aOWNERSHIP_REQUIRED_FOR_SET\x10\x0f\x12\"\n\x1eUSER_LIST_MUTATE_NOT_SUPPORTED\x10\x10\x12\x10\n\x0cINVALID_RULE\x10\x11\x12\x16\n\x12INVALID_DATE_RANGE\x10\x1b\x12%\n!CAN_NOT_MUTATE_SENSITIVE_USERLIST\x10\x1c\x12\x1f\n\x1bMAX_NUM_RULEBASED_USERLISTS\x10\x1d\x12\'\n#CANNOT_MODIFY_BILLABLE_RECORD_COUNT\x10\x1e\x12\x12\n\x0e\x41PP_ID_NOT_SET\x10\x1f\x12-\n)USERLIST_NAME_IS_RESERVED_FOR_SYSTEM_LIST\x10 \x12\x37\n3ADVERTISER_NOT_ON_ALLOWLIST_FOR_USING_UPLOADED_DATA\x10%\x12\x1e\n\x1aRULE_TYPE_IS_NOT_SUPPORTED\x10\"\x12:\n6CAN_NOT_ADD_A_SIMILAR_USERLIST_AS_LOGICAL_LIST_OPERAND\x10#\x12:\n6CAN_NOT_MIX_CRM_BASED_IN_LOGICAL_LIST_WITH_OTHER_LISTS\x10$\x12\x16\n\x12\x41PP_ID_NOT_ALLOWED\x10\'\x12\x1d\n\x19\x43\x41NNOT_MUTATE_SYSTEM_LIST\x10(\x12\x1b\n\x17MOBILE_APP_IS_SENSITIVE\x10)\x12\x1c\n\x18SEED_LIST_DOES_NOT_EXIST\x10*\x12#\n\x1fINVALID_SEED_LIST_ACCESS_REASON\x10+\x12\x1a\n\x16INVALID_SEED_LIST_TYPE\x10,\x12\x19\n\x15INVALID_COUNTRY_CODES\x10-\x12\x17\n\x13\x44UPLICATE_LOOKALIKE\x10.\x12<\n8PARTNER_AUDIENCE_SOURCE_NOT_SUPPORTED_FOR_USER_LIST_TYPE\x10/\x12 \n\x1c\x43OMMERCE_PARTNER_NOT_ALLOWED\x10\x30\x12:\n6PARTNER_AUDIENCE_INFO_NOT_SUPPORTED_FOR_USER_LIST_TYPE\x10\x31\x12&\n\"PARTNER_MANAGER_ACCOUNT_DISALLOWED\x10\x32\x12\x38\n4PARTNER_NOT_ALLOWLISTED_FOR_THIRD_PARTY_PARTNER_DATA\x10\x33\x12\x1f\n\x1b\x41\x44VERTISER_TOS_NOT_ACCEPTED\x10\x34\x12#\n\x1f\x41\x44VERTISER_PARTNER_LINK_MISSING\x10\x35\x12;\n7ADVERTISER_NOT_ALLOWLISTED_FOR_THIRD_PARTY_PARTNER_DATA\x10\x36\x12$\n ACCOUNT_SETTING_TYPE_NOT_ALLOWED\x10\x37\x42\xf2\x01\n#com.google.ads.googleads.v25.errorsB\x12UserListErrorProtoP\x01ZEgoogle.golang.org/genproto/googleapis/ads/googleads/v25/errors;errors\xa2\x02\x03GAA\xaa\x02\x1fGoogle.Ads.GoogleAds.V25.Errors\xca\x02\x1fGoogle\\Ads\\GoogleAds\\V25\\Errors\xea\x02#Google::Ads::GoogleAds::V25::Errorsb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Errors + UserListErrorEnum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.errors.UserListErrorEnum").msgclass + UserListErrorEnum::UserListError = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.errors.UserListErrorEnum.UserListError").enummodule + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/errors/video_campaign_error_pb.rb b/lib/google/ads/google_ads/v25/errors/video_campaign_error_pb.rb new file mode 100644 index 000000000..790255413 --- /dev/null +++ b/lib/google/ads/google_ads/v25/errors/video_campaign_error_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/errors/video_campaign_error.proto + +require 'google/protobuf' + + +descriptor_data = "\n:google/ads/googleads/v25/errors/video_campaign_error.proto\x12\x1fgoogle.ads.googleads.v25.errors\"m\n\x16VideoCampaignErrorEnum\"S\n\x12VideoCampaignError\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x0b\n\x07UNKNOWN\x10\x01\x12\x1f\n\x1bMUTATE_REQUIRES_RESERVATION\x10\x02\x42\xf7\x01\n#com.google.ads.googleads.v25.errorsB\x17VideoCampaignErrorProtoP\x01ZEgoogle.golang.org/genproto/googleapis/ads/googleads/v25/errors;errors\xa2\x02\x03GAA\xaa\x02\x1fGoogle.Ads.GoogleAds.V25.Errors\xca\x02\x1fGoogle\\Ads\\GoogleAds\\V25\\Errors\xea\x02#Google::Ads::GoogleAds::V25::Errorsb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Errors + VideoCampaignErrorEnum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.errors.VideoCampaignErrorEnum").msgclass + VideoCampaignErrorEnum::VideoCampaignError = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.errors.VideoCampaignErrorEnum.VideoCampaignError").enummodule + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/errors/video_reservation_error_pb.rb b/lib/google/ads/google_ads/v25/errors/video_reservation_error_pb.rb new file mode 100644 index 000000000..b4e194430 --- /dev/null +++ b/lib/google/ads/google_ads/v25/errors/video_reservation_error_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/errors/video_reservation_error.proto + +require 'google/protobuf' + + +descriptor_data = "\n=google/ads/googleads/v25/errors/video_reservation_error.proto\x12\x1fgoogle.ads.googleads.v25.errors\"\xda\x08\n\x19VideoReservationErrorEnum\"\xbc\x08\n\x15VideoReservationError\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x0b\n\x07UNKNOWN\x10\x01\x12\x16\n\x12NEW_QUOTE_REQUIRED\x10\x02\x12!\n\x1d\x43\x41MPAIGN_END_TIME_TOO_DISTANT\x10\x03\x12\x14\n\x10\x42UDGET_TOO_SMALL\x10\x04\x12\x1f\n\x1b\x43\x41MPAIGN_DURATION_TOO_SHORT\x10\x05\x12\x18\n\x14\x43\x41MPAIGN_NOT_ENABLED\x10\x06\x12\"\n\x1eNOT_ENOUGH_AVAILABLE_INVENTORY\x10\x07\x12\x18\n\x14TARGETING_TOO_NARROW\x10\x08\x12\x1d\n\x19UNSUPPORTED_AD_GROUP_TYPE\x10\t\x12\x1c\n\x18UNSUPPORTED_BID_MODIFIER\x10\n\x12\x1f\n\x1b\x43\x41NNOT_CHANGE_PRICING_MODEL\x10\x0b\x12\x1a\n\x16INCOMPATIBLE_TARGETING\x10\x0c\x12\x17\n\x13UNSUPPORTED_FEATURE\x10\r\x12 \n\x1cMISSING_ELECTION_CERTIFICATE\x10\x0e\x12\x12\n\x0e\x43\x41MPAIGN_ENDED\x10\x0f\x12\x1d\n\x19UNSUPPORTED_BUDGET_PERIOD\x10\x10\x12(\n$EXACTLY_ONE_ENABLED_ADGROUP_REQUIRED\x10\x11\x12\x1c\n\x18\x46REQUENCY_CAP_TOO_NARROW\x10\x12\x12\x1c\n\x18TARGETED_PACK_NEEDS_DEAL\x10\x13\x12\x1a\n\x16\x44\x45\x41L_CURRENCY_MISMATCH\x10\x14\x12\x18\n\x14\x43\x41NNOT_HOLD_CONTRACT\x10\x15\x12\x18\n\x14\x43USTOMER_NOT_ENABLED\x10\x16\x12\x18\n\x14\x43USTOMER_NOT_ALLOWED\x10\x17\x12\x18\n\x14INVALID_ACCOUNT_TYPE\x10\x18\x12\x16\n\x12\x41\x43\x43OUNT_IS_MANAGER\x10\x19\x12+\n\'SEASONAL_LINEUP_BOOKING_WINDOW_NOT_OPEN\x10\x1a\x12\'\n#SEASONAL_LINEUP_END_DATE_OFF_SEASON\x10\x1b\x12,\n(SEASONAL_LINEUP_GEO_TARGETING_TOO_NARROW\x10\x1c\x12$\n NO_MARKET_RATE_CARD_OR_BASE_RATE\x10\x1d\x12\x0f\n\x0bSTALE_QUOTE\x10\x1e\x12\x16\n\x12LINEUP_NOT_ALLOWED\x10\x1f\x12 \n\x1cUNSUPPORTED_BIDDING_STRATEGY\x10 \x12(\n$UNSUPPORTED_POSITIVE_GEO_TARGET_TYPE\x10!\x12\x1a\n\x16VALIDATE_ONLY_REQUIRED\x10\"\x12\x16\n\x12TOO_MANY_CAMPAIGNS\x10#B\xfa\x01\n#com.google.ads.googleads.v25.errorsB\x1aVideoReservationErrorProtoP\x01ZEgoogle.golang.org/genproto/googleapis/ads/googleads/v25/errors;errors\xa2\x02\x03GAA\xaa\x02\x1fGoogle.Ads.GoogleAds.V25.Errors\xca\x02\x1fGoogle\\Ads\\GoogleAds\\V25\\Errors\xea\x02#Google::Ads::GoogleAds::V25::Errorsb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Errors + VideoReservationErrorEnum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.errors.VideoReservationErrorEnum").msgclass + VideoReservationErrorEnum::VideoReservationError = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.errors.VideoReservationErrorEnum.VideoReservationError").enummodule + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/errors/youtube_video_registration_error_pb.rb b/lib/google/ads/google_ads/v25/errors/youtube_video_registration_error_pb.rb new file mode 100644 index 000000000..9581d781c --- /dev/null +++ b/lib/google/ads/google_ads/v25/errors/youtube_video_registration_error_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/errors/youtube_video_registration_error.proto + +require 'google/protobuf' + + +descriptor_data = "\nFgoogle/ads/googleads/v25/errors/youtube_video_registration_error.proto\x12\x1fgoogle.ads.googleads.v25.errors\"\xaa\x01\n!YoutubeVideoRegistrationErrorEnum\"\x84\x01\n\x1dYoutubeVideoRegistrationError\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x0b\n\x07UNKNOWN\x10\x01\x12\x13\n\x0fVIDEO_NOT_FOUND\x10\x02\x12\x18\n\x14VIDEO_NOT_ACCESSIBLE\x10\x03\x12\x16\n\x12VIDEO_NOT_ELIGIBLE\x10\x04\x42\x82\x02\n#com.google.ads.googleads.v25.errorsB\"YoutubeVideoRegistrationErrorProtoP\x01ZEgoogle.golang.org/genproto/googleapis/ads/googleads/v25/errors;errors\xa2\x02\x03GAA\xaa\x02\x1fGoogle.Ads.GoogleAds.V25.Errors\xca\x02\x1fGoogle\\Ads\\GoogleAds\\V25\\Errors\xea\x02#Google::Ads::GoogleAds::V25::Errorsb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Errors + YoutubeVideoRegistrationErrorEnum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.errors.YoutubeVideoRegistrationErrorEnum").msgclass + YoutubeVideoRegistrationErrorEnum::YoutubeVideoRegistrationError = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.errors.YoutubeVideoRegistrationErrorEnum.YoutubeVideoRegistrationError").enummodule + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/resources/accessible_bidding_strategy_pb.rb b/lib/google/ads/google_ads/v25/resources/accessible_bidding_strategy_pb.rb new file mode 100644 index 000000000..b10b5fa96 --- /dev/null +++ b/lib/google/ads/google_ads/v25/resources/accessible_bidding_strategy_pb.rb @@ -0,0 +1,34 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/resources/accessible_bidding_strategy.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/enums/bidding_strategy_type_pb' +require 'google/ads/google_ads/v25/enums/target_impression_share_location_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' + + +descriptor_data = "\nDgoogle/ads/googleads/v25/resources/accessible_bidding_strategy.proto\x12\"google.ads.googleads.v25.resources\x1a:google/ads/googleads/v25/enums/bidding_strategy_type.proto\x1a\x45google/ads/googleads/v25/enums/target_impression_share_location.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\x90\x0e\n\x19\x41\x63\x63\x65ssibleBiddingStrategy\x12Q\n\rresource_name\x18\x01 \x01(\tB:\xe0\x41\x03\xfa\x41\x34\n2googleads.googleapis.com/AccessibleBiddingStrategy\x12\x0f\n\x02id\x18\x02 \x01(\x03\x42\x03\xe0\x41\x03\x12\x11\n\x04name\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12^\n\x04type\x18\x04 \x01(\x0e\x32K.google.ads.googleads.v25.enums.BiddingStrategyTypeEnum.BiddingStrategyTypeB\x03\xe0\x41\x03\x12\x1e\n\x11owner_customer_id\x18\x05 \x01(\x03\x42\x03\xe0\x41\x03\x12#\n\x16owner_descriptive_name\x18\x06 \x01(\tB\x03\xe0\x41\x03\x12\x7f\n\x19maximize_conversion_value\x18\x07 \x01(\x0b\x32U.google.ads.googleads.v25.resources.AccessibleBiddingStrategy.MaximizeConversionValueB\x03\xe0\x41\x03H\x00\x12v\n\x14maximize_conversions\x18\x08 \x01(\x0b\x32Q.google.ads.googleads.v25.resources.AccessibleBiddingStrategy.MaximizeConversionsB\x03\xe0\x41\x03H\x00\x12\x62\n\ntarget_cpa\x18\t \x01(\x0b\x32G.google.ads.googleads.v25.resources.AccessibleBiddingStrategy.TargetCpaB\x03\xe0\x41\x03H\x00\x12{\n\x17target_impression_share\x18\n \x01(\x0b\x32S.google.ads.googleads.v25.resources.AccessibleBiddingStrategy.TargetImpressionShareB\x03\xe0\x41\x03H\x00\x12\x64\n\x0btarget_roas\x18\x0b \x01(\x0b\x32H.google.ads.googleads.v25.resources.AccessibleBiddingStrategy.TargetRoasB\x03\xe0\x41\x03H\x00\x12\x66\n\x0ctarget_spend\x18\x0c \x01(\x0b\x32I.google.ads.googleads.v25.resources.AccessibleBiddingStrategy.TargetSpendB\x03\xe0\x41\x03H\x00\x1a\x33\n\x17MaximizeConversionValue\x12\x18\n\x0btarget_roas\x18\x01 \x01(\x01\x42\x03\xe0\x41\x03\x1a\x35\n\x13MaximizeConversions\x12\x1e\n\x11target_cpa_micros\x18\x02 \x01(\x03\x42\x03\xe0\x41\x03\x1a\x46\n\tTargetCpa\x12#\n\x11target_cpa_micros\x18\x01 \x01(\x03\x42\x03\xe0\x41\x03H\x00\x88\x01\x01\x42\x14\n\x12_target_cpa_micros\x1a\x98\x02\n\x15TargetImpressionShare\x12v\n\x08location\x18\x01 \x01(\x0e\x32_.google.ads.googleads.v25.enums.TargetImpressionShareLocationEnum.TargetImpressionShareLocationB\x03\xe0\x41\x03\x12%\n\x18location_fraction_micros\x18\x02 \x01(\x03H\x00\x88\x01\x01\x12(\n\x16\x63pc_bid_ceiling_micros\x18\x03 \x01(\x03\x42\x03\xe0\x41\x03H\x01\x88\x01\x01\x42\x1b\n\x19_location_fraction_microsB\x19\n\x17_cpc_bid_ceiling_micros\x1a;\n\nTargetRoas\x12\x1d\n\x0btarget_roas\x18\x01 \x01(\x01\x42\x03\xe0\x41\x03H\x00\x88\x01\x01\x42\x0e\n\x0c_target_roas\x1a\x93\x01\n\x0bTargetSpend\x12\'\n\x13target_spend_micros\x18\x01 \x01(\x03\x42\x05\x18\x01\xe0\x41\x03H\x00\x88\x01\x01\x12(\n\x16\x63pc_bid_ceiling_micros\x18\x02 \x01(\x03\x42\x03\xe0\x41\x03H\x01\x88\x01\x01\x42\x16\n\x14_target_spend_microsB\x19\n\x17_cpc_bid_ceiling_micros:\x82\x01\xea\x41\x7f\n2googleads.googleapis.com/AccessibleBiddingStrategy\x12Icustomers/{customer_id}/accessibleBiddingStrategies/{bidding_strategy_id}B\x08\n\x06schemeB\x90\x02\n&com.google.ads.googleads.v25.resourcesB\x1e\x41\x63\x63\x65ssibleBiddingStrategyProtoP\x01ZKgoogle.golang.org/genproto/googleapis/ads/googleads/v25/resources;resources\xa2\x02\x03GAA\xaa\x02\"Google.Ads.GoogleAds.V25.Resources\xca\x02\"Google\\Ads\\GoogleAds\\V25\\Resources\xea\x02&Google::Ads::GoogleAds::V25::Resourcesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Resources + AccessibleBiddingStrategy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.AccessibleBiddingStrategy").msgclass + AccessibleBiddingStrategy::MaximizeConversionValue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.AccessibleBiddingStrategy.MaximizeConversionValue").msgclass + AccessibleBiddingStrategy::MaximizeConversions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.AccessibleBiddingStrategy.MaximizeConversions").msgclass + AccessibleBiddingStrategy::TargetCpa = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.AccessibleBiddingStrategy.TargetCpa").msgclass + AccessibleBiddingStrategy::TargetImpressionShare = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.AccessibleBiddingStrategy.TargetImpressionShare").msgclass + AccessibleBiddingStrategy::TargetRoas = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.AccessibleBiddingStrategy.TargetRoas").msgclass + AccessibleBiddingStrategy::TargetSpend = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.AccessibleBiddingStrategy.TargetSpend").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/resources/account_budget_pb.rb b/lib/google/ads/google_ads/v25/resources/account_budget_pb.rb new file mode 100644 index 000000000..4e41a6a46 --- /dev/null +++ b/lib/google/ads/google_ads/v25/resources/account_budget_pb.rb @@ -0,0 +1,31 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/resources/account_budget.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/enums/account_budget_proposal_type_pb' +require 'google/ads/google_ads/v25/enums/account_budget_status_pb' +require 'google/ads/google_ads/v25/enums/spending_limit_type_pb' +require 'google/ads/google_ads/v25/enums/time_type_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' + + +descriptor_data = "\n7google/ads/googleads/v25/resources/account_budget.proto\x12\"google.ads.googleads.v25.resources\x1a\x41google/ads/googleads/v25/enums/account_budget_proposal_type.proto\x1a:google/ads/googleads/v25/enums/account_budget_status.proto\x1a\x38google/ads/googleads/v25/enums/spending_limit_type.proto\x1a.google/ads/googleads/v25/enums/time_type.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\x90\x14\n\rAccountBudget\x12\x45\n\rresource_name\x18\x01 \x01(\tB.\xe0\x41\x03\xfa\x41(\n&googleads.googleapis.com/AccountBudget\x12\x14\n\x02id\x18\x17 \x01(\x03\x42\x03\xe0\x41\x03H\x05\x88\x01\x01\x12I\n\rbilling_setup\x18\x18 \x01(\tB-\xe0\x41\x03\xfa\x41\'\n%googleads.googleapis.com/BillingSetupH\x06\x88\x01\x01\x12`\n\x06status\x18\x04 \x01(\x0e\x32K.google.ads.googleads.v25.enums.AccountBudgetStatusEnum.AccountBudgetStatusB\x03\xe0\x41\x03\x12\x16\n\x04name\x18\x19 \x01(\tB\x03\xe0\x41\x03H\x07\x88\x01\x01\x12*\n\x18proposed_start_date_time\x18\x1a \x01(\tB\x03\xe0\x41\x03H\x08\x88\x01\x01\x12*\n\x18\x61pproved_start_date_time\x18\x1b \x01(\tB\x03\xe0\x41\x03H\t\x88\x01\x01\x12%\n\x18total_adjustments_micros\x18! \x01(\x03\x42\x03\xe0\x41\x03\x12!\n\x14\x61mount_served_micros\x18\" \x01(\x03\x42\x03\xe0\x41\x03\x12\'\n\x15purchase_order_number\x18# \x01(\tB\x03\xe0\x41\x03H\n\x88\x01\x01\x12\x17\n\x05notes\x18$ \x01(\tB\x03\xe0\x41\x03H\x0b\x88\x01\x01\x12m\n\x10pending_proposal\x18\x16 \x01(\x0b\x32N.google.ads.googleads.v25.resources.AccountBudget.PendingAccountBudgetProposalB\x03\xe0\x41\x03\x12%\n\x16proposed_end_date_time\x18\x1c \x01(\tB\x03\xe0\x41\x03H\x00\x12\\\n\x16proposed_end_time_type\x18\t \x01(\x0e\x32\x35.google.ads.googleads.v25.enums.TimeTypeEnum.TimeTypeB\x03\xe0\x41\x03H\x00\x12%\n\x16\x61pproved_end_date_time\x18\x1d \x01(\tB\x03\xe0\x41\x03H\x01\x12\\\n\x16\x61pproved_end_time_type\x18\x0b \x01(\x0e\x32\x35.google.ads.googleads.v25.enums.TimeTypeEnum.TimeTypeB\x03\xe0\x41\x03H\x01\x12-\n\x1eproposed_spending_limit_micros\x18\x1e \x01(\x03\x42\x03\xe0\x41\x03H\x02\x12t\n\x1cproposed_spending_limit_type\x18\r \x01(\x0e\x32G.google.ads.googleads.v25.enums.SpendingLimitTypeEnum.SpendingLimitTypeB\x03\xe0\x41\x03H\x02\x12-\n\x1e\x61pproved_spending_limit_micros\x18\x1f \x01(\x03\x42\x03\xe0\x41\x03H\x03\x12t\n\x1c\x61pproved_spending_limit_type\x18\x0f \x01(\x0e\x32G.google.ads.googleads.v25.enums.SpendingLimitTypeEnum.SpendingLimitTypeB\x03\xe0\x41\x03H\x03\x12-\n\x1e\x61\x64justed_spending_limit_micros\x18 \x01(\x03\x42\x03\xe0\x41\x03H\x04\x12t\n\x1c\x61\x64justed_spending_limit_type\x18\x11 \x01(\x0e\x32G.google.ads.googleads.v25.enums.SpendingLimitTypeEnum.SpendingLimitTypeB\x03\xe0\x41\x03H\x04\x1a\xac\x06\n\x1cPendingAccountBudgetProposal\x12\\\n\x17\x61\x63\x63ount_budget_proposal\x18\x0c \x01(\tB6\xe0\x41\x03\xfa\x41\x30\n.googleads.googleapis.com/AccountBudgetProposalH\x02\x88\x01\x01\x12s\n\rproposal_type\x18\x02 \x01(\x0e\x32W.google.ads.googleads.v25.enums.AccountBudgetProposalTypeEnum.AccountBudgetProposalTypeB\x03\xe0\x41\x03\x12\x16\n\x04name\x18\r \x01(\tB\x03\xe0\x41\x03H\x03\x88\x01\x01\x12!\n\x0fstart_date_time\x18\x0e \x01(\tB\x03\xe0\x41\x03H\x04\x88\x01\x01\x12\'\n\x15purchase_order_number\x18\x11 \x01(\tB\x03\xe0\x41\x03H\x05\x88\x01\x01\x12\x17\n\x05notes\x18\x12 \x01(\tB\x03\xe0\x41\x03H\x06\x88\x01\x01\x12$\n\x12\x63reation_date_time\x18\x13 \x01(\tB\x03\xe0\x41\x03H\x07\x88\x01\x01\x12\x1c\n\rend_date_time\x18\x0f \x01(\tB\x03\xe0\x41\x03H\x00\x12S\n\rend_time_type\x18\x06 \x01(\x0e\x32\x35.google.ads.googleads.v25.enums.TimeTypeEnum.TimeTypeB\x03\xe0\x41\x03H\x00\x12$\n\x15spending_limit_micros\x18\x10 \x01(\x03\x42\x03\xe0\x41\x03H\x01\x12k\n\x13spending_limit_type\x18\x08 \x01(\x0e\x32G.google.ads.googleads.v25.enums.SpendingLimitTypeEnum.SpendingLimitTypeB\x03\xe0\x41\x03H\x01\x42\n\n\x08\x65nd_timeB\x10\n\x0espending_limitB\x1a\n\x18_account_budget_proposalB\x07\n\x05_nameB\x12\n\x10_start_date_timeB\x18\n\x16_purchase_order_numberB\x08\n\x06_notesB\x15\n\x13_creation_date_time:g\xea\x41\x64\n&googleads.googleapis.com/AccountBudget\x12:customers/{customer_id}/accountBudgets/{account_budget_id}B\x13\n\x11proposed_end_timeB\x13\n\x11\x61pproved_end_timeB\x19\n\x17proposed_spending_limitB\x19\n\x17\x61pproved_spending_limitB\x19\n\x17\x61\x64justed_spending_limitB\x05\n\x03_idB\x10\n\x0e_billing_setupB\x07\n\x05_nameB\x1b\n\x19_proposed_start_date_timeB\x1b\n\x19_approved_start_date_timeB\x18\n\x16_purchase_order_numberB\x08\n\x06_notesB\x84\x02\n&com.google.ads.googleads.v25.resourcesB\x12\x41\x63\x63ountBudgetProtoP\x01ZKgoogle.golang.org/genproto/googleapis/ads/googleads/v25/resources;resources\xa2\x02\x03GAA\xaa\x02\"Google.Ads.GoogleAds.V25.Resources\xca\x02\"Google\\Ads\\GoogleAds\\V25\\Resources\xea\x02&Google::Ads::GoogleAds::V25::Resourcesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Resources + AccountBudget = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.AccountBudget").msgclass + AccountBudget::PendingAccountBudgetProposal = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.AccountBudget.PendingAccountBudgetProposal").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/resources/account_budget_proposal_pb.rb b/lib/google/ads/google_ads/v25/resources/account_budget_proposal_pb.rb new file mode 100644 index 000000000..2796c0dcf --- /dev/null +++ b/lib/google/ads/google_ads/v25/resources/account_budget_proposal_pb.rb @@ -0,0 +1,30 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/resources/account_budget_proposal.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/enums/account_budget_proposal_status_pb' +require 'google/ads/google_ads/v25/enums/account_budget_proposal_type_pb' +require 'google/ads/google_ads/v25/enums/spending_limit_type_pb' +require 'google/ads/google_ads/v25/enums/time_type_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' + + +descriptor_data = "\n@google/ads/googleads/v25/resources/account_budget_proposal.proto\x12\"google.ads.googleads.v25.resources\x1a\x43google/ads/googleads/v25/enums/account_budget_proposal_status.proto\x1a\x41google/ads/googleads/v25/enums/account_budget_proposal_type.proto\x1a\x38google/ads/googleads/v25/enums/spending_limit_type.proto\x1a.google/ads/googleads/v25/enums/time_type.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\xfe\x0e\n\x15\x41\x63\x63ountBudgetProposal\x12M\n\rresource_name\x18\x01 \x01(\tB6\xe0\x41\x05\xfa\x41\x30\n.googleads.googleapis.com/AccountBudgetProposal\x12\x14\n\x02id\x18\x19 \x01(\x03\x42\x03\xe0\x41\x03H\x05\x88\x01\x01\x12I\n\rbilling_setup\x18\x1a \x01(\tB-\xe0\x41\x05\xfa\x41\'\n%googleads.googleapis.com/BillingSetupH\x06\x88\x01\x01\x12K\n\x0e\x61\x63\x63ount_budget\x18\x1b \x01(\tB.\xe0\x41\x05\xfa\x41(\n&googleads.googleapis.com/AccountBudgetH\x07\x88\x01\x01\x12s\n\rproposal_type\x18\x04 \x01(\x0e\x32W.google.ads.googleads.v25.enums.AccountBudgetProposalTypeEnum.AccountBudgetProposalTypeB\x03\xe0\x41\x05\x12p\n\x06status\x18\x0f \x01(\x0e\x32[.google.ads.googleads.v25.enums.AccountBudgetProposalStatusEnum.AccountBudgetProposalStatusB\x03\xe0\x41\x03\x12\x1f\n\rproposed_name\x18\x1c \x01(\tB\x03\xe0\x41\x05H\x08\x88\x01\x01\x12*\n\x18\x61pproved_start_date_time\x18\x1e \x01(\tB\x03\xe0\x41\x03H\t\x88\x01\x01\x12\x30\n\x1eproposed_purchase_order_number\x18# \x01(\tB\x03\xe0\x41\x05H\n\x88\x01\x01\x12 \n\x0eproposed_notes\x18$ \x01(\tB\x03\xe0\x41\x05H\x0b\x88\x01\x01\x12$\n\x12\x63reation_date_time\x18% \x01(\tB\x03\xe0\x41\x03H\x0c\x88\x01\x01\x12$\n\x12\x61pproval_date_time\x18& \x01(\tB\x03\xe0\x41\x03H\r\x88\x01\x01\x12\'\n\x18proposed_start_date_time\x18\x1d \x01(\tB\x03\xe0\x41\x05H\x00\x12^\n\x18proposed_start_time_type\x18\x07 \x01(\x0e\x32\x35.google.ads.googleads.v25.enums.TimeTypeEnum.TimeTypeB\x03\xe0\x41\x05H\x00\x12%\n\x16proposed_end_date_time\x18\x1f \x01(\tB\x03\xe0\x41\x05H\x01\x12\\\n\x16proposed_end_time_type\x18\t \x01(\x0e\x32\x35.google.ads.googleads.v25.enums.TimeTypeEnum.TimeTypeB\x03\xe0\x41\x05H\x01\x12%\n\x16\x61pproved_end_date_time\x18 \x01(\tB\x03\xe0\x41\x03H\x02\x12\\\n\x16\x61pproved_end_time_type\x18\x16 \x01(\x0e\x32\x35.google.ads.googleads.v25.enums.TimeTypeEnum.TimeTypeB\x03\xe0\x41\x03H\x02\x12-\n\x1eproposed_spending_limit_micros\x18! \x01(\x03\x42\x03\xe0\x41\x05H\x03\x12t\n\x1cproposed_spending_limit_type\x18\x0b \x01(\x0e\x32G.google.ads.googleads.v25.enums.SpendingLimitTypeEnum.SpendingLimitTypeB\x03\xe0\x41\x05H\x03\x12-\n\x1e\x61pproved_spending_limit_micros\x18\" \x01(\x03\x42\x03\xe0\x41\x03H\x04\x12t\n\x1c\x61pproved_spending_limit_type\x18\x18 \x01(\x0e\x32G.google.ads.googleads.v25.enums.SpendingLimitTypeEnum.SpendingLimitTypeB\x03\xe0\x41\x03H\x04:\x80\x01\xea\x41}\n.googleads.googleapis.com/AccountBudgetProposal\x12Kcustomers/{customer_id}/accountBudgetProposals/{account_budget_proposal_id}B\x15\n\x13proposed_start_timeB\x13\n\x11proposed_end_timeB\x13\n\x11\x61pproved_end_timeB\x19\n\x17proposed_spending_limitB\x19\n\x17\x61pproved_spending_limitB\x05\n\x03_idB\x10\n\x0e_billing_setupB\x11\n\x0f_account_budgetB\x10\n\x0e_proposed_nameB\x1b\n\x19_approved_start_date_timeB!\n\x1f_proposed_purchase_order_numberB\x11\n\x0f_proposed_notesB\x15\n\x13_creation_date_timeB\x15\n\x13_approval_date_timeB\x8c\x02\n&com.google.ads.googleads.v25.resourcesB\x1a\x41\x63\x63ountBudgetProposalProtoP\x01ZKgoogle.golang.org/genproto/googleapis/ads/googleads/v25/resources;resources\xa2\x02\x03GAA\xaa\x02\"Google.Ads.GoogleAds.V25.Resources\xca\x02\"Google\\Ads\\GoogleAds\\V25\\Resources\xea\x02&Google::Ads::GoogleAds::V25::Resourcesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Resources + AccountBudgetProposal = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.AccountBudgetProposal").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/resources/account_link_pb.rb b/lib/google/ads/google_ads/v25/resources/account_link_pb.rb new file mode 100644 index 000000000..d32532a43 --- /dev/null +++ b/lib/google/ads/google_ads/v25/resources/account_link_pb.rb @@ -0,0 +1,30 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/resources/account_link.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/enums/account_link_status_pb' +require 'google/ads/google_ads/v25/enums/linked_account_type_pb' +require 'google/ads/google_ads/v25/enums/mobile_app_vendor_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' + + +descriptor_data = "\n5google/ads/googleads/v25/resources/account_link.proto\x12\"google.ads.googleads.v25.resources\x1a\x38google/ads/googleads/v25/enums/account_link_status.proto\x1a\x38google/ads/googleads/v25/enums/linked_account_type.proto\x1a\x36google/ads/googleads/v25/enums/mobile_app_vendor.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\xa7\x04\n\x0b\x41\x63\x63ountLink\x12\x43\n\rresource_name\x18\x01 \x01(\tB,\xe0\x41\x05\xfa\x41&\n$googleads.googleapis.com/AccountLink\x12!\n\x0f\x61\x63\x63ount_link_id\x18\x08 \x01(\x03\x42\x03\xe0\x41\x03H\x01\x88\x01\x01\x12W\n\x06status\x18\x03 \x01(\x0e\x32G.google.ads.googleads.v25.enums.AccountLinkStatusEnum.AccountLinkStatus\x12Z\n\x04type\x18\x04 \x01(\x0e\x32G.google.ads.googleads.v25.enums.LinkedAccountTypeEnum.LinkedAccountTypeB\x03\xe0\x41\x03\x12r\n\x19third_party_app_analytics\x18\x05 \x01(\x0b\x32H.google.ads.googleads.v25.resources.ThirdPartyAppAnalyticsLinkIdentifierB\x03\xe0\x41\x05H\x00:a\xea\x41^\n$googleads.googleapis.com/AccountLink\x12\x36\x63ustomers/{customer_id}/accountLinks/{account_link_id}B\x10\n\x0elinked_accountB\x12\n\x10_account_link_id\"\xf4\x01\n$ThirdPartyAppAnalyticsLinkIdentifier\x12+\n\x19\x61pp_analytics_provider_id\x18\x04 \x01(\x03\x42\x03\xe0\x41\x05H\x00\x88\x01\x01\x12\x18\n\x06\x61pp_id\x18\x05 \x01(\tB\x03\xe0\x41\x05H\x01\x88\x01\x01\x12\\\n\napp_vendor\x18\x03 \x01(\x0e\x32\x43.google.ads.googleads.v25.enums.MobileAppVendorEnum.MobileAppVendorB\x03\xe0\x41\x05\x42\x1c\n\x1a_app_analytics_provider_idB\t\n\x07_app_idB\x82\x02\n&com.google.ads.googleads.v25.resourcesB\x10\x41\x63\x63ountLinkProtoP\x01ZKgoogle.golang.org/genproto/googleapis/ads/googleads/v25/resources;resources\xa2\x02\x03GAA\xaa\x02\"Google.Ads.GoogleAds.V25.Resources\xca\x02\"Google\\Ads\\GoogleAds\\V25\\Resources\xea\x02&Google::Ads::GoogleAds::V25::Resourcesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Resources + AccountLink = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.AccountLink").msgclass + ThirdPartyAppAnalyticsLinkIdentifier = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.ThirdPartyAppAnalyticsLinkIdentifier").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/resources/ad_group_ad_asset_combination_view_pb.rb b/lib/google/ads/google_ads/v25/resources/ad_group_ad_asset_combination_view_pb.rb new file mode 100644 index 000000000..bf1ebc814 --- /dev/null +++ b/lib/google/ads/google_ads/v25/resources/ad_group_ad_asset_combination_view_pb.rb @@ -0,0 +1,27 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/resources/ad_group_ad_asset_combination_view.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/common/asset_usage_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' + + +descriptor_data = "\nKgoogle/ads/googleads/v25/resources/ad_group_ad_asset_combination_view.proto\x12\"google.ads.googleads.v25.resources\x1a\x31google/ads/googleads/v25/common/asset_usage.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\xab\x03\n\x1d\x41\x64GroupAdAssetCombinationView\x12U\n\rresource_name\x18\x01 \x01(\tB>\xe0\x41\x03\xfa\x41\x38\n6googleads.googleapis.com/AdGroupAdAssetCombinationView\x12G\n\rserved_assets\x18\x02 \x03(\x0b\x32+.google.ads.googleads.v25.common.AssetUsageB\x03\xe0\x41\x03\x12\x19\n\x07\x65nabled\x18\x03 \x01(\x08\x42\x03\xe0\x41\x03H\x00\x88\x01\x01:\xc2\x01\xea\x41\xbe\x01\n6googleads.googleapis.com/AdGroupAdAssetCombinationView\x12\x83\x01\x63ustomers/{customer_id}/adGroupAdAssetCombinationViews/{ad_group_id}~{ad_id}~{asset_combination_id_low}~{asset_combination_id_high}B\n\n\x08_enabledB\x94\x02\n&com.google.ads.googleads.v25.resourcesB\"AdGroupAdAssetCombinationViewProtoP\x01ZKgoogle.golang.org/genproto/googleapis/ads/googleads/v25/resources;resources\xa2\x02\x03GAA\xaa\x02\"Google.Ads.GoogleAds.V25.Resources\xca\x02\"Google\\Ads\\GoogleAds\\V25\\Resources\xea\x02&Google::Ads::GoogleAds::V25::Resourcesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Resources + AdGroupAdAssetCombinationView = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.AdGroupAdAssetCombinationView").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/resources/ad_group_ad_asset_view_pb.rb b/lib/google/ads/google_ads/v25/resources/ad_group_ad_asset_view_pb.rb new file mode 100644 index 000000000..6c11750af --- /dev/null +++ b/lib/google/ads/google_ads/v25/resources/ad_group_ad_asset_view_pb.rb @@ -0,0 +1,34 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/resources/ad_group_ad_asset_view.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/common/policy_pb' +require 'google/ads/google_ads/v25/enums/asset_field_type_pb' +require 'google/ads/google_ads/v25/enums/asset_performance_label_pb' +require 'google/ads/google_ads/v25/enums/asset_source_pb' +require 'google/ads/google_ads/v25/enums/policy_approval_status_pb' +require 'google/ads/google_ads/v25/enums/policy_review_status_pb' +require 'google/ads/google_ads/v25/enums/served_asset_field_type_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' + + +descriptor_data = "\n?google/ads/googleads/v25/resources/ad_group_ad_asset_view.proto\x12\"google.ads.googleads.v25.resources\x1a,google/ads/googleads/v25/common/policy.proto\x1a\x35google/ads/googleads/v25/enums/asset_field_type.proto\x1agoogle/ads/googleads/v25/enums/asset_link_primary_status.proto\x1a\x45google/ads/googleads/v25/enums/asset_link_primary_status_reason.proto\x1a\x36google/ads/googleads/v25/enums/asset_link_status.proto\x1a\x31google/ads/googleads/v25/enums/asset_source.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\xa6\x07\n\x0c\x41\x64GroupAsset\x12\x44\n\rresource_name\x18\x01 \x01(\tB-\xe0\x41\x05\xfa\x41\'\n%googleads.googleapis.com/AdGroupAsset\x12=\n\x08\x61\x64_group\x18\x02 \x01(\tB+\xe0\x41\x02\xe0\x41\x05\xfa\x41\"\n googleads.googleapis.com/AdGroup\x12\x38\n\x05\x61sset\x18\x03 \x01(\tB)\xe0\x41\x02\xe0\x41\x05\xfa\x41 \n\x1egoogleads.googleapis.com/Asset\x12]\n\nfield_type\x18\x04 \x01(\x0e\x32\x41.google.ads.googleads.v25.enums.AssetFieldTypeEnum.AssetFieldTypeB\x06\xe0\x41\x02\xe0\x41\x05\x12P\n\x06source\x18\x06 \x01(\x0e\x32;.google.ads.googleads.v25.enums.AssetSourceEnum.AssetSourceB\x03\xe0\x41\x03\x12S\n\x06status\x18\x05 \x01(\x0e\x32\x43.google.ads.googleads.v25.enums.AssetLinkStatusEnum.AssetLinkStatus\x12n\n\x0eprimary_status\x18\x07 \x01(\x0e\x32Q.google.ads.googleads.v25.enums.AssetLinkPrimaryStatusEnum.AssetLinkPrimaryStatusB\x03\xe0\x41\x03\x12\x63\n\x16primary_status_details\x18\x08 \x03(\x0b\x32>.google.ads.googleads.v25.common.AssetLinkPrimaryStatusDetailsB\x03\xe0\x41\x03\x12\x82\x01\n\x16primary_status_reasons\x18\t \x03(\x0e\x32].google.ads.googleads.v25.enums.AssetLinkPrimaryStatusReasonEnum.AssetLinkPrimaryStatusReasonB\x03\xe0\x41\x03:w\xea\x41t\n%googleads.googleapis.com/AdGroupAsset\x12Kcustomers/{customer_id}/adGroupAssets/{ad_group_id}~{asset_id}~{field_type}B\x83\x02\n&com.google.ads.googleads.v25.resourcesB\x11\x41\x64GroupAssetProtoP\x01ZKgoogle.golang.org/genproto/googleapis/ads/googleads/v25/resources;resources\xa2\x02\x03GAA\xaa\x02\"Google.Ads.GoogleAds.V25.Resources\xca\x02\"Google\\Ads\\GoogleAds\\V25\\Resources\xea\x02&Google::Ads::GoogleAds::V25::Resourcesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Resources + AdGroupAsset = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.AdGroupAsset").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/resources/ad_group_asset_set_pb.rb b/lib/google/ads/google_ads/v25/resources/ad_group_asset_set_pb.rb new file mode 100644 index 000000000..8c33fbc71 --- /dev/null +++ b/lib/google/ads/google_ads/v25/resources/ad_group_asset_set_pb.rb @@ -0,0 +1,27 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/resources/ad_group_asset_set.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/enums/asset_set_link_status_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' + + +descriptor_data = "\n;google/ads/googleads/v25/resources/ad_group_asset_set.proto\x12\"google.ads.googleads.v25.resources\x1a:google/ads/googleads/v25/enums/asset_set_link_status.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\xaa\x03\n\x0f\x41\x64GroupAssetSet\x12G\n\rresource_name\x18\x01 \x01(\tB0\xe0\x41\x05\xfa\x41*\n(googleads.googleapis.com/AdGroupAssetSet\x12:\n\x08\x61\x64_group\x18\x02 \x01(\tB(\xe0\x41\x05\xfa\x41\"\n googleads.googleapis.com/AdGroup\x12<\n\tasset_set\x18\x03 \x01(\tB)\xe0\x41\x05\xfa\x41#\n!googleads.googleapis.com/AssetSet\x12^\n\x06status\x18\x04 \x01(\x0e\x32I.google.ads.googleads.v25.enums.AssetSetLinkStatusEnum.AssetSetLinkStatusB\x03\xe0\x41\x03:t\xea\x41q\n(googleads.googleapis.com/AdGroupAssetSet\x12\x45\x63ustomers/{customer_id}/adGroupAssetSets/{ad_group_id}~{asset_set_id}B\x86\x02\n&com.google.ads.googleads.v25.resourcesB\x14\x41\x64GroupAssetSetProtoP\x01ZKgoogle.golang.org/genproto/googleapis/ads/googleads/v25/resources;resources\xa2\x02\x03GAA\xaa\x02\"Google.Ads.GoogleAds.V25.Resources\xca\x02\"Google\\Ads\\GoogleAds\\V25\\Resources\xea\x02&Google::Ads::GoogleAds::V25::Resourcesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Resources + AdGroupAssetSet = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.AdGroupAssetSet").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/resources/ad_group_audience_view_pb.rb b/lib/google/ads/google_ads/v25/resources/ad_group_audience_view_pb.rb new file mode 100644 index 000000000..4e620213d --- /dev/null +++ b/lib/google/ads/google_ads/v25/resources/ad_group_audience_view_pb.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/resources/ad_group_audience_view.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' + + +descriptor_data = "\n?google/ads/googleads/v25/resources/ad_group_audience_view.proto\x12\"google.ads.googleads.v25.resources\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\xe0\x01\n\x13\x41\x64GroupAudienceView\x12K\n\rresource_name\x18\x01 \x01(\tB4\xe0\x41\x03\xfa\x41.\n,googleads.googleapis.com/AdGroupAudienceView:|\xea\x41y\n,googleads.googleapis.com/AdGroupAudienceView\x12Icustomers/{customer_id}/adGroupAudienceViews/{ad_group_id}~{criterion_id}B\x8a\x02\n&com.google.ads.googleads.v25.resourcesB\x18\x41\x64GroupAudienceViewProtoP\x01ZKgoogle.golang.org/genproto/googleapis/ads/googleads/v25/resources;resources\xa2\x02\x03GAA\xaa\x02\"Google.Ads.GoogleAds.V25.Resources\xca\x02\"Google\\Ads\\GoogleAds\\V25\\Resources\xea\x02&Google::Ads::GoogleAds::V25::Resourcesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Resources + AdGroupAudienceView = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.AdGroupAudienceView").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/resources/ad_group_bid_modifier_pb.rb b/lib/google/ads/google_ads/v25/resources/ad_group_bid_modifier_pb.rb new file mode 100644 index 000000000..26af7ee4a --- /dev/null +++ b/lib/google/ads/google_ads/v25/resources/ad_group_bid_modifier_pb.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/resources/ad_group_bid_modifier.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/common/criteria_pb' +require 'google/ads/google_ads/v25/enums/bid_modifier_source_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' + + +descriptor_data = "\n>google/ads/googleads/v25/resources/ad_group_bid_modifier.proto\x12\"google.ads.googleads.v25.resources\x1a.google/ads/googleads/v25/common/criteria.proto\x1a\x38google/ads/googleads/v25/enums/bid_modifier_source.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\x8b\t\n\x12\x41\x64GroupBidModifier\x12J\n\rresource_name\x18\x01 \x01(\tB3\xe0\x41\x05\xfa\x41-\n+googleads.googleapis.com/AdGroupBidModifier\x12?\n\x08\x61\x64_group\x18\r \x01(\tB(\xe0\x41\x05\xfa\x41\"\n googleads.googleapis.com/AdGroupH\x01\x88\x01\x01\x12\x1e\n\x0c\x63riterion_id\x18\x0e \x01(\x03\x42\x03\xe0\x41\x03H\x02\x88\x01\x01\x12\x19\n\x0c\x62id_modifier\x18\x0f \x01(\x01H\x03\x88\x01\x01\x12\x44\n\rbase_ad_group\x18\x10 \x01(\tB(\xe0\x41\x03\xfa\x41\"\n googleads.googleapis.com/AdGroupH\x04\x88\x01\x01\x12i\n\x13\x62id_modifier_source\x18\n \x01(\x0e\x32G.google.ads.googleads.v25.enums.BidModifierSourceEnum.BidModifierSourceB\x03\xe0\x41\x03\x12\x65\n\x19hotel_date_selection_type\x18\x05 \x01(\x0b\x32;.google.ads.googleads.v25.common.HotelDateSelectionTypeInfoB\x03\xe0\x41\x05H\x00\x12k\n\x1chotel_advance_booking_window\x18\x06 \x01(\x0b\x32>.google.ads.googleads.v25.common.HotelAdvanceBookingWindowInfoB\x03\xe0\x41\x05H\x00\x12[\n\x14hotel_length_of_stay\x18\x07 \x01(\x0b\x32\x36.google.ads.googleads.v25.common.HotelLengthOfStayInfoB\x03\xe0\x41\x05H\x00\x12W\n\x12hotel_check_in_day\x18\x08 \x01(\x0b\x32\x34.google.ads.googleads.v25.common.HotelCheckInDayInfoB\x03\xe0\x41\x05H\x00\x12\x42\n\x06\x64\x65vice\x18\x0b \x01(\x0b\x32+.google.ads.googleads.v25.common.DeviceInfoB\x03\xe0\x41\x05H\x00\x12\x64\n\x19hotel_check_in_date_range\x18\x11 \x01(\x0b\x32:.google.ads.googleads.v25.common.HotelCheckInDateRangeInfoB\x03\xe0\x41\x05H\x00:z\xea\x41w\n+googleads.googleapis.com/AdGroupBidModifier\x12Hcustomers/{customer_id}/adGroupBidModifiers/{ad_group_id}~{criterion_id}B\x0b\n\tcriterionB\x0b\n\t_ad_groupB\x0f\n\r_criterion_idB\x0f\n\r_bid_modifierB\x10\n\x0e_base_ad_groupB\x89\x02\n&com.google.ads.googleads.v25.resourcesB\x17\x41\x64GroupBidModifierProtoP\x01ZKgoogle.golang.org/genproto/googleapis/ads/googleads/v25/resources;resources\xa2\x02\x03GAA\xaa\x02\"Google.Ads.GoogleAds.V25.Resources\xca\x02\"Google\\Ads\\GoogleAds\\V25\\Resources\xea\x02&Google::Ads::GoogleAds::V25::Resourcesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Resources + AdGroupBidModifier = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.AdGroupBidModifier").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/resources/ad_group_criterion_customizer_pb.rb b/lib/google/ads/google_ads/v25/resources/ad_group_criterion_customizer_pb.rb new file mode 100644 index 000000000..0bee91c30 --- /dev/null +++ b/lib/google/ads/google_ads/v25/resources/ad_group_criterion_customizer_pb.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/resources/ad_group_criterion_customizer.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/common/customizer_value_pb' +require 'google/ads/google_ads/v25/enums/customizer_value_status_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' + + +descriptor_data = "\nFgoogle/ads/googleads/v25/resources/ad_group_criterion_customizer.proto\x12\"google.ads.googleads.v25.resources\x1a\x36google/ads/googleads/v25/common/customizer_value.proto\x1agoogle/ads/googleads/v25/enums/ad_group_criterion_status.proto\x1a\x33google/ads/googleads/v25/enums/bidding_source.proto\x1a\x44google/ads/googleads/v25/enums/criterion_system_serving_status.proto\x1a\x33google/ads/googleads/v25/enums/criterion_type.proto\x1a\x39google/ads/googleads/v25/enums/quality_score_bucket.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\xfd-\n\x10\x41\x64GroupCriterion\x12H\n\rresource_name\x18\x01 \x01(\tB1\xe0\x41\x05\xfa\x41+\n)googleads.googleapis.com/AdGroupCriterion\x12\x1e\n\x0c\x63riterion_id\x18\x38 \x01(\x03\x42\x03\xe0\x41\x03H\x01\x88\x01\x01\x12\x19\n\x0c\x64isplay_name\x18M \x01(\tB\x03\xe0\x41\x03\x12\x61\n\x06status\x18\x03 \x01(\x0e\x32Q.google.ads.googleads.v25.enums.AdGroupCriterionStatusEnum.AdGroupCriterionStatus\x12[\n\x0cquality_info\x18\x04 \x01(\x0b\x32@.google.ads.googleads.v25.resources.AdGroupCriterion.QualityInfoB\x03\xe0\x41\x03\x12?\n\x08\x61\x64_group\x18\x39 \x01(\tB(\xe0\x41\x05\xfa\x41\"\n googleads.googleapis.com/AdGroupH\x02\x88\x01\x01\x12R\n\x04type\x18\x19 \x01(\x0e\x32?.google.ads.googleads.v25.enums.CriterionTypeEnum.CriterionTypeB\x03\xe0\x41\x03\x12\x1a\n\x08negative\x18: \x01(\x08\x42\x03\xe0\x41\x05H\x03\x88\x01\x01\x12\x81\x01\n\x15system_serving_status\x18\x34 \x01(\x0e\x32].google.ads.googleads.v25.enums.CriterionSystemServingStatusEnum.CriterionSystemServingStatusB\x03\xe0\x41\x03\x12\x7f\n\x0f\x61pproval_status\x18\x35 \x01(\x0e\x32\x61.google.ads.googleads.v25.enums.AdGroupCriterionApprovalStatusEnum.AdGroupCriterionApprovalStatusB\x03\xe0\x41\x03\x12 \n\x13\x64isapproval_reasons\x18; \x03(\tB\x03\xe0\x41\x03\x12\x46\n\x06labels\x18< \x03(\tB6\xe0\x41\x03\xfa\x41\x30\n.googleads.googleapis.com/AdGroupCriterionLabel\x12\x19\n\x0c\x62id_modifier\x18= \x01(\x01H\x04\x88\x01\x01\x12\x1b\n\x0e\x63pc_bid_micros\x18> \x01(\x03H\x05\x88\x01\x01\x12\x1b\n\x0e\x63pm_bid_micros\x18? \x01(\x03H\x06\x88\x01\x01\x12\x1b\n\x0e\x63pv_bid_micros\x18@ \x01(\x03H\x07\x88\x01\x01\x12#\n\x16percent_cpc_bid_micros\x18\x41 \x01(\x03H\x08\x88\x01\x01\x12*\n\x18\x65\x66\x66\x65\x63tive_cpc_bid_micros\x18\x42 \x01(\x03\x42\x03\xe0\x41\x03H\t\x88\x01\x01\x12*\n\x18\x65\x66\x66\x65\x63tive_cpm_bid_micros\x18\x43 \x01(\x03\x42\x03\xe0\x41\x03H\n\x88\x01\x01\x12*\n\x18\x65\x66\x66\x65\x63tive_cpv_bid_micros\x18\x44 \x01(\x03\x42\x03\xe0\x41\x03H\x0b\x88\x01\x01\x12\x32\n effective_percent_cpc_bid_micros\x18\x45 \x01(\x03\x42\x03\xe0\x41\x03H\x0c\x88\x01\x01\x12\x66\n\x18\x65\x66\x66\x65\x63tive_cpc_bid_source\x18\x15 \x01(\x0e\x32?.google.ads.googleads.v25.enums.BiddingSourceEnum.BiddingSourceB\x03\xe0\x41\x03\x12\x66\n\x18\x65\x66\x66\x65\x63tive_cpm_bid_source\x18\x16 \x01(\x0e\x32?.google.ads.googleads.v25.enums.BiddingSourceEnum.BiddingSourceB\x03\xe0\x41\x03\x12\x66\n\x18\x65\x66\x66\x65\x63tive_cpv_bid_source\x18\x17 \x01(\x0e\x32?.google.ads.googleads.v25.enums.BiddingSourceEnum.BiddingSourceB\x03\xe0\x41\x03\x12n\n effective_percent_cpc_bid_source\x18# \x01(\x0e\x32?.google.ads.googleads.v25.enums.BiddingSourceEnum.BiddingSourceB\x03\xe0\x41\x03\x12g\n\x12position_estimates\x18\n \x01(\x0b\x32\x46.google.ads.googleads.v25.resources.AdGroupCriterion.PositionEstimatesB\x03\xe0\x41\x03\x12\x12\n\nfinal_urls\x18\x46 \x03(\t\x12\x19\n\x11\x66inal_mobile_urls\x18G \x03(\t\x12\x1d\n\x10\x66inal_url_suffix\x18H \x01(\tH\r\x88\x01\x01\x12\"\n\x15tracking_url_template\x18I \x01(\tH\x0e\x88\x01\x01\x12O\n\x15url_custom_parameters\x18\x0e \x03(\x0b\x32\x30.google.ads.googleads.v25.common.CustomParameter\x12\x81\x01\n\x0eprimary_status\x18U \x01(\x0e\x32_.google.ads.googleads.v25.enums.AdGroupCriterionPrimaryStatusEnum.AdGroupCriterionPrimaryStatusB\x03\xe0\x41\x03H\x0f\x88\x01\x01\x12\x90\x01\n\x16primary_status_reasons\x18V \x03(\x0e\x32k.google.ads.googleads.v25.enums.AdGroupCriterionPrimaryStatusReasonEnum.AdGroupCriterionPrimaryStatusReasonB\x03\xe0\x41\x03\x12\x44\n\x07keyword\x18\x1b \x01(\x0b\x32,.google.ads.googleads.v25.common.KeywordInfoB\x03\xe0\x41\x05H\x00\x12H\n\tplacement\x18\x1c \x01(\x0b\x32..google.ads.googleads.v25.common.PlacementInfoB\x03\xe0\x41\x05H\x00\x12Z\n\x13mobile_app_category\x18\x1d \x01(\x0b\x32\x36.google.ads.googleads.v25.common.MobileAppCategoryInfoB\x03\xe0\x41\x05H\x00\x12Y\n\x12mobile_application\x18\x1e \x01(\x0b\x32\x36.google.ads.googleads.v25.common.MobileApplicationInfoB\x03\xe0\x41\x05H\x00\x12O\n\rlisting_group\x18 \x01(\x0b\x32\x31.google.ads.googleads.v25.common.ListingGroupInfoB\x03\xe0\x41\x05H\x00\x12G\n\tage_range\x18$ \x01(\x0b\x32-.google.ads.googleads.v25.common.AgeRangeInfoB\x03\xe0\x41\x05H\x00\x12\x42\n\x06gender\x18% \x01(\x0b\x32+.google.ads.googleads.v25.common.GenderInfoB\x03\xe0\x41\x05H\x00\x12M\n\x0cincome_range\x18& \x01(\x0b\x32\x30.google.ads.googleads.v25.common.IncomeRangeInfoB\x03\xe0\x41\x05H\x00\x12S\n\x0fparental_status\x18\' \x01(\x0b\x32\x33.google.ads.googleads.v25.common.ParentalStatusInfoB\x03\xe0\x41\x05H\x00\x12G\n\tuser_list\x18* \x01(\x0b\x32-.google.ads.googleads.v25.common.UserListInfoB\x03\xe0\x41\x05H\x00\x12O\n\ryoutube_video\x18( \x01(\x0b\x32\x31.google.ads.googleads.v25.common.YouTubeVideoInfoB\x03\xe0\x41\x05H\x00\x12S\n\x0fyoutube_channel\x18) \x01(\x0b\x32\x33.google.ads.googleads.v25.common.YouTubeChannelInfoB\x03\xe0\x41\x05H\x00\x12@\n\x05topic\x18+ \x01(\x0b\x32*.google.ads.googleads.v25.common.TopicInfoB\x03\xe0\x41\x05H\x00\x12O\n\ruser_interest\x18- \x01(\x0b\x32\x31.google.ads.googleads.v25.common.UserInterestInfoB\x03\xe0\x41\x05H\x00\x12\x44\n\x07webpage\x18. \x01(\x0b\x32,.google.ads.googleads.v25.common.WebpageInfoB\x03\xe0\x41\x05H\x00\x12V\n\x11\x61pp_payment_model\x18/ \x01(\x0b\x32\x34.google.ads.googleads.v25.common.AppPaymentModelInfoB\x03\xe0\x41\x05H\x00\x12S\n\x0f\x63ustom_affinity\x18\x30 \x01(\x0b\x32\x33.google.ads.googleads.v25.common.CustomAffinityInfoB\x03\xe0\x41\x05H\x00\x12O\n\rcustom_intent\x18\x31 \x01(\x0b\x32\x31.google.ads.googleads.v25.common.CustomIntentInfoB\x03\xe0\x41\x05H\x00\x12S\n\x0f\x63ustom_audience\x18J \x01(\x0b\x32\x33.google.ads.googleads.v25.common.CustomAudienceInfoB\x03\xe0\x41\x05H\x00\x12W\n\x11\x63ombined_audience\x18K \x01(\x0b\x32\x35.google.ads.googleads.v25.common.CombinedAudienceInfoB\x03\xe0\x41\x05H\x00\x12\x46\n\x08\x61udience\x18O \x01(\x0b\x32-.google.ads.googleads.v25.common.AudienceInfoB\x03\xe0\x41\x05H\x00\x12\x46\n\x08location\x18R \x01(\x0b\x32-.google.ads.googleads.v25.common.LocationInfoB\x03\xe0\x41\x05H\x00\x12\x46\n\x08language\x18S \x01(\x0b\x32-.google.ads.googleads.v25.common.LanguageInfoB\x03\xe0\x41\x05H\x00\x12I\n\nlife_event\x18T \x01(\x0b\x32..google.ads.googleads.v25.common.LifeEventInfoB\x03\xe0\x41\x05H\x00\x12M\n\x0cvideo_lineup\x18X \x01(\x0b\x32\x30.google.ads.googleads.v25.common.VideoLineupInfoB\x03\xe0\x41\x05H\x00\x12]\n\x14\x65xtended_demographic\x18Z \x01(\x0b\x32\x38.google.ads.googleads.v25.common.ExtendedDemographicInfoB\x03\xe0\x41\x05H\x00\x12I\n\nbrand_list\x18Y \x01(\x0b\x32..google.ads.googleads.v25.common.BrandListInfoB\x03\xe0\x41\x05H\x00\x12s\n!vertical_ads_item_group_rule_list\x18[ \x01(\x0b\x32\x41.google.ads.googleads.v25.common.VerticalAdsItemGroupRuleListInfoB\x03\xe0\x41\x05H\x00\x12Y\n\x14retail_filter_bundle\x18\xb4\x01 \x01(\x0b\x32\x33.google.ads.googleads.v25.common.RetailFilterBundleB\x03\xe0\x41\x05H\x00\x1a\x90\x03\n\x0bQualityInfo\x12\x1f\n\rquality_score\x18\x05 \x01(\x05\x42\x03\xe0\x41\x03H\x00\x88\x01\x01\x12n\n\x16\x63reative_quality_score\x18\x02 \x01(\x0e\x32I.google.ads.googleads.v25.enums.QualityScoreBucketEnum.QualityScoreBucketB\x03\xe0\x41\x03\x12p\n\x18post_click_quality_score\x18\x03 \x01(\x0e\x32I.google.ads.googleads.v25.enums.QualityScoreBucketEnum.QualityScoreBucketB\x03\xe0\x41\x03\x12l\n\x14search_predicted_ctr\x18\x04 \x01(\x0e\x32I.google.ads.googleads.v25.enums.QualityScoreBucketEnum.QualityScoreBucketB\x03\xe0\x41\x03\x42\x10\n\x0e_quality_score\x1a\xbc\x03\n\x11PositionEstimates\x12\'\n\x15\x66irst_page_cpc_micros\x18\x06 \x01(\x03\x42\x03\xe0\x41\x03H\x00\x88\x01\x01\x12+\n\x19\x66irst_position_cpc_micros\x18\x07 \x01(\x03\x42\x03\xe0\x41\x03H\x01\x88\x01\x01\x12(\n\x16top_of_page_cpc_micros\x18\x08 \x01(\x03\x42\x03\xe0\x41\x03H\x02\x88\x01\x01\x12<\n*estimated_add_clicks_at_first_position_cpc\x18\t \x01(\x03\x42\x03\xe0\x41\x03H\x03\x88\x01\x01\x12:\n(estimated_add_cost_at_first_position_cpc\x18\n \x01(\x03\x42\x03\xe0\x41\x03H\x04\x88\x01\x01\x42\x18\n\x16_first_page_cpc_microsB\x1c\n\x1a_first_position_cpc_microsB\x19\n\x17_top_of_page_cpc_microsB-\n+_estimated_add_clicks_at_first_position_cpcB+\n)_estimated_add_cost_at_first_position_cpc:t\xea\x41q\n)googleads.googleapis.com/AdGroupCriterion\x12\x44\x63ustomers/{customer_id}/adGroupCriteria/{ad_group_id}~{criterion_id}B\x0b\n\tcriterionB\x0f\n\r_criterion_idB\x0b\n\t_ad_groupB\x0b\n\t_negativeB\x0f\n\r_bid_modifierB\x11\n\x0f_cpc_bid_microsB\x11\n\x0f_cpm_bid_microsB\x11\n\x0f_cpv_bid_microsB\x19\n\x17_percent_cpc_bid_microsB\x1b\n\x19_effective_cpc_bid_microsB\x1b\n\x19_effective_cpm_bid_microsB\x1b\n\x19_effective_cpv_bid_microsB#\n!_effective_percent_cpc_bid_microsB\x13\n\x11_final_url_suffixB\x18\n\x16_tracking_url_templateB\x11\n\x0f_primary_statusB\x87\x02\n&com.google.ads.googleads.v25.resourcesB\x15\x41\x64GroupCriterionProtoP\x01ZKgoogle.golang.org/genproto/googleapis/ads/googleads/v25/resources;resources\xa2\x02\x03GAA\xaa\x02\"Google.Ads.GoogleAds.V25.Resources\xca\x02\"Google\\Ads\\GoogleAds\\V25\\Resources\xea\x02&Google::Ads::GoogleAds::V25::Resourcesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Resources + AdGroupCriterion = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.AdGroupCriterion").msgclass + AdGroupCriterion::QualityInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.AdGroupCriterion.QualityInfo").msgclass + AdGroupCriterion::PositionEstimates = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.AdGroupCriterion.PositionEstimates").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/resources/ad_group_criterion_simulation_pb.rb b/lib/google/ads/google_ads/v25/resources/ad_group_criterion_simulation_pb.rb new file mode 100644 index 000000000..bd310b208 --- /dev/null +++ b/lib/google/ads/google_ads/v25/resources/ad_group_criterion_simulation_pb.rb @@ -0,0 +1,29 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/resources/ad_group_criterion_simulation.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/common/simulation_pb' +require 'google/ads/google_ads/v25/enums/simulation_modification_method_pb' +require 'google/ads/google_ads/v25/enums/simulation_type_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' + + +descriptor_data = "\nFgoogle/ads/googleads/v25/resources/ad_group_criterion_simulation.proto\x12\"google.ads.googleads.v25.resources\x1a\x30google/ads/googleads/v25/common/simulation.proto\x1a\x43google/ads/googleads/v25/enums/simulation_modification_method.proto\x1a\x34google/ads/googleads/v25/enums/simulation_type.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\x9c\x07\n\x1a\x41\x64GroupCriterionSimulation\x12R\n\rresource_name\x18\x01 \x01(\tB;\xe0\x41\x03\xfa\x41\x35\n3googleads.googleapis.com/AdGroupCriterionSimulation\x12\x1d\n\x0b\x61\x64_group_id\x18\t \x01(\x03\x42\x03\xe0\x41\x03H\x01\x88\x01\x01\x12\x1e\n\x0c\x63riterion_id\x18\n \x01(\x03\x42\x03\xe0\x41\x03H\x02\x88\x01\x01\x12T\n\x04type\x18\x04 \x01(\x0e\x32\x41.google.ads.googleads.v25.enums.SimulationTypeEnum.SimulationTypeB\x03\xe0\x41\x03\x12\x7f\n\x13modification_method\x18\x05 \x01(\x0e\x32].google.ads.googleads.v25.enums.SimulationModificationMethodEnum.SimulationModificationMethodB\x03\xe0\x41\x03\x12\x1c\n\nstart_date\x18\x0b \x01(\tB\x03\xe0\x41\x03H\x03\x88\x01\x01\x12\x1a\n\x08\x65nd_date\x18\x0c \x01(\tB\x03\xe0\x41\x03H\x04\x88\x01\x01\x12]\n\x12\x63pc_bid_point_list\x18\x08 \x01(\x0b\x32:.google.ads.googleads.v25.common.CpcBidSimulationPointListB\x03\xe0\x41\x03H\x00\x12l\n\x1apercent_cpc_bid_point_list\x18\r \x01(\x0b\x32\x41.google.ads.googleads.v25.common.PercentCpcBidSimulationPointListB\x03\xe0\x41\x03H\x00:\xc1\x01\xea\x41\xbd\x01\n3googleads.googleapis.com/AdGroupCriterionSimulation\x12\x85\x01\x63ustomers/{customer_id}/adGroupCriterionSimulations/{ad_group_id}~{criterion_id}~{type}~{modification_method}~{start_date}~{end_date}B\x0c\n\npoint_listB\x0e\n\x0c_ad_group_idB\x0f\n\r_criterion_idB\r\n\x0b_start_dateB\x0b\n\t_end_dateB\x91\x02\n&com.google.ads.googleads.v25.resourcesB\x1f\x41\x64GroupCriterionSimulationProtoP\x01ZKgoogle.golang.org/genproto/googleapis/ads/googleads/v25/resources;resources\xa2\x02\x03GAA\xaa\x02\"Google.Ads.GoogleAds.V25.Resources\xca\x02\"Google\\Ads\\GoogleAds\\V25\\Resources\xea\x02&Google::Ads::GoogleAds::V25::Resourcesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Resources + AdGroupCriterionSimulation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.AdGroupCriterionSimulation").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/resources/ad_group_customizer_pb.rb b/lib/google/ads/google_ads/v25/resources/ad_group_customizer_pb.rb new file mode 100644 index 000000000..624f03159 --- /dev/null +++ b/lib/google/ads/google_ads/v25/resources/ad_group_customizer_pb.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/resources/ad_group_customizer.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/common/customizer_value_pb' +require 'google/ads/google_ads/v25/enums/customizer_value_status_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' + + +descriptor_data = "\ncustomers/{customer_id}/adGroupLabels/{ad_group_id}~{label_id}B\x0b\n\t_ad_groupB\x08\n\x06_labelB\x83\x02\n&com.google.ads.googleads.v25.resourcesB\x11\x41\x64GroupLabelProtoP\x01ZKgoogle.golang.org/genproto/googleapis/ads/googleads/v25/resources;resources\xa2\x02\x03GAA\xaa\x02\"Google.Ads.GoogleAds.V25.Resources\xca\x02\"Google\\Ads\\GoogleAds\\V25\\Resources\xea\x02&Google::Ads::GoogleAds::V25::Resourcesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Resources + AdGroupLabel = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.AdGroupLabel").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/resources/ad_group_pb.rb b/lib/google/ads/google_ads/v25/resources/ad_group_pb.rb new file mode 100644 index 000000000..424f8ef55 --- /dev/null +++ b/lib/google/ads/google_ads/v25/resources/ad_group_pb.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/resources/ad_group.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/common/custom_parameter_pb' +require 'google/ads/google_ads/v25/common/targeting_setting_pb' +require 'google/ads/google_ads/v25/enums/ad_group_ad_rotation_mode_pb' +require 'google/ads/google_ads/v25/enums/ad_group_primary_status_pb' +require 'google/ads/google_ads/v25/enums/ad_group_primary_status_reason_pb' +require 'google/ads/google_ads/v25/enums/ad_group_status_pb' +require 'google/ads/google_ads/v25/enums/ad_group_type_pb' +require 'google/ads/google_ads/v25/enums/asset_field_type_pb' +require 'google/ads/google_ads/v25/enums/asset_set_type_pb' +require 'google/ads/google_ads/v25/enums/bidding_source_pb' +require 'google/ads/google_ads/v25/enums/demand_gen_channel_config_pb' +require 'google/ads/google_ads/v25/enums/demand_gen_channel_strategy_pb' +require 'google/ads/google_ads/v25/enums/targeting_dimension_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' + + +descriptor_data = "\n1google/ads/googleads/v25/resources/ad_group.proto\x12\"google.ads.googleads.v25.resources\x1a\x36google/ads/googleads/v25/common/custom_parameter.proto\x1a\x37google/ads/googleads/v25/common/targeting_setting.proto\x1a>google/ads/googleads/v25/enums/ad_group_ad_rotation_mode.proto\x1agoogle/ads/googleads/v25/enums/demand_gen_channel_config.proto\x1a@google/ads/googleads/v25/enums/demand_gen_channel_strategy.proto\x1a\x38google/ads/googleads/v25/enums/targeting_dimension.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\xdc#\n\x07\x41\x64Group\x12?\n\rresource_name\x18\x01 \x01(\tB(\xe0\x41\x05\xfa\x41\"\n googleads.googleapis.com/AdGroup\x12\x14\n\x02id\x18\" \x01(\x03\x42\x03\xe0\x41\x03H\x00\x88\x01\x01\x12\x11\n\x04name\x18# \x01(\tH\x01\x88\x01\x01\x12O\n\x06status\x18\x05 \x01(\x0e\x32?.google.ads.googleads.v25.enums.AdGroupStatusEnum.AdGroupStatus\x12N\n\x04type\x18\x0c \x01(\x0e\x32;.google.ads.googleads.v25.enums.AdGroupTypeEnum.AdGroupTypeB\x03\xe0\x41\x05\x12i\n\x10\x61\x64_rotation_mode\x18\x16 \x01(\x0e\x32O.google.ads.googleads.v25.enums.AdGroupAdRotationModeEnum.AdGroupAdRotationMode\x12\x44\n\rbase_ad_group\x18$ \x01(\tB(\xe0\x41\x03\xfa\x41\"\n googleads.googleapis.com/AdGroupH\x02\x88\x01\x01\x12\"\n\x15tracking_url_template\x18% \x01(\tH\x03\x88\x01\x01\x12O\n\x15url_custom_parameters\x18\x06 \x03(\x0b\x32\x30.google.ads.googleads.v25.common.CustomParameter\x12@\n\x08\x63\x61mpaign\x18& \x01(\tB)\xe0\x41\x05\xfa\x41#\n!googleads.googleapis.com/CampaignH\x04\x88\x01\x01\x12\x1b\n\x0e\x63pc_bid_micros\x18\' \x01(\x03H\x05\x88\x01\x01\x12*\n\x18\x65\x66\x66\x65\x63tive_cpc_bid_micros\x18\x39 \x01(\x03\x42\x03\xe0\x41\x03H\x06\x88\x01\x01\x12\x1b\n\x0e\x63pm_bid_micros\x18( \x01(\x03H\x07\x88\x01\x01\x12\x1e\n\x11target_cpa_micros\x18) \x01(\x03H\x08\x88\x01\x01\x12\x1b\n\x0e\x63pv_bid_micros\x18* \x01(\x03H\t\x88\x01\x01\x12\x1e\n\x11target_cpm_micros\x18+ \x01(\x03H\n\x88\x01\x01\x12\x18\n\x0btarget_roas\x18, \x01(\x01H\x0b\x88\x01\x01\x12#\n\x16percent_cpc_bid_micros\x18- \x01(\x03H\x0c\x88\x01\x01\x12\x1d\n\x10\x66ixed_cpm_micros\x18@ \x01(\x03H\r\x88\x01\x01\x12\x1e\n\x11target_cpv_micros\x18\x41 \x01(\x03H\x0e\x88\x01\x01\x12\x1e\n\x11target_cpc_micros\x18\x44 \x01(\x03H\x0f\x88\x01\x01\x12#\n\x1boptimized_targeting_enabled\x18; \x01(\x08\x12%\n\x1d\x65xclude_demographic_expansion\x18\x43 \x01(\x08\x12o\n\x1c\x64isplay_custom_bid_dimension\x18\x17 \x01(\x0e\x32I.google.ads.googleads.v25.enums.TargetingDimensionEnum.TargetingDimension\x12\x1d\n\x10\x66inal_url_suffix\x18. \x01(\tH\x10\x88\x01\x01\x12L\n\x11targeting_setting\x18\x19 \x01(\x0b\x32\x31.google.ads.googleads.v25.common.TargetingSetting\x12Z\n\x10\x61udience_setting\x18\x38 \x01(\x0b\x32;.google.ads.googleads.v25.resources.AdGroup.AudienceSettingB\x03\xe0\x41\x05\x12-\n\x1b\x65\x66\x66\x65\x63tive_target_cpa_micros\x18/ \x01(\x03\x42\x03\xe0\x41\x03H\x11\x88\x01\x01\x12i\n\x1b\x65\x66\x66\x65\x63tive_target_cpa_source\x18\x1d \x01(\x0e\x32?.google.ads.googleads.v25.enums.BiddingSourceEnum.BiddingSourceB\x03\xe0\x41\x03\x12\'\n\x15\x65\x66\x66\x65\x63tive_target_roas\x18\x30 \x01(\x01\x42\x03\xe0\x41\x03H\x12\x88\x01\x01\x12j\n\x1c\x65\x66\x66\x65\x63tive_target_roas_source\x18 \x01(\x0e\x32?.google.ads.googleads.v25.enums.BiddingSourceEnum.BiddingSourceB\x03\xe0\x41\x03\x12&\n\x14\x65\x66\x66\x65\x63tive_target_cpc\x18\x45 \x01(\x03\x42\x03\xe0\x41\x03H\x13\x88\x01\x01\x12i\n\x1b\x65\x66\x66\x65\x63tive_target_cpc_source\x18\x46 \x01(\x0e\x32?.google.ads.googleads.v25.enums.BiddingSourceEnum.BiddingSourceB\x03\xe0\x41\x03\x12=\n\x06labels\x18\x31 \x03(\tB-\xe0\x41\x03\xfa\x41\'\n%googleads.googleapis.com/AdGroupLabel\x12l\n!excluded_parent_asset_field_types\x18\x36 \x03(\x0e\x32\x41.google.ads.googleads.v25.enums.AssetFieldTypeEnum.AssetFieldType\x12\x66\n\x1f\x65xcluded_parent_asset_set_types\x18: \x03(\x0e\x32=.google.ads.googleads.v25.enums.AssetSetTypeEnum.AssetSetType\x12j\n\x0eprimary_status\x18> \x01(\x0e\x32M.google.ads.googleads.v25.enums.AdGroupPrimaryStatusEnum.AdGroupPrimaryStatusB\x03\xe0\x41\x03\x12~\n\x16primary_status_reasons\x18? \x03(\x0e\x32Y.google.ads.googleads.v25.enums.AdGroupPrimaryStatusReasonEnum.AdGroupPrimaryStatusReasonB\x03\xe0\x41\x03\x12j\n\x1c\x64\x65mand_gen_ad_group_settings\x18[ \x01(\x0b\x32\x44.google.ads.googleads.v25.resources.AdGroup.DemandGenAdGroupSettings\x12\x61\n\x17video_ad_group_settings\x18\\ \x01(\x0b\x32@.google.ads.googleads.v25.resources.AdGroup.VideoAdGroupSettings\x12`\n\x17\x61i_max_ad_group_setting\x18G \x01(\x0b\x32?.google.ads.googleads.v25.resources.AdGroup.AiMaxAdGroupSetting\x12i\n\x1bvertical_ads_format_setting\x18H \x01(\x0b\x32\x44.google.ads.googleads.v25.resources.AdGroup.VerticalAdsFormatSetting\x1a\x34\n\x0f\x41udienceSetting\x12!\n\x14use_audience_grouped\x18\x01 \x01(\x08\x42\x03\xe0\x41\x05\x1a\xed\x05\n\x18\x44\x65mandGenAdGroupSettings\x12w\n\x10\x63hannel_controls\x18\x01 \x01(\x0b\x32].google.ads.googleads.v25.resources.AdGroup.DemandGenAdGroupSettings.DemandGenChannelControls\x1a\xd7\x04\n\x18\x44\x65mandGenChannelControls\x12n\n\x0e\x63hannel_config\x18\x01 \x01(\x0e\x32Q.google.ads.googleads.v25.enums.DemandGenChannelConfigEnum.DemandGenChannelConfigB\x03\xe0\x41\x03\x12q\n\x10\x63hannel_strategy\x18\x02 \x01(\x0e\x32U.google.ads.googleads.v25.enums.DemandGenChannelStrategyEnum.DemandGenChannelStrategyH\x00\x12\x94\x01\n\x11selected_channels\x18\x03 \x01(\x0b\x32w.google.ads.googleads.v25.resources.AdGroup.DemandGenAdGroupSettings.DemandGenChannelControls.DemandGenSelectedChannelsH\x00\x1a\xa7\x01\n\x19\x44\x65mandGenSelectedChannels\x12\x19\n\x11youtube_in_stream\x18\x01 \x01(\x08\x12\x17\n\x0fyoutube_in_feed\x18\x02 \x01(\x08\x12\x16\n\x0eyoutube_shorts\x18\x03 \x01(\x08\x12\x10\n\x08\x64iscover\x18\x04 \x01(\x08\x12\r\n\x05gmail\x18\x05 \x01(\x08\x12\x0f\n\x07\x64isplay\x18\x06 \x01(\x08\x12\x0c\n\x04maps\x18\x07 \x01(\x08\x42\x17\n\x15\x63hannel_configuration\x1a\xbd\x01\n\x14VideoAdGroupSettings\x12v\n\x11video_ad_sequence\x18\x01 \x01(\x0b\x32[.google.ads.googleads.v25.resources.AdGroup.VideoAdGroupSettings.VideoAdSequenceStepSetting\x1a-\n\x1aVideoAdSequenceStepSetting\x12\x0f\n\x07step_id\x18\x01 \x01(\x03\x1a\x61\n\x13\x41iMaxAdGroupSetting\x12)\n\x1c\x64isable_search_term_matching\x18\x01 \x01(\x08H\x00\x88\x01\x01\x42\x1f\n\x1d_disable_search_term_matching\x1a\xd8\x01\n\x18VerticalAdsFormatSetting\x12\x1d\n\x10\x64isable_text_ads\x18\x01 \x01(\x08H\x00\x88\x01\x01\x12!\n\x14\x65nable_booking_links\x18\x02 \x01(\x08H\x01\x88\x01\x01\x12*\n\x1d\x65nable_vertical_promotion_ads\x18\x03 \x01(\x08H\x02\x88\x01\x01\x42\x13\n\x11_disable_text_adsB\x17\n\x15_enable_booking_linksB \n\x1e_enable_vertical_promotion_ads:U\xea\x41R\n googleads.googleapis.com/AdGroup\x12.customers/{customer_id}/adGroups/{ad_group_id}B\x05\n\x03_idB\x07\n\x05_nameB\x10\n\x0e_base_ad_groupB\x18\n\x16_tracking_url_templateB\x0b\n\t_campaignB\x11\n\x0f_cpc_bid_microsB\x1b\n\x19_effective_cpc_bid_microsB\x11\n\x0f_cpm_bid_microsB\x14\n\x12_target_cpa_microsB\x11\n\x0f_cpv_bid_microsB\x14\n\x12_target_cpm_microsB\x0e\n\x0c_target_roasB\x19\n\x17_percent_cpc_bid_microsB\x13\n\x11_fixed_cpm_microsB\x14\n\x12_target_cpv_microsB\x14\n\x12_target_cpc_microsB\x13\n\x11_final_url_suffixB\x1e\n\x1c_effective_target_cpa_microsB\x18\n\x16_effective_target_roasB\x17\n\x15_effective_target_cpcB\xfe\x01\n&com.google.ads.googleads.v25.resourcesB\x0c\x41\x64GroupProtoP\x01ZKgoogle.golang.org/genproto/googleapis/ads/googleads/v25/resources;resources\xa2\x02\x03GAA\xaa\x02\"Google.Ads.GoogleAds.V25.Resources\xca\x02\"Google\\Ads\\GoogleAds\\V25\\Resources\xea\x02&Google::Ads::GoogleAds::V25::Resourcesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Resources + AdGroup = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.AdGroup").msgclass + AdGroup::AudienceSetting = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.AdGroup.AudienceSetting").msgclass + AdGroup::DemandGenAdGroupSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.AdGroup.DemandGenAdGroupSettings").msgclass + AdGroup::DemandGenAdGroupSettings::DemandGenChannelControls = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.AdGroup.DemandGenAdGroupSettings.DemandGenChannelControls").msgclass + AdGroup::DemandGenAdGroupSettings::DemandGenChannelControls::DemandGenSelectedChannels = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.AdGroup.DemandGenAdGroupSettings.DemandGenChannelControls.DemandGenSelectedChannels").msgclass + AdGroup::VideoAdGroupSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.AdGroup.VideoAdGroupSettings").msgclass + AdGroup::VideoAdGroupSettings::VideoAdSequenceStepSetting = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.AdGroup.VideoAdGroupSettings.VideoAdSequenceStepSetting").msgclass + AdGroup::AiMaxAdGroupSetting = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.AdGroup.AiMaxAdGroupSetting").msgclass + AdGroup::VerticalAdsFormatSetting = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.AdGroup.VerticalAdsFormatSetting").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/resources/ad_group_simulation_pb.rb b/lib/google/ads/google_ads/v25/resources/ad_group_simulation_pb.rb new file mode 100644 index 000000000..0c92c7837 --- /dev/null +++ b/lib/google/ads/google_ads/v25/resources/ad_group_simulation_pb.rb @@ -0,0 +1,29 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/resources/ad_group_simulation.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/common/simulation_pb' +require 'google/ads/google_ads/v25/enums/simulation_modification_method_pb' +require 'google/ads/google_ads/v25/enums/simulation_type_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' + + +descriptor_data = "\n.google.ads.googleads.v25.common.TargetRoasSimulationPointListB\x03\xe0\x41\x03H\x00:\x9f\x01\xea\x41\x9b\x01\n*googleads.googleapis.com/AdGroupSimulation\x12mcustomers/{customer_id}/adGroupSimulations/{ad_group_id}~{type}~{modification_method}~{start_date}~{end_date}B\x0c\n\npoint_listB\x0e\n\x0c_ad_group_idB\r\n\x0b_start_dateB\x0b\n\t_end_dateB\x88\x02\n&com.google.ads.googleads.v25.resourcesB\x16\x41\x64GroupSimulationProtoP\x01ZKgoogle.golang.org/genproto/googleapis/ads/googleads/v25/resources;resources\xa2\x02\x03GAA\xaa\x02\"Google.Ads.GoogleAds.V25.Resources\xca\x02\"Google\\Ads\\GoogleAds\\V25\\Resources\xea\x02&Google::Ads::GoogleAds::V25::Resourcesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Resources + AdGroupSimulation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.AdGroupSimulation").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/resources/ad_parameter_pb.rb b/lib/google/ads/google_ads/v25/resources/ad_parameter_pb.rb new file mode 100644 index 000000000..ae4fc6618 --- /dev/null +++ b/lib/google/ads/google_ads/v25/resources/ad_parameter_pb.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/resources/ad_parameter.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' + + +descriptor_data = "\n5google/ads/googleads/v25/resources/ad_parameter.proto\x12\"google.ads.googleads.v25.resources\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\xa4\x03\n\x0b\x41\x64Parameter\x12\x43\n\rresource_name\x18\x01 \x01(\tB,\xe0\x41\x05\xfa\x41&\n$googleads.googleapis.com/AdParameter\x12R\n\x12\x61\x64_group_criterion\x18\x05 \x01(\tB1\xe0\x41\x05\xfa\x41+\n)googleads.googleapis.com/AdGroupCriterionH\x00\x88\x01\x01\x12!\n\x0fparameter_index\x18\x06 \x01(\x03\x42\x03\xe0\x41\x05H\x01\x88\x01\x01\x12\x1b\n\x0einsertion_text\x18\x07 \x01(\tH\x02\x88\x01\x01:~\xea\x41{\n$googleads.googleapis.com/AdParameter\x12Scustomers/{customer_id}/adParameters/{ad_group_id}~{criterion_id}~{parameter_index}B\x15\n\x13_ad_group_criterionB\x12\n\x10_parameter_indexB\x11\n\x0f_insertion_textB\x82\x02\n&com.google.ads.googleads.v25.resourcesB\x10\x41\x64ParameterProtoP\x01ZKgoogle.golang.org/genproto/googleapis/ads/googleads/v25/resources;resources\xa2\x02\x03GAA\xaa\x02\"Google.Ads.GoogleAds.V25.Resources\xca\x02\"Google\\Ads\\GoogleAds\\V25\\Resources\xea\x02&Google::Ads::GoogleAds::V25::Resourcesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Resources + AdParameter = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.AdParameter").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/resources/ad_pb.rb b/lib/google/ads/google_ads/v25/resources/ad_pb.rb new file mode 100644 index 000000000..06139e8d2 --- /dev/null +++ b/lib/google/ads/google_ads/v25/resources/ad_pb.rb @@ -0,0 +1,34 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/resources/ad.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/common/ad_type_infos_pb' +require 'google/ads/google_ads/v25/common/custom_parameter_pb' +require 'google/ads/google_ads/v25/common/final_app_url_pb' +require 'google/ads/google_ads/v25/common/synthetic_content_info_pb' +require 'google/ads/google_ads/v25/common/url_collection_pb' +require 'google/ads/google_ads/v25/enums/ad_type_pb' +require 'google/ads/google_ads/v25/enums/device_pb' +require 'google/ads/google_ads/v25/enums/system_managed_entity_source_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' + + +descriptor_data = "\n+google/ads/googleads/v25/resources/ad.proto\x12\"google.ads.googleads.v25.resources\x1a\x33google/ads/googleads/v25/common/ad_type_infos.proto\x1a\x36google/ads/googleads/v25/common/custom_parameter.proto\x1a\x33google/ads/googleads/v25/common/final_app_url.proto\x1a.google.ads.googleads.v25.common.LegacyResponsiveDisplayAdInfoH\x00\x12<\n\x06\x61pp_ad\x18\x1d \x01(\x0b\x32*.google.ads.googleads.v25.common.AppAdInfoH\x00\x12]\n\x15legacy_app_install_ad\x18\x1e \x01(\x0b\x32\x37.google.ads.googleads.v25.common.LegacyAppInstallAdInfoB\x03\xe0\x41\x05H\x00\x12Y\n\x15responsive_display_ad\x18\x1f \x01(\x0b\x32\x38.google.ads.googleads.v25.common.ResponsiveDisplayAdInfoH\x00\x12@\n\x08local_ad\x18 \x01(\x0b\x32,.google.ads.googleads.v25.common.LocalAdInfoH\x00\x12Q\n\x11\x64isplay_upload_ad\x18! \x01(\x0b\x32\x34.google.ads.googleads.v25.common.DisplayUploadAdInfoH\x00\x12Q\n\x11\x61pp_engagement_ad\x18\" \x01(\x0b\x32\x34.google.ads.googleads.v25.common.AppEngagementAdInfoH\x00\x12j\n\x1eshopping_comparison_listing_ad\x18$ \x01(\x0b\x32@.google.ads.googleads.v25.common.ShoppingComparisonListingAdInfoH\x00\x12Q\n\x11smart_campaign_ad\x18\x30 \x01(\x0b\x32\x34.google.ads.googleads.v25.common.SmartCampaignAdInfoH\x00\x12\\\n\x17\x61pp_pre_registration_ad\x18\x32 \x01(\x0b\x32\x39.google.ads.googleads.v25.common.AppPreRegistrationAdInfoH\x00\x12_\n\x19\x64\x65mand_gen_multi_asset_ad\x18> \x01(\x0b\x32:.google.ads.googleads.v25.common.DemandGenMultiAssetAdInfoH\x00\x12Z\n\x16\x64\x65mand_gen_carousel_ad\x18? \x01(\x0b\x32\x38.google.ads.googleads.v25.common.DemandGenCarouselAdInfoH\x00\x12i\n\x1e\x64\x65mand_gen_video_responsive_ad\x18@ \x01(\x0b\x32?.google.ads.googleads.v25.common.DemandGenVideoResponsiveAdInfoH\x00\x12X\n\x15\x64\x65mand_gen_product_ad\x18= \x01(\x0b\x32\x37.google.ads.googleads.v25.common.DemandGenProductAdInfoH\x00\x12\x42\n\ttravel_ad\x18\x36 \x01(\x0b\x32-.google.ads.googleads.v25.common.TravelAdInfoH\x00:E\xea\x41\x42\n\x1bgoogleads.googleapis.com/Ad\x12#customers/{customer_id}/ads/{ad_id}B\t\n\x07\x61\x64_dataB\x05\n\x03_idB\x18\n\x16_tracking_url_templateB\x13\n\x11_final_url_suffixB\x0e\n\x0c_display_urlB\x16\n\x14_added_by_google_adsB\x07\n\x05_nameB\xf9\x01\n&com.google.ads.googleads.v25.resourcesB\x07\x41\x64ProtoP\x01ZKgoogle.golang.org/genproto/googleapis/ads/googleads/v25/resources;resources\xa2\x02\x03GAA\xaa\x02\"Google.Ads.GoogleAds.V25.Resources\xca\x02\"Google\\Ads\\GoogleAds\\V25\\Resources\xea\x02&Google::Ads::GoogleAds::V25::Resourcesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Resources + Ad = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.Ad").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/resources/ad_schedule_view_pb.rb b/lib/google/ads/google_ads/v25/resources/ad_schedule_view_pb.rb new file mode 100644 index 000000000..5f4ca5991 --- /dev/null +++ b/lib/google/ads/google_ads/v25/resources/ad_schedule_view_pb.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/resources/ad_schedule_view.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' + + +descriptor_data = "\n9google/ads/googleads/v25/resources/ad_schedule_view.proto\x12\"google.ads.googleads.v25.resources\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\xcc\x01\n\x0e\x41\x64ScheduleView\x12\x46\n\rresource_name\x18\x01 \x01(\tB/\xe0\x41\x03\xfa\x41)\n\'googleads.googleapis.com/AdScheduleView:r\xea\x41o\n\'googleads.googleapis.com/AdScheduleView\x12\x44\x63ustomers/{customer_id}/adScheduleViews/{campaign_id}~{criterion_id}B\x85\x02\n&com.google.ads.googleads.v25.resourcesB\x13\x41\x64ScheduleViewProtoP\x01ZKgoogle.golang.org/genproto/googleapis/ads/googleads/v25/resources;resources\xa2\x02\x03GAA\xaa\x02\"Google.Ads.GoogleAds.V25.Resources\xca\x02\"Google\\Ads\\GoogleAds\\V25\\Resources\xea\x02&Google::Ads::GoogleAds::V25::Resourcesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Resources + AdScheduleView = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.AdScheduleView").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/resources/age_range_view_pb.rb b/lib/google/ads/google_ads/v25/resources/age_range_view_pb.rb new file mode 100644 index 000000000..3cd83b344 --- /dev/null +++ b/lib/google/ads/google_ads/v25/resources/age_range_view_pb.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/resources/age_range_view.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' + + +descriptor_data = "\n7google/ads/googleads/v25/resources/age_range_view.proto\x12\"google.ads.googleads.v25.resources\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\xc4\x01\n\x0c\x41geRangeView\x12\x44\n\rresource_name\x18\x01 \x01(\tB-\xe0\x41\x03\xfa\x41\'\n%googleads.googleapis.com/AgeRangeView:n\xea\x41k\n%googleads.googleapis.com/AgeRangeView\x12\x42\x63ustomers/{customer_id}/ageRangeViews/{ad_group_id}~{criterion_id}B\x83\x02\n&com.google.ads.googleads.v25.resourcesB\x11\x41geRangeViewProtoP\x01ZKgoogle.golang.org/genproto/googleapis/ads/googleads/v25/resources;resources\xa2\x02\x03GAA\xaa\x02\"Google.Ads.GoogleAds.V25.Resources\xca\x02\"Google\\Ads\\GoogleAds\\V25\\Resources\xea\x02&Google::Ads::GoogleAds::V25::Resourcesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Resources + AgeRangeView = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.AgeRangeView").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/resources/ai_max_search_term_ad_combination_view_pb.rb b/lib/google/ads/google_ads/v25/resources/ai_max_search_term_ad_combination_view_pb.rb new file mode 100644 index 000000000..4f0e2a8d3 --- /dev/null +++ b/lib/google/ads/google_ads/v25/resources/ai_max_search_term_ad_combination_view_pb.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/resources/ai_max_search_term_ad_combination_view.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' + + +descriptor_data = "\nOgoogle/ads/googleads/v25/resources/ai_max_search_term_ad_combination_view.proto\x12\"google.ads.googleads.v25.resources\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\xcb\x04\n AiMaxSearchTermAdCombinationView\x12X\n\rresource_name\x18\x01 \x01(\tBA\xe0\x41\x03\xfa\x41;\n9googleads.googleapis.com/AiMaxSearchTermAdCombinationView\x12?\n\x08\x61\x64_group\x18\x02 \x01(\tB(\xe0\x41\x03\xfa\x41\"\n googleads.googleapis.com/AdGroupH\x00\x88\x01\x01\x12\x1d\n\x0bsearch_term\x18\x03 \x01(\tB\x03\xe0\x41\x03H\x01\x88\x01\x01\x12\x1e\n\x0clanding_page\x18\x04 \x01(\tB\x03\xe0\x41\x03H\x02\x88\x01\x01\x12\x1a\n\x08headline\x18\x05 \x01(\tB\x03\xe0\x41\x03H\x03\x88\x01\x01:\xf5\x01\xea\x41\xf1\x01\n9googleads.googleapis.com/AiMaxSearchTermAdCombinationView\x12ocustomers/{customer_id}/aiMaxSearchTermAdCombinationViews/{ad_group_id}~{search_term}~{landing_page}~{headline}*!aiMaxSearchTermAdCombinationViews2 aiMaxSearchTermAdCombinationViewB\x0b\n\t_ad_groupB\x0e\n\x0c_search_termB\x0f\n\r_landing_pageB\x0b\n\t_headlineB\x97\x02\n&com.google.ads.googleads.v25.resourcesB%AiMaxSearchTermAdCombinationViewProtoP\x01ZKgoogle.golang.org/genproto/googleapis/ads/googleads/v25/resources;resources\xa2\x02\x03GAA\xaa\x02\"Google.Ads.GoogleAds.V25.Resources\xca\x02\"Google\\Ads\\GoogleAds\\V25\\Resources\xea\x02&Google::Ads::GoogleAds::V25::Resourcesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Resources + AiMaxSearchTermAdCombinationView = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.AiMaxSearchTermAdCombinationView").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/resources/android_privacy_shared_key_google_ad_group_pb.rb b/lib/google/ads/google_ads/v25/resources/android_privacy_shared_key_google_ad_group_pb.rb new file mode 100644 index 000000000..13fb469bd --- /dev/null +++ b/lib/google/ads/google_ads/v25/resources/android_privacy_shared_key_google_ad_group_pb.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/resources/android_privacy_shared_key_google_ad_group.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/enums/android_privacy_interaction_type_pb' +require 'google/ads/google_ads/v25/enums/android_privacy_network_type_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' + + +descriptor_data = "\nSgoogle/ads/googleads/v25/resources/android_privacy_shared_key_google_ad_group.proto\x12\"google.ads.googleads.v25.resources\x1a\x45google/ads/googleads/v25/enums/android_privacy_interaction_type.proto\x1a\x41google/ads/googleads/v25/enums/android_privacy_network_type.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\xa6\x06\n$AndroidPrivacySharedKeyGoogleAdGroup\x12\\\n\rresource_name\x18\x01 \x01(\tBE\xe0\x41\x03\xfa\x41?\n=googleads.googleapis.com/AndroidPrivacySharedKeyGoogleAdGroup\x12\x18\n\x0b\x63\x61mpaign_id\x18\x02 \x01(\x03\x42\x03\xe0\x41\x03\x12\x8e\x01\n android_privacy_interaction_type\x18\x03 \x01(\x0e\x32_.google.ads.googleads.v25.enums.AndroidPrivacyInteractionTypeEnum.AndroidPrivacyInteractionTypeB\x03\xe0\x41\x03\x12-\n android_privacy_interaction_date\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12\x82\x01\n\x1c\x61ndroid_privacy_network_type\x18\x05 \x01(\x0e\x32W.google.ads.googleads.v25.enums.AndroidPrivacyNetworkTypeEnum.AndroidPrivacyNetworkTypeB\x03\xe0\x41\x03\x12\x18\n\x0b\x61\x64_group_id\x18\x06 \x01(\x03\x42\x03\xe0\x41\x03\x12 \n\x13shared_ad_group_key\x18\x07 \x01(\tB\x03\xe0\x41\x03:\x84\x02\xea\x41\x80\x02\n=googleads.googleapis.com/AndroidPrivacySharedKeyGoogleAdGroup\x12\xbe\x01\x63ustomers/{customer_id}/androidPrivacySharedKeyGoogleAdGroups/{campaign_id}~{ad_group_id}~{android_privacy_interaction_type}~{android_privacy_network_type}~{android_privacy_interaction_date}B\x9b\x02\n&com.google.ads.googleads.v25.resourcesB)AndroidPrivacySharedKeyGoogleAdGroupProtoP\x01ZKgoogle.golang.org/genproto/googleapis/ads/googleads/v25/resources;resources\xa2\x02\x03GAA\xaa\x02\"Google.Ads.GoogleAds.V25.Resources\xca\x02\"Google\\Ads\\GoogleAds\\V25\\Resources\xea\x02&Google::Ads::GoogleAds::V25::Resourcesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Resources + AndroidPrivacySharedKeyGoogleAdGroup = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.AndroidPrivacySharedKeyGoogleAdGroup").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/resources/android_privacy_shared_key_google_campaign_pb.rb b/lib/google/ads/google_ads/v25/resources/android_privacy_shared_key_google_campaign_pb.rb new file mode 100644 index 000000000..420d72c4f --- /dev/null +++ b/lib/google/ads/google_ads/v25/resources/android_privacy_shared_key_google_campaign_pb.rb @@ -0,0 +1,27 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/resources/android_privacy_shared_key_google_campaign.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/enums/android_privacy_interaction_type_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' + + +descriptor_data = "\nSgoogle/ads/googleads/v25/resources/android_privacy_shared_key_google_campaign.proto\x12\"google.ads.googleads.v25.resources\x1a\x45google/ads/googleads/v25/enums/android_privacy_interaction_type.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\xde\x04\n%AndroidPrivacySharedKeyGoogleCampaign\x12]\n\rresource_name\x18\x01 \x01(\tBF\xe0\x41\x03\xfa\x41@\n>googleads.googleapis.com/AndroidPrivacySharedKeyGoogleCampaign\x12\x18\n\x0b\x63\x61mpaign_id\x18\x02 \x01(\x03\x42\x03\xe0\x41\x03\x12\x8e\x01\n android_privacy_interaction_type\x18\x03 \x01(\x0e\x32_.google.ads.googleads.v25.enums.AndroidPrivacyInteractionTypeEnum.AndroidPrivacyInteractionTypeB\x03\xe0\x41\x03\x12-\n android_privacy_interaction_date\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12 \n\x13shared_campaign_key\x18\x05 \x01(\tB\x03\xe0\x41\x03:\xd9\x01\xea\x41\xd5\x01\n>googleads.googleapis.com/AndroidPrivacySharedKeyGoogleCampaign\x12\x92\x01\x63ustomers/{customer_id}/androidPrivacySharedKeyGoogleCampaigns/{campaign_id}~{android_privacy_interaction_type}~{android_privacy_interaction_date}B\x9c\x02\n&com.google.ads.googleads.v25.resourcesB*AndroidPrivacySharedKeyGoogleCampaignProtoP\x01ZKgoogle.golang.org/genproto/googleapis/ads/googleads/v25/resources;resources\xa2\x02\x03GAA\xaa\x02\"Google.Ads.GoogleAds.V25.Resources\xca\x02\"Google\\Ads\\GoogleAds\\V25\\Resources\xea\x02&Google::Ads::GoogleAds::V25::Resourcesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Resources + AndroidPrivacySharedKeyGoogleCampaign = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.AndroidPrivacySharedKeyGoogleCampaign").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/resources/android_privacy_shared_key_google_network_type_pb.rb b/lib/google/ads/google_ads/v25/resources/android_privacy_shared_key_google_network_type_pb.rb new file mode 100644 index 000000000..f0c6a1fff --- /dev/null +++ b/lib/google/ads/google_ads/v25/resources/android_privacy_shared_key_google_network_type_pb.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/resources/android_privacy_shared_key_google_network_type.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/enums/android_privacy_interaction_type_pb' +require 'google/ads/google_ads/v25/enums/android_privacy_network_type_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' + + +descriptor_data = "\nWgoogle/ads/googleads/v25/resources/android_privacy_shared_key_google_network_type.proto\x12\"google.ads.googleads.v25.resources\x1a\x45google/ads/googleads/v25/enums/android_privacy_interaction_type.proto\x1a\x41google/ads/googleads/v25/enums/android_privacy_network_type.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\x92\x06\n(AndroidPrivacySharedKeyGoogleNetworkType\x12`\n\rresource_name\x18\x01 \x01(\tBI\xe0\x41\x03\xfa\x41\x43\nAgoogleads.googleapis.com/AndroidPrivacySharedKeyGoogleNetworkType\x12\x18\n\x0b\x63\x61mpaign_id\x18\x02 \x01(\x03\x42\x03\xe0\x41\x03\x12\x8e\x01\n android_privacy_interaction_type\x18\x03 \x01(\x0e\x32_.google.ads.googleads.v25.enums.AndroidPrivacyInteractionTypeEnum.AndroidPrivacyInteractionTypeB\x03\xe0\x41\x03\x12-\n android_privacy_interaction_date\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12\x82\x01\n\x1c\x61ndroid_privacy_network_type\x18\x05 \x01(\x0e\x32W.google.ads.googleads.v25.enums.AndroidPrivacyNetworkTypeEnum.AndroidPrivacyNetworkTypeB\x03\xe0\x41\x03\x12$\n\x17shared_network_type_key\x18\x06 \x01(\tB\x03\xe0\x41\x03:\xfe\x01\xea\x41\xfa\x01\nAgoogleads.googleapis.com/AndroidPrivacySharedKeyGoogleNetworkType\x12\xb4\x01\x63ustomers/{customer_id}/androidPrivacySharedKeyGoogleNetworkTypes/{campaign_id}~{android_privacy_interaction_type}~{android_privacy_network_type}~{android_privacy_interaction_date}B\x9f\x02\n&com.google.ads.googleads.v25.resourcesB-AndroidPrivacySharedKeyGoogleNetworkTypeProtoP\x01ZKgoogle.golang.org/genproto/googleapis/ads/googleads/v25/resources;resources\xa2\x02\x03GAA\xaa\x02\"Google.Ads.GoogleAds.V25.Resources\xca\x02\"Google\\Ads\\GoogleAds\\V25\\Resources\xea\x02&Google::Ads::GoogleAds::V25::Resourcesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Resources + AndroidPrivacySharedKeyGoogleNetworkType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.AndroidPrivacySharedKeyGoogleNetworkType").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/resources/app_top_combination_view_pb.rb b/lib/google/ads/google_ads/v25/resources/app_top_combination_view_pb.rb new file mode 100644 index 000000000..101c80a48 --- /dev/null +++ b/lib/google/ads/google_ads/v25/resources/app_top_combination_view_pb.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/resources/app_top_combination_view.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/common/asset_usage_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' + + +descriptor_data = "\nAgoogle/ads/googleads/v25/resources/app_top_combination_view.proto\x12\"google.ads.googleads.v25.resources\x1a\x31google/ads/googleads/v25/common/asset_usage.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\xa0\x03\n\x15\x41ppTopCombinationView\x12M\n\rresource_name\x18\x01 \x01(\tB6\xe0\x41\x03\xfa\x41\x30\n.googleads.googleapis.com/AppTopCombinationView\x12o\n\x19\x61\x64_group_top_combinations\x18\x02 \x03(\x0b\x32G.google.ads.googleads.v25.resources.AdGroupCreativeAssetCombinationDataB\x03\xe0\x41\x03:\xc6\x01\xea\x41\xc2\x01\n.googleads.googleapis.com/AppTopCombinationView\x12\x61\x63ustomers/{customer_id}/appTopCombinationViews/{ad_group_id}~{ad_id}~{asset_combination_category}*\x16\x61ppTopCombinationViews2\x15\x61ppTopCombinationView\"\x80\x01\n#AdGroupCreativeAssetCombinationData\x12Y\n\x1f\x61sset_combination_served_assets\x18\x01 \x03(\x0b\x32+.google.ads.googleads.v25.common.AssetUsageB\x03\xe0\x41\x03\x42\x8c\x02\n&com.google.ads.googleads.v25.resourcesB\x1a\x41ppTopCombinationViewProtoP\x01ZKgoogle.golang.org/genproto/googleapis/ads/googleads/v25/resources;resources\xa2\x02\x03GAA\xaa\x02\"Google.Ads.GoogleAds.V25.Resources\xca\x02\"Google\\Ads\\GoogleAds\\V25\\Resources\xea\x02&Google::Ads::GoogleAds::V25::Resourcesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Resources + AppTopCombinationView = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.AppTopCombinationView").msgclass + AdGroupCreativeAssetCombinationData = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.AdGroupCreativeAssetCombinationData").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/resources/applied_incentive_pb.rb b/lib/google/ads/google_ads/v25/resources/applied_incentive_pb.rb new file mode 100644 index 000000000..3e3950f1f --- /dev/null +++ b/lib/google/ads/google_ads/v25/resources/applied_incentive_pb.rb @@ -0,0 +1,27 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/resources/applied_incentive.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/enums/incentive_state_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' + + +descriptor_data = "\n:google/ads/googleads/v25/resources/applied_incentive.proto\x12\"google.ads.googleads.v25.resources\x1a\x34google/ads/googleads/v25/enums/incentive_state.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\xde\x08\n\x10\x41ppliedIncentive\x12H\n\rresource_name\x18\x01 \x01(\tB1\xe0\x41\x03\xfa\x41+\n)googleads.googleapis.com/AppliedIncentive\x12\x1d\n\x0b\x63oupon_code\x18\x02 \x01(\tB\x03\xe0\x41\x03H\x00\x88\x01\x01\x12\x64\n\x0fincentive_state\x18\x03 \x01(\x0e\x32\x41.google.ads.googleads.v25.enums.IncentiveStateEnum.IncentiveStateB\x03\xe0\x41\x03H\x01\x88\x01\x01\x12&\n\x14redemption_date_time\x18\x04 \x01(\tB\x03\xe0\x41\x03H\x02\x88\x01\x01\x12\x32\n fulfillment_expiration_date_time\x18\x05 \x01(\tB\x03\xe0\x41\x03H\x03\x88\x01\x01\x12(\n\x16reward_grant_date_time\x18\x06 \x01(\tB\x03\xe0\x41\x03H\x04\x88\x01\x01\x12-\n\x1breward_expiration_date_time\x18\x07 \x01(\tB\x03\xe0\x41\x03H\x05\x88\x01\x01\x12\x1f\n\rcurrency_code\x18\x08 \x01(\tB\x03\xe0\x41\x03H\x06\x88\x01\x01\x12&\n\x14reward_amount_micros\x18\t \x01(\x03\x42\x03\xe0\x41\x03H\x07\x88\x01\x01\x12\'\n\x15granted_amount_micros\x18\n \x01(\x03\x42\x03\xe0\x41\x03H\x08\x88\x01\x01\x12+\n\x19required_min_spend_micros\x18\x0b \x01(\x03\x42\x03\xe0\x41\x03H\t\x88\x01\x01\x12:\n(current_spend_towards_fulfillment_micros\x18\x0c \x01(\x03\x42\x03\xe0\x41\x03H\n\x88\x01\x01\x12\x31\n\x1freward_balance_remaining_micros\x18\r \x01(\x03\x42\x03\xe0\x41\x03H\x0b\x88\x01\x01:g\xea\x41\x64\n)googleads.googleapis.com/AppliedIncentive\x12\x37\x63ustomers/{customer_id}/appliedIncentives/{coupon_code}B\x0e\n\x0c_coupon_codeB\x12\n\x10_incentive_stateB\x17\n\x15_redemption_date_timeB#\n!_fulfillment_expiration_date_timeB\x19\n\x17_reward_grant_date_timeB\x1e\n\x1c_reward_expiration_date_timeB\x10\n\x0e_currency_codeB\x17\n\x15_reward_amount_microsB\x18\n\x16_granted_amount_microsB\x1c\n\x1a_required_min_spend_microsB+\n)_current_spend_towards_fulfillment_microsB\"\n _reward_balance_remaining_microsB\x87\x02\n&com.google.ads.googleads.v25.resourcesB\x15\x41ppliedIncentiveProtoP\x01ZKgoogle.golang.org/genproto/googleapis/ads/googleads/v25/resources;resources\xa2\x02\x03GAA\xaa\x02\"Google.Ads.GoogleAds.V25.Resources\xca\x02\"Google\\Ads\\GoogleAds\\V25\\Resources\xea\x02&Google::Ads::GoogleAds::V25::Resourcesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Resources + AppliedIncentive = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.AppliedIncentive").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/resources/asset_field_type_view_pb.rb b/lib/google/ads/google_ads/v25/resources/asset_field_type_view_pb.rb new file mode 100644 index 000000000..34683e2a7 --- /dev/null +++ b/lib/google/ads/google_ads/v25/resources/asset_field_type_view_pb.rb @@ -0,0 +1,27 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/resources/asset_field_type_view.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/enums/asset_field_type_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' + + +descriptor_data = "\n>google/ads/googleads/v25/resources/asset_field_type_view.proto\x12\"google.ads.googleads.v25.resources\x1a\x35google/ads/googleads/v25/enums/asset_field_type.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\xa8\x02\n\x12\x41ssetFieldTypeView\x12J\n\rresource_name\x18\x01 \x01(\tB3\xe0\x41\x03\xfa\x41-\n+googleads.googleapis.com/AssetFieldTypeView\x12Z\n\nfield_type\x18\x03 \x01(\x0e\x32\x41.google.ads.googleads.v25.enums.AssetFieldTypeEnum.AssetFieldTypeB\x03\xe0\x41\x03:j\xea\x41g\n+googleads.googleapis.com/AssetFieldTypeView\x12\x38\x63ustomers/{customer_id}/assetFieldTypeViews/{field_type}B\x89\x02\n&com.google.ads.googleads.v25.resourcesB\x17\x41ssetFieldTypeViewProtoP\x01ZKgoogle.golang.org/genproto/googleapis/ads/googleads/v25/resources;resources\xa2\x02\x03GAA\xaa\x02\"Google.Ads.GoogleAds.V25.Resources\xca\x02\"Google\\Ads\\GoogleAds\\V25\\Resources\xea\x02&Google::Ads::GoogleAds::V25::Resourcesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Resources + AssetFieldTypeView = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.AssetFieldTypeView").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/resources/asset_group_asset_pb.rb b/lib/google/ads/google_ads/v25/resources/asset_group_asset_pb.rb new file mode 100644 index 000000000..e48431aef --- /dev/null +++ b/lib/google/ads/google_ads/v25/resources/asset_group_asset_pb.rb @@ -0,0 +1,33 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/resources/asset_group_asset.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/common/asset_policy_pb' +require 'google/ads/google_ads/v25/common/policy_summary_pb' +require 'google/ads/google_ads/v25/enums/asset_field_type_pb' +require 'google/ads/google_ads/v25/enums/asset_link_primary_status_pb' +require 'google/ads/google_ads/v25/enums/asset_link_primary_status_reason_pb' +require 'google/ads/google_ads/v25/enums/asset_link_status_pb' +require 'google/ads/google_ads/v25/enums/asset_source_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' + + +descriptor_data = "\n:google/ads/googleads/v25/resources/asset_group_asset.proto\x12\"google.ads.googleads.v25.resources\x1a\x32google/ads/googleads/v25/common/asset_policy.proto\x1a\x34google/ads/googleads/v25/common/policy_summary.proto\x1a\x35google/ads/googleads/v25/enums/asset_field_type.proto\x1a>google/ads/googleads/v25/enums/asset_link_primary_status.proto\x1a\x45google/ads/googleads/v25/enums/asset_link_primary_status_reason.proto\x1a\x36google/ads/googleads/v25/enums/asset_link_status.proto\x1a\x31google/ads/googleads/v25/enums/asset_source.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\xfb\x07\n\x0f\x41ssetGroupAsset\x12G\n\rresource_name\x18\x01 \x01(\tB0\xe0\x41\x05\xfa\x41*\n(googleads.googleapis.com/AssetGroupAsset\x12@\n\x0b\x61sset_group\x18\x02 \x01(\tB+\xe0\x41\x05\xfa\x41%\n#googleads.googleapis.com/AssetGroup\x12\x35\n\x05\x61sset\x18\x03 \x01(\tB&\xe0\x41\x05\xfa\x41 \n\x1egoogleads.googleapis.com/Asset\x12U\n\nfield_type\x18\x04 \x01(\x0e\x32\x41.google.ads.googleads.v25.enums.AssetFieldTypeEnum.AssetFieldType\x12S\n\x06status\x18\x05 \x01(\x0e\x32\x43.google.ads.googleads.v25.enums.AssetLinkStatusEnum.AssetLinkStatus\x12n\n\x0eprimary_status\x18\x08 \x01(\x0e\x32Q.google.ads.googleads.v25.enums.AssetLinkPrimaryStatusEnum.AssetLinkPrimaryStatusB\x03\xe0\x41\x03\x12\x82\x01\n\x16primary_status_reasons\x18\t \x03(\x0e\x32].google.ads.googleads.v25.enums.AssetLinkPrimaryStatusReasonEnum.AssetLinkPrimaryStatusReasonB\x03\xe0\x41\x03\x12\x63\n\x16primary_status_details\x18\n \x03(\x0b\x32>.google.ads.googleads.v25.common.AssetLinkPrimaryStatusDetailsB\x03\xe0\x41\x03\x12K\n\x0epolicy_summary\x18\x07 \x01(\x0b\x32..google.ads.googleads.v25.common.PolicySummaryB\x03\xe0\x41\x03\x12P\n\x06source\x18\x0b \x01(\x0e\x32;.google.ads.googleads.v25.enums.AssetSourceEnum.AssetSourceB\x03\xe0\x41\x03:\x80\x01\xea\x41}\n(googleads.googleapis.com/AssetGroupAsset\x12Qcustomers/{customer_id}/assetGroupAssets/{asset_group_id}~{asset_id}~{field_type}B\x86\x02\n&com.google.ads.googleads.v25.resourcesB\x14\x41ssetGroupAssetProtoP\x01ZKgoogle.golang.org/genproto/googleapis/ads/googleads/v25/resources;resources\xa2\x02\x03GAA\xaa\x02\"Google.Ads.GoogleAds.V25.Resources\xca\x02\"Google\\Ads\\GoogleAds\\V25\\Resources\xea\x02&Google::Ads::GoogleAds::V25::Resourcesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Resources + AssetGroupAsset = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.AssetGroupAsset").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/resources/asset_group_listing_group_filter_pb.rb b/lib/google/ads/google_ads/v25/resources/asset_group_listing_group_filter_pb.rb new file mode 100644 index 000000000..3f792a724 --- /dev/null +++ b/lib/google/ads/google_ads/v25/resources/asset_group_listing_group_filter_pb.rb @@ -0,0 +1,45 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/resources/asset_group_listing_group_filter.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/enums/listing_group_filter_custom_attribute_index_pb' +require 'google/ads/google_ads/v25/enums/listing_group_filter_listing_source_pb' +require 'google/ads/google_ads/v25/enums/listing_group_filter_product_category_level_pb' +require 'google/ads/google_ads/v25/enums/listing_group_filter_product_channel_pb' +require 'google/ads/google_ads/v25/enums/listing_group_filter_product_condition_pb' +require 'google/ads/google_ads/v25/enums/listing_group_filter_product_type_level_pb' +require 'google/ads/google_ads/v25/enums/listing_group_filter_type_enum_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' + + +descriptor_data = "\nIgoogle/ads/googleads/v25/resources/asset_group_listing_group_filter.proto\x12\"google.ads.googleads.v25.resources\x1aPgoogle/ads/googleads/v25/enums/listing_group_filter_custom_attribute_index.proto\x1aHgoogle/ads/googleads/v25/enums/listing_group_filter_listing_source.proto\x1aPgoogle/ads/googleads/v25/enums/listing_group_filter_product_category_level.proto\x1aIgoogle/ads/googleads/v25/enums/listing_group_filter_product_channel.proto\x1aKgoogle/ads/googleads/v25/enums/listing_group_filter_product_condition.proto\x1aLgoogle/ads/googleads/v25/enums/listing_group_filter_product_type_level.proto\x1a\x43google/ads/googleads/v25/enums/listing_group_filter_type_enum.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\xe1\x06\n\x1c\x41ssetGroupListingGroupFilter\x12T\n\rresource_name\x18\x01 \x01(\tB=\xe0\x41\x05\xfa\x41\x37\n5googleads.googleapis.com/AssetGroupListingGroupFilter\x12@\n\x0b\x61sset_group\x18\x02 \x01(\tB+\xe0\x41\x05\xfa\x41%\n#googleads.googleapis.com/AssetGroup\x12\x0f\n\x02id\x18\x03 \x01(\x03\x42\x03\xe0\x41\x03\x12\x64\n\x04type\x18\x04 \x01(\x0e\x32Q.google.ads.googleads.v25.enums.ListingGroupFilterTypeEnum.ListingGroupFilterTypeB\x03\xe0\x41\x05\x12\x80\x01\n\x0elisting_source\x18\t \x01(\x0e\x32\x63.google.ads.googleads.v25.enums.ListingGroupFilterListingSourceEnum.ListingGroupFilterListingSourceB\x03\xe0\x41\x05\x12S\n\ncase_value\x18\x06 \x01(\x0b\x32?.google.ads.googleads.v25.resources.ListingGroupFilterDimension\x12\x62\n\x1bparent_listing_group_filter\x18\x07 \x01(\tB=\xe0\x41\x05\xfa\x41\x37\n5googleads.googleapis.com/AssetGroupListingGroupFilter\x12V\n\x04path\x18\x08 \x01(\x0b\x32\x43.google.ads.googleads.v25.resources.ListingGroupFilterDimensionPathB\x03\xe0\x41\x03:\x9d\x01\xea\x41\x99\x01\n5googleads.googleapis.com/AssetGroupListingGroupFilter\x12`customers/{customer_id}/assetGroupListingGroupFilters/{asset_group_id}~{listing_group_filter_id}\"{\n\x1fListingGroupFilterDimensionPath\x12X\n\ndimensions\x18\x01 \x03(\x0b\x32?.google.ads.googleads.v25.resources.ListingGroupFilterDimensionB\x03\xe0\x41\x03\"\xbc\x11\n\x1bListingGroupFilterDimension\x12k\n\x10product_category\x18\n \x01(\x0b\x32O.google.ads.googleads.v25.resources.ListingGroupFilterDimension.ProductCategoryH\x00\x12\x65\n\rproduct_brand\x18\x02 \x01(\x0b\x32L.google.ads.googleads.v25.resources.ListingGroupFilterDimension.ProductBrandH\x00\x12i\n\x0fproduct_channel\x18\x03 \x01(\x0b\x32N.google.ads.googleads.v25.resources.ListingGroupFilterDimension.ProductChannelH\x00\x12m\n\x11product_condition\x18\x04 \x01(\x0b\x32P.google.ads.googleads.v25.resources.ListingGroupFilterDimension.ProductConditionH\x00\x12z\n\x18product_custom_attribute\x18\x05 \x01(\x0b\x32V.google.ads.googleads.v25.resources.ListingGroupFilterDimension.ProductCustomAttributeH\x00\x12h\n\x0fproduct_item_id\x18\x06 \x01(\x0b\x32M.google.ads.googleads.v25.resources.ListingGroupFilterDimension.ProductItemIdH\x00\x12\x63\n\x0cproduct_type\x18\x07 \x01(\x0b\x32K.google.ads.googleads.v25.resources.ListingGroupFilterDimension.ProductTypeH\x00\x12Z\n\x07webpage\x18\t \x01(\x0b\x32G.google.ads.googleads.v25.resources.ListingGroupFilterDimension.WebpageH\x00\x12r\n\x14retail_filter_bundle\x18\x0b \x01(\x0b\x32R.google.ads.googleads.v25.resources.ListingGroupFilterDimension.RetailFilterBundleH\x00\x1a\xbe\x01\n\x0fProductCategory\x12\x18\n\x0b\x63\x61tegory_id\x18\x01 \x01(\x03H\x00\x88\x01\x01\x12\x80\x01\n\x05level\x18\x02 \x01(\x0e\x32q.google.ads.googleads.v25.enums.ListingGroupFilterProductCategoryLevelEnum.ListingGroupFilterProductCategoryLevelB\x0e\n\x0c_category_id\x1a,\n\x0cProductBrand\x12\x12\n\x05value\x18\x01 \x01(\tH\x00\x88\x01\x01\x42\x08\n\x06_value\x1a\x88\x01\n\x0eProductChannel\x12v\n\x07\x63hannel\x18\x01 \x01(\x0e\x32\x65.google.ads.googleads.v25.enums.ListingGroupFilterProductChannelEnum.ListingGroupFilterProductChannel\x1a\x90\x01\n\x10ProductCondition\x12|\n\tcondition\x18\x01 \x01(\x0e\x32i.google.ads.googleads.v25.enums.ListingGroupFilterProductConditionEnum.ListingGroupFilterProductCondition\x1a\xb9\x01\n\x16ProductCustomAttribute\x12\x12\n\x05value\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x80\x01\n\x05index\x18\x02 \x01(\x0e\x32q.google.ads.googleads.v25.enums.ListingGroupFilterCustomAttributeIndexEnum.ListingGroupFilterCustomAttributeIndexB\x08\n\x06_value\x1a-\n\rProductItemId\x12\x12\n\x05value\x18\x01 \x01(\tH\x00\x88\x01\x01\x42\x08\n\x06_value\x1a\xa5\x01\n\x0bProductType\x12\x12\n\x05value\x18\x01 \x01(\tH\x00\x88\x01\x01\x12x\n\x05level\x18\x02 \x01(\x0e\x32i.google.ads.googleads.v25.enums.ListingGroupFilterProductTypeLevelEnum.ListingGroupFilterProductTypeLevelB\x08\n\x06_value\x1ao\n\x07Webpage\x12\x64\n\nconditions\x18\x01 \x03(\x0b\x32P.google.ads.googleads.v25.resources.ListingGroupFilterDimension.WebpageCondition\x1aO\n\x10WebpageCondition\x12\x16\n\x0c\x63ustom_label\x18\x01 \x01(\tH\x00\x12\x16\n\x0curl_contains\x18\x02 \x01(\tH\x00\x42\x0b\n\tcondition\x1a\x65\n\x12RetailFilterBundle\x12@\n\nshared_set\x18\x01 \x01(\tB\'\xfa\x41$\n\"googleads.googleapis.com/SharedSetH\x00\x88\x01\x01\x42\r\n\x0b_shared_setB\x0b\n\tdimensionB\x93\x02\n&com.google.ads.googleads.v25.resourcesB!AssetGroupListingGroupFilterProtoP\x01ZKgoogle.golang.org/genproto/googleapis/ads/googleads/v25/resources;resources\xa2\x02\x03GAA\xaa\x02\"Google.Ads.GoogleAds.V25.Resources\xca\x02\"Google\\Ads\\GoogleAds\\V25\\Resources\xea\x02&Google::Ads::GoogleAds::V25::Resourcesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Resources + AssetGroupListingGroupFilter = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.AssetGroupListingGroupFilter").msgclass + ListingGroupFilterDimensionPath = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.ListingGroupFilterDimensionPath").msgclass + ListingGroupFilterDimension = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.ListingGroupFilterDimension").msgclass + ListingGroupFilterDimension::ProductCategory = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.ListingGroupFilterDimension.ProductCategory").msgclass + ListingGroupFilterDimension::ProductBrand = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.ListingGroupFilterDimension.ProductBrand").msgclass + ListingGroupFilterDimension::ProductChannel = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.ListingGroupFilterDimension.ProductChannel").msgclass + ListingGroupFilterDimension::ProductCondition = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.ListingGroupFilterDimension.ProductCondition").msgclass + ListingGroupFilterDimension::ProductCustomAttribute = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.ListingGroupFilterDimension.ProductCustomAttribute").msgclass + ListingGroupFilterDimension::ProductItemId = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.ListingGroupFilterDimension.ProductItemId").msgclass + ListingGroupFilterDimension::ProductType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.ListingGroupFilterDimension.ProductType").msgclass + ListingGroupFilterDimension::Webpage = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.ListingGroupFilterDimension.Webpage").msgclass + ListingGroupFilterDimension::WebpageCondition = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.ListingGroupFilterDimension.WebpageCondition").msgclass + ListingGroupFilterDimension::RetailFilterBundle = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.ListingGroupFilterDimension.RetailFilterBundle").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/resources/asset_group_pb.rb b/lib/google/ads/google_ads/v25/resources/asset_group_pb.rb new file mode 100644 index 000000000..aa664b144 --- /dev/null +++ b/lib/google/ads/google_ads/v25/resources/asset_group_pb.rb @@ -0,0 +1,38 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/resources/asset_group.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/enums/ad_strength_pb' +require 'google/ads/google_ads/v25/enums/ad_strength_action_item_type_pb' +require 'google/ads/google_ads/v25/enums/asset_coverage_video_aspect_ratio_requirement_pb' +require 'google/ads/google_ads/v25/enums/asset_field_type_pb' +require 'google/ads/google_ads/v25/enums/asset_group_primary_status_pb' +require 'google/ads/google_ads/v25/enums/asset_group_primary_status_reason_pb' +require 'google/ads/google_ads/v25/enums/asset_group_status_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' + + +descriptor_data = "\n4google/ads/googleads/v25/resources/asset_group.proto\x12\"google.ads.googleads.v25.resources\x1a\x30google/ads/googleads/v25/enums/ad_strength.proto\x1a\x41google/ads/googleads/v25/enums/ad_strength_action_item_type.proto\x1aRgoogle/ads/googleads/v25/enums/asset_coverage_video_aspect_ratio_requirement.proto\x1a\x35google/ads/googleads/v25/enums/asset_field_type.proto\x1a?google/ads/googleads/v25/enums/asset_group_primary_status.proto\x1a\x46google/ads/googleads/v25/enums/asset_group_primary_status_reason.proto\x1a\x37google/ads/googleads/v25/enums/asset_group_status.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\xcd\x07\n\nAssetGroup\x12\x42\n\rresource_name\x18\x01 \x01(\tB+\xe0\x41\x05\xfa\x41%\n#googleads.googleapis.com/AssetGroup\x12\x0f\n\x02id\x18\t \x01(\x03\x42\x03\xe0\x41\x03\x12;\n\x08\x63\x61mpaign\x18\x02 \x01(\tB)\xe0\x41\x05\xfa\x41#\n!googleads.googleapis.com/Campaign\x12\x11\n\x04name\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x12\n\nfinal_urls\x18\x04 \x03(\t\x12\x19\n\x11\x66inal_mobile_urls\x18\x05 \x03(\t\x12U\n\x06status\x18\x06 \x01(\x0e\x32\x45.google.ads.googleads.v25.enums.AssetGroupStatusEnum.AssetGroupStatus\x12p\n\x0eprimary_status\x18\x0b \x01(\x0e\x32S.google.ads.googleads.v25.enums.AssetGroupPrimaryStatusEnum.AssetGroupPrimaryStatusB\x03\xe0\x41\x03\x12\x84\x01\n\x16primary_status_reasons\x18\x0c \x03(\x0e\x32_.google.ads.googleads.v25.enums.AssetGroupPrimaryStatusReasonEnum.AssetGroupPrimaryStatusReasonB\x03\xe0\x41\x03\x12\r\n\x05path1\x18\x07 \x01(\t\x12\r\n\x05path2\x18\x08 \x01(\t\x12S\n\x0b\x61\x64_strength\x18\n \x01(\x0e\x32\x39.google.ads.googleads.v25.enums.AdStrengthEnum.AdStrengthB\x03\xe0\x41\x03\x12N\n\x0e\x61sset_coverage\x18\r \x01(\x0b\x32\x31.google.ads.googleads.v25.resources.AssetCoverageB\x03\xe0\x41\x03\x12_\n\x1agoogle_local_services_info\x18\x0e \x01(\x0b\x32;.google.ads.googleads.v25.resources.GoogleLocalServicesInfo:w\xea\x41t\n#googleads.googleapis.com/AssetGroup\x12\x34\x63ustomers/{customer_id}/assetGroups/{asset_group_id}*\x0b\x61ssetGroups2\nassetGroup\"p\n\rAssetCoverage\x12_\n\x18\x61\x64_strength_action_items\x18\x01 \x03(\x0b\x32\x38.google.ads.googleads.v25.resources.AdStrengthActionItemB\x03\xe0\x41\x03\"\xfc\x04\n\x14\x41\x64StrengthActionItem\x12t\n\x10\x61\x63tion_item_type\x18\x01 \x01(\x0e\x32U.google.ads.googleads.v25.enums.AdStrengthActionItemTypeEnum.AdStrengthActionItemTypeB\x03\xe0\x41\x03\x12j\n\x11\x61\x64\x64_asset_details\x18\x02 \x01(\x0b\x32H.google.ads.googleads.v25.resources.AdStrengthActionItem.AddAssetDetailsB\x03\xe0\x41\x03H\x00\x1a\xef\x02\n\x0f\x41\x64\x64\x41ssetDetails\x12`\n\x10\x61sset_field_type\x18\x01 \x01(\x0e\x32\x41.google.ads.googleads.v25.enums.AssetFieldTypeEnum.AssetFieldTypeB\x03\xe0\x41\x03\x12\x1d\n\x0b\x61sset_count\x18\x02 \x01(\x05\x42\x03\xe0\x41\x03H\x00\x88\x01\x01\x12\xa7\x01\n\x1evideo_aspect_ratio_requirement\x18\x03 \x01(\x0e\x32u.google.ads.googleads.v25.enums.AssetCoverageVideoAspectRatioRequirementEnum.AssetCoverageVideoAspectRatioRequirementB\x03\xe0\x41\x03H\x01\x88\x01\x01\x42\x0e\n\x0c_asset_countB!\n\x1f_video_aspect_ratio_requirementB\x10\n\x0e\x61\x63tion_details\"\x94\x01\n\x17GoogleLocalServicesInfo\x12\x1d\n\x0b\x63\x61tegory_id\x18\x01 \x01(\tB\x03\xe0\x41\x05H\x00\x88\x01\x01\x12J\n\x08\x63\x61llouts\x18\x02 \x03(\x0b\x32\x38.google.ads.googleads.v25.resources.LocalServicesCalloutB\x0e\n\x0c_category_id\"C\n\x14LocalServicesCallout\x12\x1c\n\ncallout_id\x18\x01 \x01(\tB\x03\xe0\x41\x02H\x00\x88\x01\x01\x42\r\n\x0b_callout_idB\x81\x02\n&com.google.ads.googleads.v25.resourcesB\x0f\x41ssetGroupProtoP\x01ZKgoogle.golang.org/genproto/googleapis/ads/googleads/v25/resources;resources\xa2\x02\x03GAA\xaa\x02\"Google.Ads.GoogleAds.V25.Resources\xca\x02\"Google\\Ads\\GoogleAds\\V25\\Resources\xea\x02&Google::Ads::GoogleAds::V25::Resourcesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Resources + AssetGroup = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.AssetGroup").msgclass + AssetCoverage = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.AssetCoverage").msgclass + AdStrengthActionItem = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.AdStrengthActionItem").msgclass + AdStrengthActionItem::AddAssetDetails = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.AdStrengthActionItem.AddAssetDetails").msgclass + GoogleLocalServicesInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.GoogleLocalServicesInfo").msgclass + LocalServicesCallout = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.LocalServicesCallout").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/resources/asset_group_product_group_view_pb.rb b/lib/google/ads/google_ads/v25/resources/asset_group_product_group_view_pb.rb new file mode 100644 index 000000000..1d11c3058 --- /dev/null +++ b/lib/google/ads/google_ads/v25/resources/asset_group_product_group_view_pb.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/resources/asset_group_product_group_view.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' + + +descriptor_data = "\nGgoogle/ads/googleads/v25/resources/asset_group_product_group_view.proto\x12\"google.ads.googleads.v25.resources\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\xb7\x03\n\x1a\x41ssetGroupProductGroupView\x12R\n\rresource_name\x18\x01 \x01(\tB;\xe0\x41\x03\xfa\x41\x35\n3googleads.googleapis.com/AssetGroupProductGroupView\x12@\n\x0b\x61sset_group\x18\x02 \x01(\tB+\xe0\x41\x03\xfa\x41%\n#googleads.googleapis.com/AssetGroup\x12g\n asset_group_listing_group_filter\x18\x04 \x01(\tB=\xe0\x41\x03\xfa\x41\x37\n5googleads.googleapis.com/AssetGroupListingGroupFilter:\x99\x01\xea\x41\x95\x01\n3googleads.googleapis.com/AssetGroupProductGroupView\x12^customers/{customer_id}/assetGroupProductGroupViews/{asset_group_id}~{listing_group_filter_id}B\x91\x02\n&com.google.ads.googleads.v25.resourcesB\x1f\x41ssetGroupProductGroupViewProtoP\x01ZKgoogle.golang.org/genproto/googleapis/ads/googleads/v25/resources;resources\xa2\x02\x03GAA\xaa\x02\"Google.Ads.GoogleAds.V25.Resources\xca\x02\"Google\\Ads\\GoogleAds\\V25\\Resources\xea\x02&Google::Ads::GoogleAds::V25::Resourcesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Resources + AssetGroupProductGroupView = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.AssetGroupProductGroupView").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/resources/asset_group_signal_pb.rb b/lib/google/ads/google_ads/v25/resources/asset_group_signal_pb.rb new file mode 100644 index 000000000..7ab13969e --- /dev/null +++ b/lib/google/ads/google_ads/v25/resources/asset_group_signal_pb.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/resources/asset_group_signal.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/common/criteria_pb' +require 'google/ads/google_ads/v25/enums/asset_group_signal_approval_status_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' + + +descriptor_data = "\n;google/ads/googleads/v25/resources/asset_group_signal.proto\x12\"google.ads.googleads.v25.resources\x1a.google/ads/googleads/v25/common/criteria.proto\x1aGgoogle/ads/googleads/v25/enums/asset_group_signal_approval_status.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\xa9\x06\n\x10\x41ssetGroupSignal\x12H\n\rresource_name\x18\x01 \x01(\tB1\xe0\x41\x05\xfa\x41+\n)googleads.googleapis.com/AssetGroupSignal\x12@\n\x0b\x61sset_group\x18\x02 \x01(\tB+\xe0\x41\x05\xfa\x41%\n#googleads.googleapis.com/AssetGroup\x12\x7f\n\x0f\x61pproval_status\x18\x06 \x01(\x0e\x32\x61.google.ads.googleads.v25.enums.AssetGroupSignalApprovalStatusEnum.AssetGroupSignalApprovalStatusB\x03\xe0\x41\x03\x12 \n\x13\x64isapproval_reasons\x18\x07 \x03(\tB\x03\xe0\x41\x03\x12\x46\n\x08\x61udience\x18\x04 \x01(\x0b\x32-.google.ads.googleads.v25.common.AudienceInfoB\x03\xe0\x41\x05H\x00\x12M\n\x0csearch_theme\x18\x05 \x01(\x0b\x32\x30.google.ads.googleads.v25.common.SearchThemeInfoB\x03\xe0\x41\x05H\x00\x12U\n\x11local_services_id\x18\x08 \x01(\x0b\x32\x33.google.ads.googleads.v25.common.LocalServiceIdInfoB\x03\xe0\x41\x05H\x00\x12s\n!vertical_ads_item_group_rule_list\x18\t \x01(\x0b\x32\x41.google.ads.googleads.v25.common.VerticalAdsItemGroupRuleListInfoB\x03\xe0\x41\x05H\x00:y\xea\x41v\n)googleads.googleapis.com/AssetGroupSignal\x12Icustomers/{customer_id}/assetGroupSignals/{asset_group_id}~{criterion_id}B\x08\n\x06signalB\x87\x02\n&com.google.ads.googleads.v25.resourcesB\x15\x41ssetGroupSignalProtoP\x01ZKgoogle.golang.org/genproto/googleapis/ads/googleads/v25/resources;resources\xa2\x02\x03GAA\xaa\x02\"Google.Ads.GoogleAds.V25.Resources\xca\x02\"Google\\Ads\\GoogleAds\\V25\\Resources\xea\x02&Google::Ads::GoogleAds::V25::Resourcesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Resources + AssetGroupSignal = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.AssetGroupSignal").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/resources/asset_group_top_combination_view_pb.rb b/lib/google/ads/google_ads/v25/resources/asset_group_top_combination_view_pb.rb new file mode 100644 index 000000000..aeb386559 --- /dev/null +++ b/lib/google/ads/google_ads/v25/resources/asset_group_top_combination_view_pb.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/resources/asset_group_top_combination_view.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/common/asset_usage_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' + + +descriptor_data = "\nIgoogle/ads/googleads/v25/resources/asset_group_top_combination_view.proto\x12\"google.ads.googleads.v25.resources\x1a\x31google/ads/googleads/v25/common/asset_usage.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\x86\x03\n\x1c\x41ssetGroupTopCombinationView\x12T\n\rresource_name\x18\x01 \x01(\tB=\xe0\x41\x03\xfa\x41\x37\n5googleads.googleapis.com/AssetGroupTopCombinationView\x12m\n\x1c\x61sset_group_top_combinations\x18\x02 \x03(\x0b\x32\x42.google.ads.googleads.v25.resources.AssetGroupAssetCombinationDataB\x03\xe0\x41\x03:\xa0\x01\xea\x41\x9c\x01\n5googleads.googleapis.com/AssetGroupTopCombinationView\x12\x63\x63ustomers/{customer_id}/assetGroupTopCombinationViews/{asset_group_id}~{asset_combination_category}\"{\n\x1e\x41ssetGroupAssetCombinationData\x12Y\n\x1f\x61sset_combination_served_assets\x18\x01 \x03(\x0b\x32+.google.ads.googleads.v25.common.AssetUsageB\x03\xe0\x41\x03\x42\x93\x02\n&com.google.ads.googleads.v25.resourcesB!AssetGroupTopCombinationViewProtoP\x01ZKgoogle.golang.org/genproto/googleapis/ads/googleads/v25/resources;resources\xa2\x02\x03GAA\xaa\x02\"Google.Ads.GoogleAds.V25.Resources\xca\x02\"Google\\Ads\\GoogleAds\\V25\\Resources\xea\x02&Google::Ads::GoogleAds::V25::Resourcesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Resources + AssetGroupTopCombinationView = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.AssetGroupTopCombinationView").msgclass + AssetGroupAssetCombinationData = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.AssetGroupAssetCombinationData").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/resources/asset_pb.rb b/lib/google/ads/google_ads/v25/resources/asset_pb.rb new file mode 100644 index 000000000..6bade4328 --- /dev/null +++ b/lib/google/ads/google_ads/v25/resources/asset_pb.rb @@ -0,0 +1,38 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/resources/asset.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/common/asset_types_pb' +require 'google/ads/google_ads/v25/common/custom_parameter_pb' +require 'google/ads/google_ads/v25/common/policy_pb' +require 'google/ads/google_ads/v25/common/synthetic_content_info_pb' +require 'google/ads/google_ads/v25/enums/asset_field_type_pb' +require 'google/ads/google_ads/v25/enums/asset_orientation_pb' +require 'google/ads/google_ads/v25/enums/asset_source_pb' +require 'google/ads/google_ads/v25/enums/asset_type_pb' +require 'google/ads/google_ads/v25/enums/policy_approval_status_pb' +require 'google/ads/google_ads/v25/enums/policy_review_status_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' + + +descriptor_data = "\n.google/ads/googleads/v25/resources/asset.proto\x12\"google.ads.googleads.v25.resources\x1a\x31google/ads/googleads/v25/common/asset_types.proto\x1a\x36google/ads/googleads/v25/common/custom_parameter.proto\x1a,google/ads/googleads/v25/common/policy.proto\x1a.google.ads.googleads.v25.resources.AssetSet.HotelPropertyDataB\x03\xe0\x41\x03\x12Z\n\x10travel_feed_data\x18\x0c \x01(\x0b\x32;.google.ads.googleads.v25.resources.AssetSet.TravelFeedDataB\x03\xe0\x41\x03\x12\x44\n\x0clocation_set\x18\x07 \x01(\x0b\x32,.google.ads.googleads.v25.common.LocationSetH\x00\x12h\n\x1f\x62usiness_profile_location_group\x18\x08 \x01(\x0b\x32=.google.ads.googleads.v25.common.BusinessProfileLocationGroupH\x00\x12S\n\x14\x63hain_location_group\x18\t \x01(\x0b\x32\x33.google.ads.googleads.v25.common.ChainLocationGroupH\x00\x1a[\n\x12MerchantCenterFeed\x12\x18\n\x0bmerchant_id\x18\x01 \x01(\x03\x42\x03\xe0\x41\x02\x12\x1c\n\nfeed_label\x18\x02 \x01(\tB\x03\xe0\x41\x01H\x00\x88\x01\x01\x42\r\n\x0b_feed_label\x1a{\n\x11HotelPropertyData\x12!\n\x0fhotel_center_id\x18\x01 \x01(\x03\x42\x03\xe0\x41\x03H\x00\x88\x01\x01\x12\x1e\n\x0cpartner_name\x18\x02 \x01(\tB\x03\xe0\x41\x03H\x01\x88\x01\x01\x42\x12\n\x10_hotel_center_idB\x0f\n\r_partner_name\x1a\xad\x02\n\x0eTravelFeedData\x12\x16\n\tsubset_id\x18\x03 \x01(\x03\x42\x03\xe0\x41\x03\x12\x83\x01\n\x19travel_feed_vertical_type\x18\x06 \x01(\x0e\x32[.google.ads.googleads.v25.enums.VerticalAdsItemVerticalTypeEnum.VerticalAdsItemVerticalTypeB\x03\xe0\x41\x03\x12&\n\x17hotel_center_account_id\x18\x01 \x01(\x03\x42\x03\xe0\x41\x03H\x00\x12!\n\x12merchant_center_id\x18\x02 \x01(\x03\x42\x03\xe0\x41\x03H\x00\x12 \n\x11partner_center_id\x18\x05 \x01(\x03\x42\x03\xe0\x41\x03H\x00\x42\x10\n\x0etravel_feed_id:X\xea\x41U\n!googleads.googleapis.com/AssetSet\x12\x30\x63ustomers/{customer_id}/assetSets/{asset_set_id}B\x12\n\x10\x61sset_set_sourceB\xff\x01\n&com.google.ads.googleads.v25.resourcesB\rAssetSetProtoP\x01ZKgoogle.golang.org/genproto/googleapis/ads/googleads/v25/resources;resources\xa2\x02\x03GAA\xaa\x02\"Google.Ads.GoogleAds.V25.Resources\xca\x02\"Google\\Ads\\GoogleAds\\V25\\Resources\xea\x02&Google::Ads::GoogleAds::V25::Resourcesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Resources + AssetSet = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.AssetSet").msgclass + AssetSet::MerchantCenterFeed = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.AssetSet.MerchantCenterFeed").msgclass + AssetSet::HotelPropertyData = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.AssetSet.HotelPropertyData").msgclass + AssetSet::TravelFeedData = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.AssetSet.TravelFeedData").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/resources/asset_set_type_view_pb.rb b/lib/google/ads/google_ads/v25/resources/asset_set_type_view_pb.rb new file mode 100644 index 000000000..cd6814af1 --- /dev/null +++ b/lib/google/ads/google_ads/v25/resources/asset_set_type_view_pb.rb @@ -0,0 +1,27 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/resources/asset_set_type_view.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/enums/asset_set_type_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' + + +descriptor_data = "\n.google.ads.googleads.v25.common.TargetRoasSimulationPointListB\x03\xe0\x41\x03H\x00:\xb7\x01\xea\x41\xb3\x01\n2googleads.googleapis.com/BiddingStrategySimulation\x12}customers/{customer_id}/biddingStrategySimulations/{bidding_strategy_id}~{type}~{modification_method}~{start_date}~{end_date}B\x0c\n\npoint_listB\x90\x02\n&com.google.ads.googleads.v25.resourcesB\x1e\x42iddingStrategySimulationProtoP\x01ZKgoogle.golang.org/genproto/googleapis/ads/googleads/v25/resources;resources\xa2\x02\x03GAA\xaa\x02\"Google.Ads.GoogleAds.V25.Resources\xca\x02\"Google\\Ads\\GoogleAds\\V25\\Resources\xea\x02&Google::Ads::GoogleAds::V25::Resourcesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Resources + BiddingStrategySimulation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.BiddingStrategySimulation").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/resources/billing_setup_pb.rb b/lib/google/ads/google_ads/v25/resources/billing_setup_pb.rb new file mode 100644 index 000000000..fc2731969 --- /dev/null +++ b/lib/google/ads/google_ads/v25/resources/billing_setup_pb.rb @@ -0,0 +1,29 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/resources/billing_setup.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/enums/billing_setup_status_pb' +require 'google/ads/google_ads/v25/enums/time_type_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' + + +descriptor_data = "\n6google/ads/googleads/v25/resources/billing_setup.proto\x12\"google.ads.googleads.v25.resources\x1a\x39google/ads/googleads/v25/enums/billing_setup_status.proto\x1a.google/ads/googleads/v25/enums/time_type.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\xfa\x08\n\x0c\x42illingSetup\x12\x44\n\rresource_name\x18\x01 \x01(\tB-\xe0\x41\x05\xfa\x41\'\n%googleads.googleapis.com/BillingSetup\x12\x14\n\x02id\x18\x0f \x01(\x03\x42\x03\xe0\x41\x03H\x02\x88\x01\x01\x12^\n\x06status\x18\x03 \x01(\x0e\x32I.google.ads.googleads.v25.enums.BillingSetupStatusEnum.BillingSetupStatusB\x03\xe0\x41\x03\x12O\n\x10payments_account\x18\x12 \x01(\tB0\xe0\x41\x05\xfa\x41*\n(googleads.googleapis.com/PaymentsAccountH\x03\x88\x01\x01\x12h\n\x15payments_account_info\x18\x0c \x01(\x0b\x32\x44.google.ads.googleads.v25.resources.BillingSetup.PaymentsAccountInfoB\x03\xe0\x41\x05\x12\x1e\n\x0fstart_date_time\x18\x10 \x01(\tB\x03\xe0\x41\x05H\x00\x12U\n\x0fstart_time_type\x18\n \x01(\x0e\x32\x35.google.ads.googleads.v25.enums.TimeTypeEnum.TimeTypeB\x03\xe0\x41\x05H\x00\x12\x1c\n\rend_date_time\x18\x11 \x01(\tB\x03\xe0\x41\x03H\x01\x12S\n\rend_time_type\x18\x0e \x01(\x0e\x32\x35.google.ads.googleads.v25.enums.TimeTypeEnum.TimeTypeB\x03\xe0\x41\x03H\x01\x1a\xec\x02\n\x13PaymentsAccountInfo\x12%\n\x13payments_account_id\x18\x06 \x01(\tB\x03\xe0\x41\x03H\x00\x88\x01\x01\x12\'\n\x15payments_account_name\x18\x07 \x01(\tB\x03\xe0\x41\x05H\x01\x88\x01\x01\x12%\n\x13payments_profile_id\x18\x08 \x01(\tB\x03\xe0\x41\x05H\x02\x88\x01\x01\x12\'\n\x15payments_profile_name\x18\t \x01(\tB\x03\xe0\x41\x03H\x03\x88\x01\x01\x12/\n\x1dsecondary_payments_profile_id\x18\n \x01(\tB\x03\xe0\x41\x03H\x04\x88\x01\x01\x42\x16\n\x14_payments_account_idB\x18\n\x16_payments_account_nameB\x16\n\x14_payments_profile_idB\x18\n\x16_payments_profile_nameB \n\x1e_secondary_payments_profile_id:d\xea\x41\x61\n%googleads.googleapis.com/BillingSetup\x12\x38\x63ustomers/{customer_id}/billingSetups/{billing_setup_id}B\x0c\n\nstart_timeB\n\n\x08\x65nd_timeB\x05\n\x03_idB\x13\n\x11_payments_accountB\x83\x02\n&com.google.ads.googleads.v25.resourcesB\x11\x42illingSetupProtoP\x01ZKgoogle.golang.org/genproto/googleapis/ads/googleads/v25/resources;resources\xa2\x02\x03GAA\xaa\x02\"Google.Ads.GoogleAds.V25.Resources\xca\x02\"Google\\Ads\\GoogleAds\\V25\\Resources\xea\x02&Google::Ads::GoogleAds::V25::Resourcesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Resources + BillingSetup = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.BillingSetup").msgclass + BillingSetup::PaymentsAccountInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.BillingSetup.PaymentsAccountInfo").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/resources/call_view_pb.rb b/lib/google/ads/google_ads/v25/resources/call_view_pb.rb new file mode 100644 index 000000000..b50ff732c --- /dev/null +++ b/lib/google/ads/google_ads/v25/resources/call_view_pb.rb @@ -0,0 +1,29 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/resources/call_view.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/enums/call_tracking_display_location_pb' +require 'google/ads/google_ads/v25/enums/call_type_pb' +require 'google/ads/google_ads/v25/enums/google_voice_call_status_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' + + +descriptor_data = "\n2google/ads/googleads/v25/resources/call_view.proto\x12\"google.ads.googleads.v25.resources\x1a\x43google/ads/googleads/v25/enums/call_tracking_display_location.proto\x1a.google/ads/googleads/v25/enums/call_type.proto\x1a=google/ads/googleads/v25/enums/google_voice_call_status.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\x91\x05\n\x08\x43\x61llView\x12@\n\rresource_name\x18\x01 \x01(\tB)\xe0\x41\x03\xfa\x41#\n!googleads.googleapis.com/CallView\x12 \n\x13\x63\x61ller_country_code\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x1d\n\x10\x63\x61ller_area_code\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\"\n\x15\x63\x61ll_duration_seconds\x18\x04 \x01(\x03\x42\x03\xe0\x41\x03\x12!\n\x14start_call_date_time\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12\x1f\n\x12\x65nd_call_date_time\x18\x06 \x01(\tB\x03\xe0\x41\x03\x12\x88\x01\n\x1e\x63\x61ll_tracking_display_location\x18\x07 \x01(\x0e\x32[.google.ads.googleads.v25.enums.CallTrackingDisplayLocationEnum.CallTrackingDisplayLocationB\x03\xe0\x41\x03\x12H\n\x04type\x18\x08 \x01(\x0e\x32\x35.google.ads.googleads.v25.enums.CallTypeEnum.CallTypeB\x03\xe0\x41\x03\x12i\n\x0b\x63\x61ll_status\x18\t \x01(\x0e\x32O.google.ads.googleads.v25.enums.GoogleVoiceCallStatusEnum.GoogleVoiceCallStatusB\x03\xe0\x41\x03:Z\xea\x41W\n!googleads.googleapis.com/CallView\x12\x32\x63ustomers/{customer_id}/callViews/{call_detail_id}B\xff\x01\n&com.google.ads.googleads.v25.resourcesB\rCallViewProtoP\x01ZKgoogle.golang.org/genproto/googleapis/ads/googleads/v25/resources;resources\xa2\x02\x03GAA\xaa\x02\"Google.Ads.GoogleAds.V25.Resources\xca\x02\"Google\\Ads\\GoogleAds\\V25\\Resources\xea\x02&Google::Ads::GoogleAds::V25::Resourcesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Resources + CallView = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.CallView").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/resources/campaign_aggregate_asset_view_pb.rb b/lib/google/ads/google_ads/v25/resources/campaign_aggregate_asset_view_pb.rb new file mode 100644 index 000000000..4a4a10f5e --- /dev/null +++ b/lib/google/ads/google_ads/v25/resources/campaign_aggregate_asset_view_pb.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/resources/campaign_aggregate_asset_view.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/enums/asset_field_type_pb' +require 'google/ads/google_ads/v25/enums/asset_source_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' + + +descriptor_data = "\nFgoogle/ads/googleads/v25/resources/campaign_aggregate_asset_view.proto\x12\"google.ads.googleads.v25.resources\x1a\x35google/ads/googleads/v25/enums/asset_field_type.proto\x1a\x31google/ads/googleads/v25/enums/asset_source.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\x8e\x05\n\x1a\x43\x61mpaignAggregateAssetView\x12R\n\rresource_name\x18\x01 \x01(\tB;\xe0\x41\x03\xfa\x41\x35\n3googleads.googleapis.com/CampaignAggregateAssetView\x12@\n\x08\x63\x61mpaign\x18\x02 \x01(\tB)\xe0\x41\x03\xfa\x41#\n!googleads.googleapis.com/CampaignH\x00\x88\x01\x01\x12:\n\x05\x61sset\x18\x03 \x01(\tB&\xe0\x41\x03\xfa\x41 \n\x1egoogleads.googleapis.com/AssetH\x01\x88\x01\x01\x12[\n\x0c\x61sset_source\x18\x04 \x01(\x0e\x32;.google.ads.googleads.v25.enums.AssetSourceEnum.AssetSourceB\x03\xe0\x41\x03H\x02\x88\x01\x01\x12_\n\nfield_type\x18\x05 \x01(\x0e\x32\x41.google.ads.googleads.v25.enums.AssetFieldTypeEnum.AssetFieldTypeB\x03\xe0\x41\x03H\x03\x88\x01\x01:\xa8\x01\xea\x41\xa4\x01\n3googleads.googleapis.com/CampaignAggregateAssetView\x12mcustomers/{customer_id}/campaignAggregateAssetViews/{campaign_id}~{asset_id}~{asset_link_source}~{field_type}B\x0b\n\t_campaignB\x08\n\x06_assetB\x0f\n\r_asset_sourceB\r\n\x0b_field_typeB\x91\x02\n&com.google.ads.googleads.v25.resourcesB\x1f\x43\x61mpaignAggregateAssetViewProtoP\x01ZKgoogle.golang.org/genproto/googleapis/ads/googleads/v25/resources;resources\xa2\x02\x03GAA\xaa\x02\"Google.Ads.GoogleAds.V25.Resources\xca\x02\"Google\\Ads\\GoogleAds\\V25\\Resources\xea\x02&Google::Ads::GoogleAds::V25::Resourcesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Resources + CampaignAggregateAssetView = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.CampaignAggregateAssetView").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/resources/campaign_asset_pb.rb b/lib/google/ads/google_ads/v25/resources/campaign_asset_pb.rb new file mode 100644 index 000000000..0f31d88c6 --- /dev/null +++ b/lib/google/ads/google_ads/v25/resources/campaign_asset_pb.rb @@ -0,0 +1,32 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/resources/campaign_asset.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/common/asset_policy_pb' +require 'google/ads/google_ads/v25/enums/asset_field_type_pb' +require 'google/ads/google_ads/v25/enums/asset_link_primary_status_pb' +require 'google/ads/google_ads/v25/enums/asset_link_primary_status_reason_pb' +require 'google/ads/google_ads/v25/enums/asset_link_status_pb' +require 'google/ads/google_ads/v25/enums/asset_source_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' + + +descriptor_data = "\n7google/ads/googleads/v25/resources/campaign_asset.proto\x12\"google.ads.googleads.v25.resources\x1a\x32google/ads/googleads/v25/common/asset_policy.proto\x1a\x35google/ads/googleads/v25/enums/asset_field_type.proto\x1a>google/ads/googleads/v25/enums/asset_link_primary_status.proto\x1a\x45google/ads/googleads/v25/enums/asset_link_primary_status_reason.proto\x1a\x36google/ads/googleads/v25/enums/asset_link_status.proto\x1a\x31google/ads/googleads/v25/enums/asset_source.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\xc3\x07\n\rCampaignAsset\x12\x45\n\rresource_name\x18\x01 \x01(\tB.\xe0\x41\x05\xfa\x41(\n&googleads.googleapis.com/CampaignAsset\x12@\n\x08\x63\x61mpaign\x18\x06 \x01(\tB)\xe0\x41\x05\xfa\x41#\n!googleads.googleapis.com/CampaignH\x00\x88\x01\x01\x12:\n\x05\x61sset\x18\x07 \x01(\tB&\xe0\x41\x05\xfa\x41 \n\x1egoogleads.googleapis.com/AssetH\x01\x88\x01\x01\x12Z\n\nfield_type\x18\x04 \x01(\x0e\x32\x41.google.ads.googleads.v25.enums.AssetFieldTypeEnum.AssetFieldTypeB\x03\xe0\x41\x05\x12P\n\x06source\x18\x08 \x01(\x0e\x32;.google.ads.googleads.v25.enums.AssetSourceEnum.AssetSourceB\x03\xe0\x41\x03\x12S\n\x06status\x18\x05 \x01(\x0e\x32\x43.google.ads.googleads.v25.enums.AssetLinkStatusEnum.AssetLinkStatus\x12n\n\x0eprimary_status\x18\t \x01(\x0e\x32Q.google.ads.googleads.v25.enums.AssetLinkPrimaryStatusEnum.AssetLinkPrimaryStatusB\x03\xe0\x41\x03\x12\x63\n\x16primary_status_details\x18\n \x03(\x0b\x32>.google.ads.googleads.v25.common.AssetLinkPrimaryStatusDetailsB\x03\xe0\x41\x03\x12\x82\x01\n\x16primary_status_reasons\x18\x0b \x03(\x0e\x32].google.ads.googleads.v25.enums.AssetLinkPrimaryStatusReasonEnum.AssetLinkPrimaryStatusReasonB\x03\xe0\x41\x03:y\xea\x41v\n&googleads.googleapis.com/CampaignAsset\x12Lcustomers/{customer_id}/campaignAssets/{campaign_id}~{asset_id}~{field_type}B\x0b\n\t_campaignB\x08\n\x06_assetB\x84\x02\n&com.google.ads.googleads.v25.resourcesB\x12\x43\x61mpaignAssetProtoP\x01ZKgoogle.golang.org/genproto/googleapis/ads/googleads/v25/resources;resources\xa2\x02\x03GAA\xaa\x02\"Google.Ads.GoogleAds.V25.Resources\xca\x02\"Google\\Ads\\GoogleAds\\V25\\Resources\xea\x02&Google::Ads::GoogleAds::V25::Resourcesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Resources + CampaignAsset = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.CampaignAsset").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/resources/campaign_asset_set_pb.rb b/lib/google/ads/google_ads/v25/resources/campaign_asset_set_pb.rb new file mode 100644 index 000000000..cfc9f5cd2 --- /dev/null +++ b/lib/google/ads/google_ads/v25/resources/campaign_asset_set_pb.rb @@ -0,0 +1,27 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/resources/campaign_asset_set.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/enums/asset_set_link_status_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' + + +descriptor_data = "\n;google/ads/googleads/v25/resources/campaign_asset_set.proto\x12\"google.ads.googleads.v25.resources\x1a:google/ads/googleads/v25/enums/asset_set_link_status.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\xaf\x03\n\x10\x43\x61mpaignAssetSet\x12H\n\rresource_name\x18\x01 \x01(\tB1\xe0\x41\x05\xfa\x41+\n)googleads.googleapis.com/CampaignAssetSet\x12;\n\x08\x63\x61mpaign\x18\x02 \x01(\tB)\xe0\x41\x05\xfa\x41#\n!googleads.googleapis.com/Campaign\x12<\n\tasset_set\x18\x03 \x01(\tB)\xe0\x41\x05\xfa\x41#\n!googleads.googleapis.com/AssetSet\x12^\n\x06status\x18\x04 \x01(\x0e\x32I.google.ads.googleads.v25.enums.AssetSetLinkStatusEnum.AssetSetLinkStatusB\x03\xe0\x41\x03:v\xea\x41s\n)googleads.googleapis.com/CampaignAssetSet\x12\x46\x63ustomers/{customer_id}/campaignAssetSets/{campaign_id}~{asset_set_id}B\x87\x02\n&com.google.ads.googleads.v25.resourcesB\x15\x43\x61mpaignAssetSetProtoP\x01ZKgoogle.golang.org/genproto/googleapis/ads/googleads/v25/resources;resources\xa2\x02\x03GAA\xaa\x02\"Google.Ads.GoogleAds.V25.Resources\xca\x02\"Google\\Ads\\GoogleAds\\V25\\Resources\xea\x02&Google::Ads::GoogleAds::V25::Resourcesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Resources + CampaignAssetSet = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.CampaignAssetSet").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/resources/campaign_audience_view_pb.rb b/lib/google/ads/google_ads/v25/resources/campaign_audience_view_pb.rb new file mode 100644 index 000000000..0b91e592e --- /dev/null +++ b/lib/google/ads/google_ads/v25/resources/campaign_audience_view_pb.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/resources/campaign_audience_view.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' + + +descriptor_data = "\n?google/ads/googleads/v25/resources/campaign_audience_view.proto\x12\"google.ads.googleads.v25.resources\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\xe4\x01\n\x14\x43\x61mpaignAudienceView\x12L\n\rresource_name\x18\x01 \x01(\tB5\xe0\x41\x03\xfa\x41/\n-googleads.googleapis.com/CampaignAudienceView:~\xea\x41{\n-googleads.googleapis.com/CampaignAudienceView\x12Jcustomers/{customer_id}/campaignAudienceViews/{campaign_id}~{criterion_id}B\x8b\x02\n&com.google.ads.googleads.v25.resourcesB\x19\x43\x61mpaignAudienceViewProtoP\x01ZKgoogle.golang.org/genproto/googleapis/ads/googleads/v25/resources;resources\xa2\x02\x03GAA\xaa\x02\"Google.Ads.GoogleAds.V25.Resources\xca\x02\"Google\\Ads\\GoogleAds\\V25\\Resources\xea\x02&Google::Ads::GoogleAds::V25::Resourcesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Resources + CampaignAudienceView = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.CampaignAudienceView").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/resources/campaign_bid_modifier_pb.rb b/lib/google/ads/google_ads/v25/resources/campaign_bid_modifier_pb.rb new file mode 100644 index 000000000..8384fb90d --- /dev/null +++ b/lib/google/ads/google_ads/v25/resources/campaign_bid_modifier_pb.rb @@ -0,0 +1,27 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/resources/campaign_bid_modifier.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/common/criteria_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' + + +descriptor_data = "\n>google/ads/googleads/v25/resources/campaign_bid_modifier.proto\x12\"google.ads.googleads.v25.resources\x1a.google/ads/googleads/v25/common/criteria.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\xf0\x03\n\x13\x43\x61mpaignBidModifier\x12K\n\rresource_name\x18\x01 \x01(\tB4\xe0\x41\x05\xfa\x41.\n,googleads.googleapis.com/CampaignBidModifier\x12@\n\x08\x63\x61mpaign\x18\x06 \x01(\tB)\xe0\x41\x03\xfa\x41#\n!googleads.googleapis.com/CampaignH\x01\x88\x01\x01\x12\x1e\n\x0c\x63riterion_id\x18\x07 \x01(\x03\x42\x03\xe0\x41\x03H\x02\x88\x01\x01\x12\x19\n\x0c\x62id_modifier\x18\x08 \x01(\x01H\x03\x88\x01\x01\x12U\n\x10interaction_type\x18\x05 \x01(\x0b\x32\x34.google.ads.googleads.v25.common.InteractionTypeInfoB\x03\xe0\x41\x05H\x00:|\xea\x41y\n,googleads.googleapis.com/CampaignBidModifier\x12Icustomers/{customer_id}/campaignBidModifiers/{campaign_id}~{criterion_id}B\x0b\n\tcriterionB\x0b\n\t_campaignB\x0f\n\r_criterion_idB\x0f\n\r_bid_modifierB\x8a\x02\n&com.google.ads.googleads.v25.resourcesB\x18\x43\x61mpaignBidModifierProtoP\x01ZKgoogle.golang.org/genproto/googleapis/ads/googleads/v25/resources;resources\xa2\x02\x03GAA\xaa\x02\"Google.Ads.GoogleAds.V25.Resources\xca\x02\"Google\\Ads\\GoogleAds\\V25\\Resources\xea\x02&Google::Ads::GoogleAds::V25::Resourcesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Resources + CampaignBidModifier = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.CampaignBidModifier").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/resources/campaign_budget_pb.rb b/lib/google/ads/google_ads/v25/resources/campaign_budget_pb.rb new file mode 100644 index 000000000..cead12bc5 --- /dev/null +++ b/lib/google/ads/google_ads/v25/resources/campaign_budget_pb.rb @@ -0,0 +1,30 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/resources/campaign_budget.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/enums/budget_delivery_method_pb' +require 'google/ads/google_ads/v25/enums/budget_period_pb' +require 'google/ads/google_ads/v25/enums/budget_status_pb' +require 'google/ads/google_ads/v25/enums/budget_type_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' + + +descriptor_data = "\n8google/ads/googleads/v25/resources/campaign_budget.proto\x12\"google.ads.googleads.v25.resources\x1a;google/ads/googleads/v25/enums/budget_delivery_method.proto\x1a\x32google/ads/googleads/v25/enums/budget_period.proto\x1a\x32google/ads/googleads/v25/enums/budget_status.proto\x1a\x30google/ads/googleads/v25/enums/budget_type.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\xf3\x0b\n\x0e\x43\x61mpaignBudget\x12\x46\n\rresource_name\x18\x01 \x01(\tB/\xe0\x41\x05\xfa\x41)\n\'googleads.googleapis.com/CampaignBudget\x12\x14\n\x02id\x18\x13 \x01(\x03\x42\x03\xe0\x41\x03H\x00\x88\x01\x01\x12\x11\n\x04name\x18\x14 \x01(\tH\x01\x88\x01\x01\x12\x1a\n\ramount_micros\x18\x15 \x01(\x03H\x02\x88\x01\x01\x12 \n\x13total_amount_micros\x18\x16 \x01(\x03H\x03\x88\x01\x01\x12R\n\x06status\x18\x06 \x01(\x0e\x32=.google.ads.googleads.v25.enums.BudgetStatusEnum.BudgetStatusB\x03\xe0\x41\x03\x12\x66\n\x0f\x64\x65livery_method\x18\x07 \x01(\x0e\x32M.google.ads.googleads.v25.enums.BudgetDeliveryMethodEnum.BudgetDeliveryMethod\x12\x1e\n\x11\x65xplicitly_shared\x18\x17 \x01(\x08H\x04\x88\x01\x01\x12!\n\x0freference_count\x18\x18 \x01(\x03\x42\x03\xe0\x41\x03H\x05\x88\x01\x01\x12(\n\x16has_recommended_budget\x18\x19 \x01(\x08\x42\x03\xe0\x41\x03H\x06\x88\x01\x01\x12\x32\n recommended_budget_amount_micros\x18\x1a \x01(\x03\x42\x03\xe0\x41\x03H\x07\x88\x01\x01\x12R\n\x06period\x18\r \x01(\x0e\x32=.google.ads.googleads.v25.enums.BudgetPeriodEnum.BudgetPeriodB\x03\xe0\x41\x05\x12\x43\n1recommended_budget_estimated_change_weekly_clicks\x18\x1b \x01(\x03\x42\x03\xe0\x41\x03H\x08\x88\x01\x01\x12H\n6recommended_budget_estimated_change_weekly_cost_micros\x18\x1c \x01(\x03\x42\x03\xe0\x41\x03H\t\x88\x01\x01\x12I\n7recommended_budget_estimated_change_weekly_interactions\x18\x1d \x01(\x03\x42\x03\xe0\x41\x03H\n\x88\x01\x01\x12\x42\n0recommended_budget_estimated_change_weekly_views\x18\x1e \x01(\x03\x42\x03\xe0\x41\x03H\x0b\x88\x01\x01\x12L\n\x04type\x18\x12 \x01(\x0e\x32\x39.google.ads.googleads.v25.enums.BudgetTypeEnum.BudgetTypeB\x03\xe0\x41\x05\x12#\n\x1b\x61ligned_bidding_strategy_id\x18\x1f \x01(\x03:j\xea\x41g\n\'googleads.googleapis.com/CampaignBudget\x12google/ads/googleads/v25/enums/campaign_criterion_status.proto\x1a\x33google/ads/googleads/v25/enums/criterion_type.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\xad\x1b\n\x11\x43\x61mpaignCriterion\x12I\n\rresource_name\x18\x01 \x01(\tB2\xe0\x41\x05\xfa\x41,\n*googleads.googleapis.com/CampaignCriterion\x12@\n\x08\x63\x61mpaign\x18% \x01(\tB)\xe0\x41\x05\xfa\x41#\n!googleads.googleapis.com/CampaignH\x01\x88\x01\x01\x12\x1e\n\x0c\x63riterion_id\x18& \x01(\x03\x42\x03\xe0\x41\x03H\x02\x88\x01\x01\x12\x19\n\x0c\x64isplay_name\x18+ \x01(\tB\x03\xe0\x41\x03\x12\x19\n\x0c\x62id_modifier\x18\' \x01(\x02H\x03\x88\x01\x01\x12\x1a\n\x08negative\x18( \x01(\x08\x42\x03\xe0\x41\x05H\x04\x88\x01\x01\x12R\n\x04type\x18\x06 \x01(\x0e\x32?.google.ads.googleads.v25.enums.CriterionTypeEnum.CriterionTypeB\x03\xe0\x41\x03\x12\x63\n\x06status\x18# \x01(\x0e\x32S.google.ads.googleads.v25.enums.CampaignCriterionStatusEnum.CampaignCriterionStatus\x12\x44\n\x07keyword\x18\x08 \x01(\x0b\x32,.google.ads.googleads.v25.common.KeywordInfoB\x03\xe0\x41\x05H\x00\x12H\n\tplacement\x18\t \x01(\x0b\x32..google.ads.googleads.v25.common.PlacementInfoB\x03\xe0\x41\x05H\x00\x12Z\n\x13mobile_app_category\x18\n \x01(\x0b\x32\x36.google.ads.googleads.v25.common.MobileAppCategoryInfoB\x03\xe0\x41\x05H\x00\x12Y\n\x12mobile_application\x18\x0b \x01(\x0b\x32\x36.google.ads.googleads.v25.common.MobileApplicationInfoB\x03\xe0\x41\x05H\x00\x12\x46\n\x08location\x18\x0c \x01(\x0b\x32-.google.ads.googleads.v25.common.LocationInfoB\x03\xe0\x41\x05H\x00\x12\x42\n\x06\x64\x65vice\x18\r \x01(\x0b\x32+.google.ads.googleads.v25.common.DeviceInfoB\x03\xe0\x41\x05H\x00\x12K\n\x0b\x61\x64_schedule\x18\x0f \x01(\x0b\x32/.google.ads.googleads.v25.common.AdScheduleInfoB\x03\xe0\x41\x05H\x00\x12G\n\tage_range\x18\x10 \x01(\x0b\x32-.google.ads.googleads.v25.common.AgeRangeInfoB\x03\xe0\x41\x05H\x00\x12\x42\n\x06gender\x18\x11 \x01(\x0b\x32+.google.ads.googleads.v25.common.GenderInfoB\x03\xe0\x41\x05H\x00\x12M\n\x0cincome_range\x18\x12 \x01(\x0b\x32\x30.google.ads.googleads.v25.common.IncomeRangeInfoB\x03\xe0\x41\x05H\x00\x12S\n\x0fparental_status\x18\x13 \x01(\x0b\x32\x33.google.ads.googleads.v25.common.ParentalStatusInfoB\x03\xe0\x41\x05H\x00\x12G\n\tuser_list\x18\x16 \x01(\x0b\x32-.google.ads.googleads.v25.common.UserListInfoB\x03\xe0\x41\x05H\x00\x12O\n\ryoutube_video\x18\x14 \x01(\x0b\x32\x31.google.ads.googleads.v25.common.YouTubeVideoInfoB\x03\xe0\x41\x05H\x00\x12S\n\x0fyoutube_channel\x18\x15 \x01(\x0b\x32\x33.google.ads.googleads.v25.common.YouTubeChannelInfoB\x03\xe0\x41\x05H\x00\x12H\n\tproximity\x18\x17 \x01(\x0b\x32..google.ads.googleads.v25.common.ProximityInfoB\x03\xe0\x41\x05H\x00\x12@\n\x05topic\x18\x18 \x01(\x0b\x32*.google.ads.googleads.v25.common.TopicInfoB\x03\xe0\x41\x05H\x00\x12O\n\rlisting_scope\x18\x19 \x01(\x0b\x32\x31.google.ads.googleads.v25.common.ListingScopeInfoB\x03\xe0\x41\x05H\x00\x12\x46\n\x08language\x18\x1a \x01(\x0b\x32-.google.ads.googleads.v25.common.LanguageInfoB\x03\xe0\x41\x05H\x00\x12\x45\n\x08ip_block\x18\x1b \x01(\x0b\x32,.google.ads.googleads.v25.common.IpBlockInfoB\x03\xe0\x41\x05H\x00\x12O\n\rcontent_label\x18\x1c \x01(\x0b\x32\x31.google.ads.googleads.v25.common.ContentLabelInfoB\x03\xe0\x41\x05H\x00\x12\x44\n\x07\x63\x61rrier\x18\x1d \x01(\x0b\x32,.google.ads.googleads.v25.common.CarrierInfoB\x03\xe0\x41\x05H\x00\x12O\n\ruser_interest\x18\x1e \x01(\x0b\x32\x31.google.ads.googleads.v25.common.UserInterestInfoB\x03\xe0\x41\x05H\x00\x12\x44\n\x07webpage\x18\x1f \x01(\x0b\x32,.google.ads.googleads.v25.common.WebpageInfoB\x03\xe0\x41\x05H\x00\x12\x64\n\x18operating_system_version\x18 \x01(\x0b\x32;.google.ads.googleads.v25.common.OperatingSystemVersionInfoB\x03\xe0\x41\x05H\x00\x12O\n\rmobile_device\x18! \x01(\x0b\x32\x31.google.ads.googleads.v25.common.MobileDeviceInfoB\x03\xe0\x41\x05H\x00\x12Q\n\x0elocation_group\x18\" \x01(\x0b\x32\x32.google.ads.googleads.v25.common.LocationGroupInfoB\x03\xe0\x41\x05H\x00\x12S\n\x0f\x63ustom_affinity\x18$ \x01(\x0b\x32\x33.google.ads.googleads.v25.common.CustomAffinityInfoB\x03\xe0\x41\x05H\x00\x12S\n\x0f\x63ustom_audience\x18) \x01(\x0b\x32\x33.google.ads.googleads.v25.common.CustomAudienceInfoB\x03\xe0\x41\x05H\x00\x12W\n\x11\x63ombined_audience\x18* \x01(\x0b\x32\x35.google.ads.googleads.v25.common.CombinedAudienceInfoB\x03\xe0\x41\x05H\x00\x12O\n\rkeyword_theme\x18- \x01(\x0b\x32\x31.google.ads.googleads.v25.common.KeywordThemeInfoB\x03\xe0\x41\x05H\x00\x12T\n\x10local_service_id\x18. \x01(\x0b\x32\x33.google.ads.googleads.v25.common.LocalServiceIdInfoB\x03\xe0\x41\x05H\x00\x12I\n\nbrand_list\x18/ \x01(\x0b\x32..google.ads.googleads.v25.common.BrandListInfoB\x03\xe0\x41\x05H\x00\x12I\n\nlife_event\x18\x30 \x01(\x0b\x32..google.ads.googleads.v25.common.LifeEventInfoB\x03\xe0\x41\x05H\x00\x12M\n\x0cwebpage_list\x18\x31 \x01(\x0b\x32\x30.google.ads.googleads.v25.common.WebpageListInfoB\x03\xe0\x41\x05H\x00\x12M\n\x0cvideo_lineup\x18\x32 \x01(\x0b\x32\x30.google.ads.googleads.v25.common.VideoLineupInfoB\x03\xe0\x41\x05H\x00\x12]\n\x14\x65xtended_demographic\x18\x34 \x01(\x0b\x32\x38.google.ads.googleads.v25.common.ExtendedDemographicInfoB\x03\xe0\x41\x05H\x00:v\xea\x41s\n*googleads.googleapis.com/CampaignCriterion\x12\x45\x63ustomers/{customer_id}/campaignCriteria/{campaign_id}~{criterion_id}B\x0b\n\tcriterionB\x0b\n\t_campaignB\x0f\n\r_criterion_idB\x0f\n\r_bid_modifierB\x0b\n\t_negativeB\x88\x02\n&com.google.ads.googleads.v25.resourcesB\x16\x43\x61mpaignCriterionProtoP\x01ZKgoogle.golang.org/genproto/googleapis/ads/googleads/v25/resources;resources\xa2\x02\x03GAA\xaa\x02\"Google.Ads.GoogleAds.V25.Resources\xca\x02\"Google\\Ads\\GoogleAds\\V25\\Resources\xea\x02&Google::Ads::GoogleAds::V25::Resourcesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Resources + CampaignCriterion = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.CampaignCriterion").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/resources/campaign_customizer_pb.rb b/lib/google/ads/google_ads/v25/resources/campaign_customizer_pb.rb new file mode 100644 index 000000000..63ad3ae80 --- /dev/null +++ b/lib/google/ads/google_ads/v25/resources/campaign_customizer_pb.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/resources/campaign_customizer.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/common/customizer_value_pb' +require 'google/ads/google_ads/v25/enums/customizer_value_status_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' + + +descriptor_data = "\n\n\x06labels\x18= \x03(\tB.\xe0\x41\x03\xfa\x41(\n&googleads.googleapis.com/CampaignLabel\x12o\n\x0f\x65xperiment_type\x18\x11 \x01(\x0e\x32Q.google.ads.googleads.v25.enums.CampaignExperimentTypeEnum.CampaignExperimentTypeB\x03\xe0\x41\x03\x12\x45\n\rbase_campaign\x18\x38 \x01(\tB)\xe0\x41\x03\xfa\x41#\n!googleads.googleapis.com/CampaignH\x05\x88\x01\x01\x12J\n\x0f\x63\x61mpaign_budget\x18> \x01(\tB,\xfa\x41)\n\'googleads.googleapis.com/CampaignBudgetH\x06\x88\x01\x01\x12o\n\x15\x62idding_strategy_type\x18\x16 \x01(\x0e\x32K.google.ads.googleads.v25.enums.BiddingStrategyTypeEnum.BiddingStrategyTypeB\x03\xe0\x41\x03\x12_\n\x1b\x61\x63\x63\x65ssible_bidding_strategy\x18G \x01(\tB:\xe0\x41\x03\xfa\x41\x34\n2googleads.googleapis.com/AccessibleBiddingStrategy\x12H\n\x0e\x63\x61mpaign_group\x18L \x01(\tB+\xfa\x41(\n&googleads.googleapis.com/CampaignGroupH\x07\x88\x01\x01\x12\x1c\n\x0fstart_date_time\x18h \x01(\tH\x08\x88\x01\x01\x12\x1a\n\rend_date_time\x18i \x01(\tH\t\x88\x01\x01\x12\x1d\n\x10\x66inal_url_suffix\x18\x41 \x01(\tH\n\x88\x01\x01\x12J\n\x0e\x66requency_caps\x18( \x03(\x0b\x32\x32.google.ads.googleads.v25.common.FrequencyCapEntry\x12P\n\rvanity_pharma\x18, \x01(\x0b\x32\x39.google.ads.googleads.v25.resources.Campaign.VanityPharma\x12\x62\n\x16selective_optimization\x18- \x01(\x0b\x32\x42.google.ads.googleads.v25.resources.Campaign.SelectiveOptimization\x12g\n\x19optimization_goal_setting\x18\x36 \x01(\x0b\x32\x44.google.ads.googleads.v25.resources.Campaign.OptimizationGoalSetting\x12[\n\x10tracking_setting\x18. \x01(\x0b\x32<.google.ads.googleads.v25.resources.Campaign.TrackingSettingB\x03\xe0\x41\x03\x12Q\n\x0cpayment_mode\x18\x34 \x01(\x0e\x32;.google.ads.googleads.v25.enums.PaymentModeEnum.PaymentMode\x12$\n\x12optimization_score\x18\x42 \x01(\x01\x42\x03\xe0\x41\x03H\x0b\x88\x01\x01\x12l\n!excluded_parent_asset_field_types\x18\x45 \x03(\x0e\x32\x41.google.ads.googleads.v25.enums.AssetFieldTypeEnum.AssetFieldType\x12\x66\n\x1f\x65xcluded_parent_asset_set_types\x18P \x03(\x0e\x32=.google.ads.googleads.v25.enums.AssetSetTypeEnum.AssetSetType\x12h\n\x17performance_max_upgrade\x18M \x01(\x0b\x32\x42.google.ads.googleads.v25.resources.Campaign.PerformanceMaxUpgradeB\x03\xe0\x41\x03\x12P\n\x18hotel_property_asset_set\x18S \x01(\tB)\xe0\x41\x05\xfa\x41#\n!googleads.googleapis.com/AssetSetH\x0c\x88\x01\x01\x12[\n\x0clisting_type\x18V \x01(\x0e\x32;.google.ads.googleads.v25.enums.ListingTypeEnum.ListingTypeB\x03\xe0\x41\x05H\r\x88\x01\x01\x12\x66\n\x19\x61sset_automation_settings\x18X \x03(\x0b\x32\x43.google.ads.googleads.v25.resources.Campaign.AssetAutomationSetting\x12q\n\x12keyword_match_type\x18Z \x01(\x0e\x32U.google.ads.googleads.v25.enums.CampaignKeywordMatchTypeEnum.CampaignKeywordMatchType\x12*\n\x18\x62rand_guidelines_enabled\x18` \x01(\x08\x42\x03\xe0\x41\x05H\x0e\x88\x01\x01\x12V\n\x10\x62rand_guidelines\x18\x62 \x01(\x0b\x32<.google.ads.googleads.v25.resources.Campaign.BrandGuidelines\x12T\n\x0ftext_guidelines\x18k \x01(\x0b\x32;.google.ads.googleads.v25.resources.Campaign.TextGuidelines\x12p\n third_party_integration_partners\x18\x64 \x01(\x0b\x32\x46.google.ads.googleads.v25.common.CampaignThirdPartyIntegrationPartners\x12Q\n\x0e\x61i_max_setting\x18\x65 \x01(\x0b\x32\x39.google.ads.googleads.v25.resources.Campaign.AiMaxSetting\x12\x88\x01\n!contains_eu_political_advertising\x18\x66 \x01(\x0e\x32].google.ads.googleads.v25.enums.EuPoliticalAdvertisingStatusEnum.EuPoliticalAdvertisingStatus\x12V\n\nfeed_types\x18g \x03(\x0e\x32=.google.ads.googleads.v25.enums.AssetSetTypeEnum.AssetSetTypeB\x03\xe0\x41\x03\x12\x39\n,view_through_conversion_optimization_enabled\x18j \x01(\x08H\x0f\x88\x01\x01\x12\x39\n,missing_eu_political_advertising_declaration\x18l \x01(\x08\x42\x03\xe0\x41\x03\x12I\n\x10\x62idding_strategy\x18\x43 \x01(\tB-\xfa\x41*\n(googleads.googleapis.com/BiddingStrategyH\x00\x12\x41\n\ncommission\x18\x31 \x01(\x0b\x32+.google.ads.googleads.v25.common.CommissionH\x00\x12@\n\nmanual_cpa\x18J \x01(\x0b\x32*.google.ads.googleads.v25.common.ManualCpaH\x00\x12@\n\nmanual_cpc\x18\x18 \x01(\x0b\x32*.google.ads.googleads.v25.common.ManualCpcH\x00\x12@\n\nmanual_cpm\x18\x19 \x01(\x0b\x32*.google.ads.googleads.v25.common.ManualCpmH\x00\x12@\n\nmanual_cpv\x18% \x01(\x0b\x32*.google.ads.googleads.v25.common.ManualCpvH\x00\x12T\n\x14maximize_conversions\x18\x1e \x01(\x0b\x32\x34.google.ads.googleads.v25.common.MaximizeConversionsH\x00\x12]\n\x19maximize_conversion_value\x18\x1f \x01(\x0b\x32\x38.google.ads.googleads.v25.common.MaximizeConversionValueH\x00\x12@\n\ntarget_cpa\x18\x1a \x01(\x0b\x32*.google.ads.googleads.v25.common.TargetCpaH\x00\x12Y\n\x17target_impression_share\x18\x30 \x01(\x0b\x32\x36.google.ads.googleads.v25.common.TargetImpressionShareH\x00\x12\x42\n\x0btarget_roas\x18\x1d \x01(\x0b\x32+.google.ads.googleads.v25.common.TargetRoasH\x00\x12\x44\n\x0ctarget_spend\x18\x1b \x01(\x0b\x32,.google.ads.googleads.v25.common.TargetSpendH\x00\x12\x42\n\x0bpercent_cpc\x18\" \x01(\x0b\x32+.google.ads.googleads.v25.common.PercentCpcH\x00\x12@\n\ntarget_cpm\x18) \x01(\x0b\x32*.google.ads.googleads.v25.common.TargetCpmH\x00\x12>\n\tfixed_cpm\x18\\ \x01(\x0b\x32).google.ads.googleads.v25.common.FixedCpmH\x00\x12@\n\ntarget_cpv\x18] \x01(\x0b\x32*.google.ads.googleads.v25.common.TargetCpvH\x00\x12@\n\ntarget_cpc\x18\x63 \x01(\x0b\x32*.google.ads.googleads.v25.common.TargetCpcH\x00\x1a\x9f\x02\n\x15PerformanceMaxUpgrade\x12K\n\x18performance_max_campaign\x18\x01 \x01(\tB)\xe0\x41\x03\xfa\x41#\n!googleads.googleapis.com/Campaign\x12G\n\x14pre_upgrade_campaign\x18\x02 \x01(\tB)\xe0\x41\x03\xfa\x41#\n!googleads.googleapis.com/Campaign\x12p\n\x06status\x18\x03 \x01(\x0e\x32[.google.ads.googleads.v25.enums.PerformanceMaxUpgradeStatusEnum.PerformanceMaxUpgradeStatusB\x03\xe0\x41\x03\x1a\x8d\x03\n\x0fNetworkSettings\x12!\n\x14target_google_search\x18\x05 \x01(\x08H\x00\x88\x01\x01\x12\"\n\x15target_search_network\x18\x06 \x01(\x08H\x01\x88\x01\x01\x12#\n\x16target_content_network\x18\x07 \x01(\x08H\x02\x88\x01\x01\x12*\n\x1dtarget_partner_search_network\x18\x08 \x01(\x08H\x03\x88\x01\x01\x12\x1b\n\x0etarget_youtube\x18\t \x01(\x08H\x04\x88\x01\x01\x12%\n\x18target_google_tv_network\x18\n \x01(\x08H\x05\x88\x01\x01\x42\x17\n\x15_target_google_searchB\x18\n\x16_target_search_networkB\x19\n\x17_target_content_networkB \n\x1e_target_partner_search_networkB\x11\n\x0f_target_youtubeB\x1b\n\x19_target_google_tv_network\x1a\x82\x01\n\x10HotelSettingInfo\x12\x1c\n\x0fhotel_center_id\x18\x02 \x01(\x03H\x00\x88\x01\x01\x12\"\n\x15\x64isable_hotel_setting\x18\x03 \x01(\x08H\x01\x88\x01\x01\x42\x12\n\x10_hotel_center_idB\x18\n\x16_disable_hotel_setting\x1a\x8f\x01\n\x17\x44ynamicSearchAdsSetting\x12\x18\n\x0b\x64omain_name\x18\x06 \x01(\tB\x03\xe0\x41\x02\x12\x1a\n\rlanguage_code\x18\x07 \x01(\tB\x03\xe0\x41\x02\x12#\n\x16use_supplied_urls_only\x18\x08 \x01(\x08H\x00\x88\x01\x01\x42\x19\n\x17_use_supplied_urls_only\x1a\x92\x03\n\x0fShoppingSetting\x12\x18\n\x0bmerchant_id\x18\x05 \x01(\x03H\x00\x88\x01\x01\x12\x12\n\nfeed_label\x18\n \x01(\t\x12\x1e\n\x11\x63\x61mpaign_priority\x18\x07 \x01(\x05H\x01\x88\x01\x01\x12\x19\n\x0c\x65nable_local\x18\x08 \x01(\x08H\x02\x88\x01\x01\x12\"\n\x15use_vehicle_inventory\x18\t \x01(\x08\x42\x03\xe0\x41\x05\x12\x1f\n\x17\x61\x64vertising_partner_ids\x18\x0b \x03(\x03\x12!\n\x14\x64isable_product_feed\x18\x0c \x01(\x08H\x03\x88\x01\x01\x12\x33\n&ignore_brand_exclusion_in_shopping_ads\x18\r \x01(\x08H\x04\x88\x01\x01\x42\x0e\n\x0c_merchant_idB\x14\n\x12_campaign_priorityB\x0f\n\r_enable_localB\x17\n\x15_disable_product_feedB)\n\'_ignore_brand_exclusion_in_shopping_ads\x1a\x42\n\x0fTrackingSetting\x12\x1e\n\x0ctracking_url\x18\x02 \x01(\tB\x03\xe0\x41\x03H\x00\x88\x01\x01\x42\x0f\n\r_tracking_url\x1a\xfc\x01\n\x14GeoTargetTypeSetting\x12q\n\x18positive_geo_target_type\x18\x01 \x01(\x0e\x32O.google.ads.googleads.v25.enums.PositiveGeoTargetTypeEnum.PositiveGeoTargetType\x12q\n\x18negative_geo_target_type\x18\x02 \x01(\x0e\x32O.google.ads.googleads.v25.enums.NegativeGeoTargetTypeEnum.NegativeGeoTargetType\x1a\x7f\n\x14LocalCampaignSetting\x12g\n\x14location_source_type\x18\x01 \x01(\x0e\x32I.google.ads.googleads.v25.enums.LocationSourceTypeEnum.LocationSourceType\x1a\xae\x02\n\x12\x41ppCampaignSetting\x12\x8d\x01\n\x1a\x62idding_strategy_goal_type\x18\x01 \x01(\x0e\x32i.google.ads.googleads.v25.enums.AppCampaignBiddingStrategyGoalTypeEnum.AppCampaignBiddingStrategyGoalType\x12\x18\n\x06\x61pp_id\x18\x04 \x01(\tB\x03\xe0\x41\x05H\x00\x88\x01\x01\x12\x63\n\tapp_store\x18\x03 \x01(\x0e\x32K.google.ads.googleads.v25.enums.AppCampaignAppStoreEnum.AppCampaignAppStoreB\x03\xe0\x41\x05\x42\t\n\x07_app_id\x1a\xf5\x01\n\x0cVanityPharma\x12\x81\x01\n\x1evanity_pharma_display_url_mode\x18\x01 \x01(\x0e\x32Y.google.ads.googleads.v25.enums.VanityPharmaDisplayUrlModeEnum.VanityPharmaDisplayUrlMode\x12\x61\n\x12vanity_pharma_text\x18\x02 \x01(\x0e\x32\x45.google.ads.googleads.v25.enums.VanityPharmaTextEnum.VanityPharmaText\x1a\x63\n\x15SelectiveOptimization\x12J\n\x12\x63onversion_actions\x18\x02 \x03(\tB.\xfa\x41+\n)googleads.googleapis.com/ConversionAction\x1a\x89\x01\n\x17OptimizationGoalSetting\x12n\n\x17optimization_goal_types\x18\x01 \x03(\x0e\x32M.google.ads.googleads.v25.enums.OptimizationGoalTypeEnum.OptimizationGoalType\x1aR\n\x0f\x41udienceSetting\x12&\n\x14use_audience_grouped\x18\x01 \x01(\x08\x42\x03\xe0\x41\x05H\x00\x88\x01\x01\x42\x17\n\x15_use_audience_grouped\x1ap\n\x1dLocalServicesCampaignSettings\x12O\n\rcategory_bids\x18\x01 \x03(\x0b\x32\x38.google.ads.googleads.v25.resources.Campaign.CategoryBid\x1a\xa8\x02\n!LocalServicesPmaxCampaignSettings\x12-\n navigational_query_leads_enabled\x18\x01 \x01(\x08H\x00\x88\x01\x01\x12\x1a\n\rfounding_year\x18\x02 \x01(\x03H\x01\x88\x01\x01\x12\x1e\n\x0c\x63ountry_code\x18\x03 \x01(\tB\x03\xe0\x41\x05H\x02\x88\x01\x01\x12P\n\rphone_numbers\x18\x04 \x03(\x0b\x32\x39.google.ads.googleads.v25.common.LocalServicesPhoneNumberB#\n!_navigational_query_leads_enabledB\x10\n\x0e_founding_yearB\x0f\n\r_country_code\x1a\xb3\x01\n\x0b\x43\x61tegoryBid\x12\x18\n\x0b\x63\x61tegory_id\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\"\n\x15manual_cpa_bid_micros\x18\x02 \x01(\x03H\x01\x88\x01\x01\x12\"\n\x15target_cpa_bid_micros\x18\x03 \x01(\x03H\x02\x88\x01\x01\x42\x0e\n\x0c_category_idB\x18\n\x16_manual_cpa_bid_microsB\x18\n\x16_target_cpa_bid_micros\x1aS\n\x16TravelCampaignSettings\x12#\n\x11travel_account_id\x18\x01 \x01(\x03\x42\x03\xe0\x41\x05H\x00\x88\x01\x01\x42\x14\n\x12_travel_account_id\x1aX\n\x19\x44\x65mandGenCampaignSettings\x12$\n\x12upgraded_targeting\x18\x01 \x01(\x08\x42\x03\xe0\x41\x05H\x00\x88\x01\x01\x42\x15\n\x13_upgraded_targeting\x1a\x86\x12\n\x15VideoCampaignSettings\x12m\n\x11video_ad_sequence\x18\x04 \x01(\x0b\x32R.google.ads.googleads.v25.resources.Campaign.VideoCampaignSettings.VideoAdSequence\x12\x97\x01\n\'reservation_ad_category_self_disclosure\x18\x05 \x01(\x0b\x32\x66.google.ads.googleads.v25.resources.Campaign.VideoCampaignSettings.ReservationAdCategorySelfDisclosure\x12o\n\x0f\x62ooking_details\x18\x06 \x01(\x0b\x32Q.google.ads.googleads.v25.resources.Campaign.VideoCampaignSettings.BookingDetailsB\x03\xe0\x41\x03\x12\x80\x01\n\x1avideo_ad_inventory_control\x18\x02 \x01(\x0b\x32Z.google.ads.googleads.v25.resources.Campaign.VideoCampaignSettings.VideoAdInventoryControlH\x00\x12z\n\x17video_ad_format_control\x18\x03 \x01(\x0b\x32W.google.ads.googleads.v25.resources.Campaign.VideoCampaignSettings.VideoAdFormatControlH\x00\x1a\xf3\x01\n\x17VideoAdInventoryControl\x12\x1c\n\x0f\x61llow_in_stream\x18\x01 \x01(\x08H\x00\x88\x01\x01\x12\x1a\n\rallow_in_feed\x18\x02 \x01(\x08H\x01\x88\x01\x01\x12\x19\n\x0c\x61llow_shorts\x18\x03 \x01(\x08H\x02\x88\x01\x01\x12*\n\x1d\x61llow_non_skippable_in_stream\x18\x04 \x01(\x08H\x03\x88\x01\x01\x42\x12\n\x10_allow_in_streamB\x10\n\x0e_allow_in_feedB\x0f\n\r_allow_shortsB \n\x1e_allow_non_skippable_in_stream\x1a\x9d\x02\n\x14VideoAdFormatControl\x12q\n\x12\x66ormat_restriction\x18\x01 \x01(\x0e\x32U.google.ads.googleads.v25.enums.VideoAdFormatRestrictionEnum.VideoAdFormatRestriction\x12\x91\x01\n$non_skippable_in_stream_restrictions\x18\x02 \x01(\x0b\x32\x63.google.ads.googleads.v25.resources.Campaign.VideoCampaignSettings.NonSkippableInStreamRestrictions\x1a\xf8\x01\n NonSkippableInStreamRestrictions\x12i\n\x0cmin_duration\x18\x01 \x01(\x0e\x32S.google.ads.googleads.v25.enums.NonSkippableMinDurationEnum.NonSkippableMinDuration\x12i\n\x0cmax_duration\x18\x02 \x01(\x0e\x32S.google.ads.googleads.v25.enums.NonSkippableMaxDurationEnum.NonSkippableMaxDuration\x1a\xf5\x01\n\x0fVideoAdSequence\x12\x65\n\x05steps\x18\x01 \x03(\x0b\x32V.google.ads.googleads.v25.resources.Campaign.VideoCampaignSettings.VideoAdSequenceStep\x12{\n\x10minimum_duration\x18\x02 \x01(\x0e\x32\x61.google.ads.googleads.v25.enums.VideoAdSequenceMinimumDurationEnum.VideoAdSequenceMinimumDuration\x1a\xc4\x02\n\x13VideoAdSequenceStep\x12!\n\x19video_ad_sequence_step_id\x18\x01 \x01(\x03\x12\x10\n\x08\x61sset_id\x18\x02 \x01(\x03\x12R\n\rad_group_type\x18\x03 \x01(\x0e\x32;.google.ads.googleads.v25.enums.AdGroupTypeEnum.AdGroupType\x12\x18\n\x10previous_step_id\x18\x04 \x01(\x03\x12\x89\x01\n\x1eprevious_step_interaction_type\x18\x05 \x01(\x0e\x32\x61.google.ads.googleads.v25.enums.VideoAdSequenceInteractionTypeEnum.VideoAdSequenceInteractionType\x1aZ\n#ReservationAdCategorySelfDisclosure\x12\x10\n\x08gambling\x18\x01 \x01(\x08\x12\x0f\n\x07\x61lcohol\x18\x02 \x01(\x08\x12\x10\n\x08politics\x18\x03 \x01(\x08\x1a\xb3\x01\n\x0e\x42ookingDetails\x12T\n\x06status\x18\x01 \x01(\x0e\x32?.google.ads.googleads.v25.enums.BookingStatusEnum.BookingStatusB\x03\xe0\x41\x03\x12&\n\x19hold_expiration_date_time\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12#\n\x16\x63\x61ncellation_date_time\x18\x03 \x01(\tB\x03\xe0\x41\x03\x42\x12\n\x10\x66luidity_control\x1a\xcb\x03\n\x14PmaxCampaignSettings\x12|\n\x19\x62rand_targeting_overrides\x18\x01 \x01(\x0b\x32Y.google.ads.googleads.v25.resources.Campaign.PmaxCampaignSettings.BrandTargetingOverrides\x12}\n%local_services_pmax_campaign_settings\x18\x02 \x01(\x0b\x32N.google.ads.googleads.v25.resources.Campaign.LocalServicesPmaxCampaignSettings\x12(\n\x16local_services_enabled\x18\x03 \x01(\x08\x42\x03\xe0\x41\x03H\x00\x88\x01\x01\x1aq\n\x17\x42randTargetingOverrides\x12/\n\"ignore_exclusions_for_shopping_ads\x18\x01 \x01(\x08H\x00\x88\x01\x01\x42%\n#_ignore_exclusions_for_shopping_adsB\x19\n\x17_local_services_enabled\x1a\xb6\x02\n\x16\x41ssetAutomationSetting\x12o\n\x15\x61sset_automation_type\x18\x01 \x01(\x0e\x32K.google.ads.googleads.v25.enums.AssetAutomationTypeEnum.AssetAutomationTypeH\x00\x88\x01\x01\x12u\n\x17\x61sset_automation_status\x18\x02 \x01(\x0e\x32O.google.ads.googleads.v25.enums.AssetAutomationStatusEnum.AssetAutomationStatusH\x01\x88\x01\x01\x42\x18\n\x16_asset_automation_typeB\x1a\n\x18_asset_automation_status\x1a[\n\x0f\x42randGuidelines\x12\x12\n\nmain_color\x18\x01 \x01(\t\x12\x14\n\x0c\x61\x63\x63\x65nt_color\x18\x02 \x01(\t\x12\x1e\n\x16predefined_font_family\x18\x03 \x01(\t\x1a\x8c\x01\n\x0eTextGuidelines\x12\x17\n\x0fterm_exclusions\x18\x01 \x03(\t\x12\x61\n\x16messaging_restrictions\x18\x02 \x03(\x0b\x32\x41.google.ads.googleads.v25.resources.Campaign.MessagingRestriction\x1a\xa1\x01\n\x14MessagingRestriction\x12\x18\n\x10restriction_text\x18\x01 \x01(\t\x12o\n\x10restriction_type\x18\x02 \x01(\x0e\x32U.google.ads.googleads.v25.enums.MessagingRestrictionTypeEnum.MessagingRestrictionType\x1a\x9f\x02\n\x0c\x41iMaxSetting\x12\x1a\n\renable_ai_max\x18\x01 \x01(\x08H\x00\x88\x01\x01\x12t\n\x11\x62undling_required\x18\x02 \x01(\x0e\x32O.google.ads.googleads.v25.resources.Campaign.AiMaxSetting.AiMaxBundlingRequiredB\x03\xe0\x41\x03H\x01\x88\x01\x01\"U\n\x15\x41iMaxBundlingRequired\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x0b\n\x07UNKNOWN\x10\x01\x12\x10\n\x0cNOT_REQUIRED\x10\x02\x12\x0c\n\x08REQUIRED\x10\x03\x42\x10\n\x0e_enable_ai_maxB\x14\n\x12_bundling_required:W\xea\x41T\n!googleads.googleapis.com/Campaign\x12/customers/{customer_id}/campaigns/{campaign_id}B\x1b\n\x19\x63\x61mpaign_bidding_strategyB\x05\n\x03_idB\x07\n\x05_nameB\x18\n\x16_tracking_url_templateB\x13\n\x11_audience_settingB\x10\n\x0e_base_campaignB\x12\n\x10_campaign_budgetB\x11\n\x0f_campaign_groupB\x12\n\x10_start_date_timeB\x10\n\x0e_end_date_timeB\x13\n\x11_final_url_suffixB\x15\n\x13_optimization_scoreB\x1b\n\x19_hotel_property_asset_setB\x0f\n\r_listing_typeB\x1b\n\x19_brand_guidelines_enabledB/\n-_view_through_conversion_optimization_enabledB\xff\x01\n&com.google.ads.googleads.v25.resourcesB\rCampaignProtoP\x01ZKgoogle.golang.org/genproto/googleapis/ads/googleads/v25/resources;resources\xa2\x02\x03GAA\xaa\x02\"Google.Ads.GoogleAds.V25.Resources\xca\x02\"Google\\Ads\\GoogleAds\\V25\\Resources\xea\x02&Google::Ads::GoogleAds::V25::Resourcesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Resources + Campaign = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.Campaign").msgclass + Campaign::PerformanceMaxUpgrade = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.Campaign.PerformanceMaxUpgrade").msgclass + Campaign::NetworkSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.Campaign.NetworkSettings").msgclass + Campaign::HotelSettingInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.Campaign.HotelSettingInfo").msgclass + Campaign::DynamicSearchAdsSetting = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.Campaign.DynamicSearchAdsSetting").msgclass + Campaign::ShoppingSetting = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.Campaign.ShoppingSetting").msgclass + Campaign::TrackingSetting = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.Campaign.TrackingSetting").msgclass + Campaign::GeoTargetTypeSetting = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.Campaign.GeoTargetTypeSetting").msgclass + Campaign::LocalCampaignSetting = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.Campaign.LocalCampaignSetting").msgclass + Campaign::AppCampaignSetting = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.Campaign.AppCampaignSetting").msgclass + Campaign::VanityPharma = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.Campaign.VanityPharma").msgclass + Campaign::SelectiveOptimization = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.Campaign.SelectiveOptimization").msgclass + Campaign::OptimizationGoalSetting = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.Campaign.OptimizationGoalSetting").msgclass + Campaign::AudienceSetting = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.Campaign.AudienceSetting").msgclass + Campaign::LocalServicesCampaignSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.Campaign.LocalServicesCampaignSettings").msgclass + Campaign::LocalServicesPmaxCampaignSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.Campaign.LocalServicesPmaxCampaignSettings").msgclass + Campaign::CategoryBid = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.Campaign.CategoryBid").msgclass + Campaign::TravelCampaignSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.Campaign.TravelCampaignSettings").msgclass + Campaign::DemandGenCampaignSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.Campaign.DemandGenCampaignSettings").msgclass + Campaign::VideoCampaignSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.Campaign.VideoCampaignSettings").msgclass + Campaign::VideoCampaignSettings::VideoAdInventoryControl = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.Campaign.VideoCampaignSettings.VideoAdInventoryControl").msgclass + Campaign::VideoCampaignSettings::VideoAdFormatControl = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.Campaign.VideoCampaignSettings.VideoAdFormatControl").msgclass + Campaign::VideoCampaignSettings::NonSkippableInStreamRestrictions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.Campaign.VideoCampaignSettings.NonSkippableInStreamRestrictions").msgclass + Campaign::VideoCampaignSettings::VideoAdSequence = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.Campaign.VideoCampaignSettings.VideoAdSequence").msgclass + Campaign::VideoCampaignSettings::VideoAdSequenceStep = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.Campaign.VideoCampaignSettings.VideoAdSequenceStep").msgclass + Campaign::VideoCampaignSettings::ReservationAdCategorySelfDisclosure = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.Campaign.VideoCampaignSettings.ReservationAdCategorySelfDisclosure").msgclass + Campaign::VideoCampaignSettings::BookingDetails = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.Campaign.VideoCampaignSettings.BookingDetails").msgclass + Campaign::PmaxCampaignSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.Campaign.PmaxCampaignSettings").msgclass + Campaign::PmaxCampaignSettings::BrandTargetingOverrides = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.Campaign.PmaxCampaignSettings.BrandTargetingOverrides").msgclass + Campaign::AssetAutomationSetting = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.Campaign.AssetAutomationSetting").msgclass + Campaign::BrandGuidelines = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.Campaign.BrandGuidelines").msgclass + Campaign::TextGuidelines = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.Campaign.TextGuidelines").msgclass + Campaign::MessagingRestriction = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.Campaign.MessagingRestriction").msgclass + Campaign::AiMaxSetting = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.Campaign.AiMaxSetting").msgclass + Campaign::AiMaxSetting::AiMaxBundlingRequired = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.Campaign.AiMaxSetting.AiMaxBundlingRequired").enummodule + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/resources/campaign_search_term_insight_pb.rb b/lib/google/ads/google_ads/v25/resources/campaign_search_term_insight_pb.rb new file mode 100644 index 000000000..cf4948268 --- /dev/null +++ b/lib/google/ads/google_ads/v25/resources/campaign_search_term_insight_pb.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/resources/campaign_search_term_insight.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' + + +descriptor_data = "\nEgoogle/ads/googleads/v25/resources/campaign_search_term_insight.proto\x12\"google.ads.googleads.v25.resources\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\xf9\x02\n\x19\x43\x61mpaignSearchTermInsight\x12Q\n\rresource_name\x18\x01 \x01(\tB:\xe0\x41\x03\xfa\x41\x34\n2googleads.googleapis.com/CampaignSearchTermInsight\x12 \n\x0e\x63\x61tegory_label\x18\x02 \x01(\tB\x03\xe0\x41\x03H\x00\x88\x01\x01\x12\x14\n\x02id\x18\x03 \x01(\x03\x42\x03\xe0\x41\x03H\x01\x88\x01\x01\x12\x1d\n\x0b\x63\x61mpaign_id\x18\x04 \x01(\x03\x42\x03\xe0\x41\x03H\x02\x88\x01\x01:\x87\x01\xea\x41\x83\x01\n2googleads.googleapis.com/CampaignSearchTermInsight\x12Mcustomers/{customer_id}/campaignSearchTermInsights/{campaign_id}~{cluster_id}B\x11\n\x0f_category_labelB\x05\n\x03_idB\x0e\n\x0c_campaign_idB\x90\x02\n&com.google.ads.googleads.v25.resourcesB\x1e\x43\x61mpaignSearchTermInsightProtoP\x01ZKgoogle.golang.org/genproto/googleapis/ads/googleads/v25/resources;resources\xa2\x02\x03GAA\xaa\x02\"Google.Ads.GoogleAds.V25.Resources\xca\x02\"Google\\Ads\\GoogleAds\\V25\\Resources\xea\x02&Google::Ads::GoogleAds::V25::Resourcesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Resources + CampaignSearchTermInsight = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.CampaignSearchTermInsight").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/resources/campaign_search_term_view_pb.rb b/lib/google/ads/google_ads/v25/resources/campaign_search_term_view_pb.rb new file mode 100644 index 000000000..35a906d51 --- /dev/null +++ b/lib/google/ads/google_ads/v25/resources/campaign_search_term_view_pb.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/resources/campaign_search_term_view.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' + + +descriptor_data = "\nBgoogle/ads/googleads/v25/resources/campaign_search_term_view.proto\x12\"google.ads.googleads.v25.resources\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\xe3\x02\n\x16\x43\x61mpaignSearchTermView\x12N\n\rresource_name\x18\x01 \x01(\tB7\xe0\x41\x03\xfa\x41\x31\n/googleads.googleapis.com/CampaignSearchTermView\x12\x1d\n\x0bsearch_term\x18\x02 \x01(\tB\x03\xe0\x41\x03H\x00\x88\x01\x01\x12@\n\x08\x63\x61mpaign\x18\x03 \x01(\tB)\xe0\x41\x03\xfa\x41#\n!googleads.googleapis.com/CampaignH\x01\x88\x01\x01:{\xea\x41x\n/googleads.googleapis.com/CampaignSearchTermView\x12\x45\x63ustomers/{customer_id}/campaignSearchTermViews/{campaign_id}~{query}B\x0e\n\x0c_search_termB\x0b\n\t_campaignB\x8d\x02\n&com.google.ads.googleads.v25.resourcesB\x1b\x43\x61mpaignSearchTermViewProtoP\x01ZKgoogle.golang.org/genproto/googleapis/ads/googleads/v25/resources;resources\xa2\x02\x03GAA\xaa\x02\"Google.Ads.GoogleAds.V25.Resources\xca\x02\"Google\\Ads\\GoogleAds\\V25\\Resources\xea\x02&Google::Ads::GoogleAds::V25::Resourcesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Resources + CampaignSearchTermView = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.CampaignSearchTermView").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/resources/campaign_shared_set_pb.rb b/lib/google/ads/google_ads/v25/resources/campaign_shared_set_pb.rb new file mode 100644 index 000000000..271060a2c --- /dev/null +++ b/lib/google/ads/google_ads/v25/resources/campaign_shared_set_pb.rb @@ -0,0 +1,27 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/resources/campaign_shared_set.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/enums/campaign_shared_set_status_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' + + +descriptor_data = "\n.google.ads.googleads.v25.common.TargetRoasSimulationPointListB\x03\xe0\x41\x03H\x00\x12|\n\"target_impression_share_point_list\x18\n \x01(\x0b\x32I.google.ads.googleads.v25.common.TargetImpressionShareSimulationPointListB\x03\xe0\x41\x03H\x00\x12\\\n\x11\x62udget_point_list\x18\x0b \x01(\x0b\x32:.google.ads.googleads.v25.common.BudgetSimulationPointListB\x03\xe0\x41\x03H\x00:\xa1\x01\xea\x41\x9d\x01\n+googleads.googleapis.com/CampaignSimulation\x12ncustomers/{customer_id}/campaignSimulations/{campaign_id}~{type}~{modification_method}~{start_date}~{end_date}B\x0c\n\npoint_listB\x89\x02\n&com.google.ads.googleads.v25.resourcesB\x17\x43\x61mpaignSimulationProtoP\x01ZKgoogle.golang.org/genproto/googleapis/ads/googleads/v25/resources;resources\xa2\x02\x03GAA\xaa\x02\"Google.Ads.GoogleAds.V25.Resources\xca\x02\"Google\\Ads\\GoogleAds\\V25\\Resources\xea\x02&Google::Ads::GoogleAds::V25::Resourcesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Resources + CampaignSimulation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.CampaignSimulation").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/resources/carrier_constant_pb.rb b/lib/google/ads/google_ads/v25/resources/carrier_constant_pb.rb new file mode 100644 index 000000000..80538cb2c --- /dev/null +++ b/lib/google/ads/google_ads/v25/resources/carrier_constant_pb.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/resources/carrier_constant.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' + + +descriptor_data = "\n9google/ads/googleads/v25/resources/carrier_constant.proto\x12\"google.ads.googleads.v25.resources\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\x99\x02\n\x0f\x43\x61rrierConstant\x12G\n\rresource_name\x18\x01 \x01(\tB0\xe0\x41\x03\xfa\x41*\n(googleads.googleapis.com/CarrierConstant\x12\x14\n\x02id\x18\x05 \x01(\x03\x42\x03\xe0\x41\x03H\x00\x88\x01\x01\x12\x16\n\x04name\x18\x06 \x01(\tB\x03\xe0\x41\x03H\x01\x88\x01\x01\x12\x1e\n\x0c\x63ountry_code\x18\x07 \x01(\tB\x03\xe0\x41\x03H\x02\x88\x01\x01:N\xea\x41K\n(googleads.googleapis.com/CarrierConstant\x12\x1f\x63\x61rrierConstants/{criterion_id}B\x05\n\x03_idB\x07\n\x05_nameB\x0f\n\r_country_codeB\x86\x02\n&com.google.ads.googleads.v25.resourcesB\x14\x43\x61rrierConstantProtoP\x01ZKgoogle.golang.org/genproto/googleapis/ads/googleads/v25/resources;resources\xa2\x02\x03GAA\xaa\x02\"Google.Ads.GoogleAds.V25.Resources\xca\x02\"Google\\Ads\\GoogleAds\\V25\\Resources\xea\x02&Google::Ads::GoogleAds::V25::Resourcesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Resources + CarrierConstant = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.CarrierConstant").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/resources/cart_data_sales_view_pb.rb b/lib/google/ads/google_ads/v25/resources/cart_data_sales_view_pb.rb new file mode 100644 index 000000000..9fbb318b3 --- /dev/null +++ b/lib/google/ads/google_ads/v25/resources/cart_data_sales_view_pb.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/resources/cart_data_sales_view.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' + + +descriptor_data = "\n=google/ads/googleads/v25/resources/cart_data_sales_view.proto\x12\"google.ads.googleads.v25.resources\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\xe2\x01\n\x11\x43\x61rtDataSalesView\x12I\n\rresource_name\x18\x01 \x01(\tB2\xe0\x41\x03\xfa\x41,\n*googleads.googleapis.com/CartDataSalesView:\x81\x01\xea\x41~\n*googleads.googleapis.com/CartDataSalesView\x12)customers/{customer_id}/cartDataSalesView*\x12\x63\x61rtDataSalesViews2\x11\x63\x61rtDataSalesViewB\x88\x02\n&com.google.ads.googleads.v25.resourcesB\x16\x43\x61rtDataSalesViewProtoP\x01ZKgoogle.golang.org/genproto/googleapis/ads/googleads/v25/resources;resources\xa2\x02\x03GAA\xaa\x02\"Google.Ads.GoogleAds.V25.Resources\xca\x02\"Google\\Ads\\GoogleAds\\V25\\Resources\xea\x02&Google::Ads::GoogleAds::V25::Resourcesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Resources + CartDataSalesView = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.CartDataSalesView").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/resources/change_event_pb.rb b/lib/google/ads/google_ads/v25/resources/change_event_pb.rb new file mode 100644 index 000000000..8b0695afd --- /dev/null +++ b/lib/google/ads/google_ads/v25/resources/change_event_pb.rb @@ -0,0 +1,46 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/resources/change_event.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/enums/change_client_type_pb' +require 'google/ads/google_ads/v25/enums/change_event_resource_type_pb' +require 'google/ads/google_ads/v25/enums/resource_change_operation_pb' +require 'google/ads/google_ads/v25/resources/ad_pb' +require 'google/ads/google_ads/v25/resources/ad_group_pb' +require 'google/ads/google_ads/v25/resources/ad_group_ad_pb' +require 'google/ads/google_ads/v25/resources/ad_group_asset_pb' +require 'google/ads/google_ads/v25/resources/ad_group_bid_modifier_pb' +require 'google/ads/google_ads/v25/resources/ad_group_criterion_pb' +require 'google/ads/google_ads/v25/resources/asset_pb' +require 'google/ads/google_ads/v25/resources/asset_set_pb' +require 'google/ads/google_ads/v25/resources/asset_set_asset_pb' +require 'google/ads/google_ads/v25/resources/campaign_pb' +require 'google/ads/google_ads/v25/resources/campaign_asset_pb' +require 'google/ads/google_ads/v25/resources/campaign_asset_set_pb' +require 'google/ads/google_ads/v25/resources/campaign_budget_pb' +require 'google/ads/google_ads/v25/resources/campaign_criterion_pb' +require 'google/ads/google_ads/v25/resources/customer_asset_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/field_mask_pb' + + +descriptor_data = "\n5google/ads/googleads/v25/resources/change_event.proto\x12\"google.ads.googleads.v25.resources\x1a\x37google/ads/googleads/v25/enums/change_client_type.proto\x1a?google/ads/googleads/v25/enums/change_event_resource_type.proto\x1a>google/ads/googleads/v25/enums/resource_change_operation.proto\x1a+google/ads/googleads/v25/resources/ad.proto\x1a\x31google/ads/googleads/v25/resources/ad_group.proto\x1a\x34google/ads/googleads/v25/resources/ad_group_ad.proto\x1a\x37google/ads/googleads/v25/resources/ad_group_asset.proto\x1a>google/ads/googleads/v25/resources/ad_group_bid_modifier.proto\x1a;google/ads/googleads/v25/resources/ad_group_criterion.proto\x1a.google/ads/googleads/v25/resources/asset.proto\x1a\x32google/ads/googleads/v25/resources/asset_set.proto\x1a\x38google/ads/googleads/v25/resources/asset_set_asset.proto\x1a\x31google/ads/googleads/v25/resources/campaign.proto\x1a\x37google/ads/googleads/v25/resources/campaign_asset.proto\x1a;google/ads/googleads/v25/resources/campaign_asset_set.proto\x1a\x38google/ads/googleads/v25/resources/campaign_budget.proto\x1a;google/ads/googleads/v25/resources/campaign_criterion.proto\x1a\x37google/ads/googleads/v25/resources/customer_asset.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\"\xc0\x11\n\x0b\x43hangeEvent\x12\x43\n\rresource_name\x18\x01 \x01(\tB,\xe0\x41\x03\xfa\x41&\n$googleads.googleapis.com/ChangeEvent\x12\x1d\n\x10\x63hange_date_time\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12v\n\x14\x63hange_resource_type\x18\x03 \x01(\x0e\x32S.google.ads.googleads.v25.enums.ChangeEventResourceTypeEnum.ChangeEventResourceTypeB\x03\xe0\x41\x03\x12!\n\x14\x63hange_resource_name\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12_\n\x0b\x63lient_type\x18\x05 \x01(\x0e\x32\x45.google.ads.googleads.v25.enums.ChangeClientTypeEnum.ChangeClientTypeB\x03\xe0\x41\x03\x12\x17\n\nuser_email\x18\x06 \x01(\tB\x03\xe0\x41\x03\x12Z\n\x0cold_resource\x18\x07 \x01(\x0b\x32?.google.ads.googleads.v25.resources.ChangeEvent.ChangedResourceB\x03\xe0\x41\x03\x12Z\n\x0cnew_resource\x18\x08 \x01(\x0b\x32?.google.ads.googleads.v25.resources.ChangeEvent.ChangedResourceB\x03\xe0\x41\x03\x12{\n\x19resource_change_operation\x18\t \x01(\x0e\x32S.google.ads.googleads.v25.enums.ResourceChangeOperationEnum.ResourceChangeOperationB\x03\xe0\x41\x03\x12\x37\n\x0e\x63hanged_fields\x18\n \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x03\x12;\n\x08\x63\x61mpaign\x18\x0b \x01(\tB)\xe0\x41\x03\xfa\x41#\n!googleads.googleapis.com/Campaign\x12:\n\x08\x61\x64_group\x18\x0c \x01(\tB(\xe0\x41\x03\xfa\x41\"\n googleads.googleapis.com/AdGroup\x12\x35\n\x05\x61sset\x18\x14 \x01(\tB&\xe0\x41\x03\xfa\x41 \n\x1egoogleads.googleapis.com/Asset\x1a\x95\t\n\x0f\x43hangedResource\x12\x37\n\x02\x61\x64\x18\x01 \x01(\x0b\x32&.google.ads.googleads.v25.resources.AdB\x03\xe0\x41\x03\x12\x42\n\x08\x61\x64_group\x18\x02 \x01(\x0b\x32+.google.ads.googleads.v25.resources.AdGroupB\x03\xe0\x41\x03\x12U\n\x12\x61\x64_group_criterion\x18\x03 \x01(\x0b\x32\x34.google.ads.googleads.v25.resources.AdGroupCriterionB\x03\xe0\x41\x03\x12\x43\n\x08\x63\x61mpaign\x18\x04 \x01(\x0b\x32,.google.ads.googleads.v25.resources.CampaignB\x03\xe0\x41\x03\x12P\n\x0f\x63\x61mpaign_budget\x18\x05 \x01(\x0b\x32\x32.google.ads.googleads.v25.resources.CampaignBudgetB\x03\xe0\x41\x03\x12Z\n\x15\x61\x64_group_bid_modifier\x18\x06 \x01(\x0b\x32\x36.google.ads.googleads.v25.resources.AdGroupBidModifierB\x03\xe0\x41\x03\x12V\n\x12\x63\x61mpaign_criterion\x18\x07 \x01(\x0b\x32\x35.google.ads.googleads.v25.resources.CampaignCriterionB\x03\xe0\x41\x03\x12G\n\x0b\x61\x64_group_ad\x18\x0c \x01(\x0b\x32-.google.ads.googleads.v25.resources.AdGroupAdB\x03\xe0\x41\x03\x12=\n\x05\x61sset\x18\r \x01(\x0b\x32).google.ads.googleads.v25.resources.AssetB\x03\xe0\x41\x03\x12N\n\x0e\x63ustomer_asset\x18\x0e \x01(\x0b\x32\x31.google.ads.googleads.v25.resources.CustomerAssetB\x03\xe0\x41\x03\x12N\n\x0e\x63\x61mpaign_asset\x18\x0f \x01(\x0b\x32\x31.google.ads.googleads.v25.resources.CampaignAssetB\x03\xe0\x41\x03\x12M\n\x0e\x61\x64_group_asset\x18\x10 \x01(\x0b\x32\x30.google.ads.googleads.v25.resources.AdGroupAssetB\x03\xe0\x41\x03\x12\x44\n\tasset_set\x18\x11 \x01(\x0b\x32,.google.ads.googleads.v25.resources.AssetSetB\x03\xe0\x41\x03\x12O\n\x0f\x61sset_set_asset\x18\x12 \x01(\x0b\x32\x31.google.ads.googleads.v25.resources.AssetSetAssetB\x03\xe0\x41\x03\x12U\n\x12\x63\x61mpaign_asset_set\x18\x13 \x01(\x0b\x32\x34.google.ads.googleads.v25.resources.CampaignAssetSetB\x03\xe0\x41\x03:\x81\x01\xea\x41~\n$googleads.googleapis.com/ChangeEvent\x12Vcustomers/{customer_id}/changeEvents/{timestamp_micros}~{command_index}~{mutate_index}B\x82\x02\n&com.google.ads.googleads.v25.resourcesB\x10\x43hangeEventProtoP\x01ZKgoogle.golang.org/genproto/googleapis/ads/googleads/v25/resources;resources\xa2\x02\x03GAA\xaa\x02\"Google.Ads.GoogleAds.V25.Resources\xca\x02\"Google\\Ads\\GoogleAds\\V25\\Resources\xea\x02&Google::Ads::GoogleAds::V25::Resourcesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Resources + ChangeEvent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.ChangeEvent").msgclass + ChangeEvent::ChangedResource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.ChangeEvent.ChangedResource").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/resources/change_status_pb.rb b/lib/google/ads/google_ads/v25/resources/change_status_pb.rb new file mode 100644 index 000000000..d1302ac49 --- /dev/null +++ b/lib/google/ads/google_ads/v25/resources/change_status_pb.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/resources/change_status.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/enums/change_status_operation_pb' +require 'google/ads/google_ads/v25/enums/change_status_resource_type_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' + + +descriptor_data = "\n6google/ads/googleads/v25/resources/change_status.proto\x12\"google.ads.googleads.v25.resources\x1a\n\nshared_set\x18! \x01(\tB*\xe0\x41\x03\xfa\x41$\n\"googleads.googleapis.com/SharedSet\x12O\n\x13\x63\x61mpaign_shared_set\x18\" \x01(\tB2\xe0\x41\x03\xfa\x41,\n*googleads.googleapis.com/CampaignSharedSet\x12\x35\n\x05\x61sset\x18# \x01(\tB&\xe0\x41\x03\xfa\x41 \n\x1egoogleads.googleapis.com/Asset\x12\x46\n\x0e\x63ustomer_asset\x18$ \x01(\tB.\xe0\x41\x03\xfa\x41(\n&googleads.googleapis.com/CustomerAsset\x12\x46\n\x0e\x63\x61mpaign_asset\x18% \x01(\tB.\xe0\x41\x03\xfa\x41(\n&googleads.googleapis.com/CampaignAsset\x12\x45\n\x0e\x61\x64_group_asset\x18& \x01(\tB-\xe0\x41\x03\xfa\x41\'\n%googleads.googleapis.com/AdGroupAsset\x12L\n\x11\x63ombined_audience\x18( \x01(\tB1\xe0\x41\x03\xfa\x41+\n)googleads.googleapis.com/CombinedAudience\x12@\n\x0b\x61sset_group\x18) \x01(\tB+\xe0\x41\x03\xfa\x41%\n#googleads.googleapis.com/AssetGroup\x12<\n\tasset_set\x18+ \x01(\tB)\xe0\x41\x03\xfa\x41#\n!googleads.googleapis.com/AssetSet\x12H\n\x0f\x63\x61mpaign_budget\x18* \x01(\tB/\xe0\x41\x03\xfa\x41)\n\'googleads.googleapis.com/CampaignBudget\x12M\n\x12\x63\x61mpaign_asset_set\x18, \x01(\tB1\xe0\x41\x03\xfa\x41+\n)googleads.googleapis.com/CampaignAssetSet:c\xea\x41`\n%googleads.googleapis.com/ChangeStatus\x12\x37\x63ustomers/{customer_id}/changeStatus/{change_status_id}B\x18\n\x16_last_change_date_timeB\x0b\n\t_campaignB\x0b\n\t_ad_groupB\x0e\n\x0c_ad_group_adB\x15\n\x13_ad_group_criterionB\x15\n\x13_campaign_criterionB\x18\n\x16_ad_group_bid_modifierB\x83\x02\n&com.google.ads.googleads.v25.resourcesB\x11\x43hangeStatusProtoP\x01ZKgoogle.golang.org/genproto/googleapis/ads/googleads/v25/resources;resources\xa2\x02\x03GAA\xaa\x02\"Google.Ads.GoogleAds.V25.Resources\xca\x02\"Google\\Ads\\GoogleAds\\V25\\Resources\xea\x02&Google::Ads::GoogleAds::V25::Resourcesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Resources + ChangeStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.ChangeStatus").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/resources/channel_aggregate_asset_view_pb.rb b/lib/google/ads/google_ads/v25/resources/channel_aggregate_asset_view_pb.rb new file mode 100644 index 000000000..76600cc3b --- /dev/null +++ b/lib/google/ads/google_ads/v25/resources/channel_aggregate_asset_view_pb.rb @@ -0,0 +1,29 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/resources/channel_aggregate_asset_view.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/enums/advertising_channel_type_pb' +require 'google/ads/google_ads/v25/enums/asset_field_type_pb' +require 'google/ads/google_ads/v25/enums/asset_source_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' + + +descriptor_data = "\nEgoogle/ads/googleads/v25/resources/channel_aggregate_asset_view.proto\x12\"google.ads.googleads.v25.resources\x1a=google/ads/googleads/v25/enums/advertising_channel_type.proto\x1a\x35google/ads/googleads/v25/enums/asset_field_type.proto\x1a\x31google/ads/googleads/v25/enums/asset_source.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\xdf\x05\n\x19\x43hannelAggregateAssetView\x12Q\n\rresource_name\x18\x01 \x01(\tB:\xe0\x41\x03\xfa\x41\x34\n2googleads.googleapis.com/ChannelAggregateAssetView\x12}\n\x18\x61\x64vertising_channel_type\x18\x02 \x01(\x0e\x32Q.google.ads.googleads.v25.enums.AdvertisingChannelTypeEnum.AdvertisingChannelTypeB\x03\xe0\x41\x03H\x00\x88\x01\x01\x12:\n\x05\x61sset\x18\x03 \x01(\tB&\xe0\x41\x03\xfa\x41 \n\x1egoogleads.googleapis.com/AssetH\x01\x88\x01\x01\x12[\n\x0c\x61sset_source\x18\x04 \x01(\x0e\x32;.google.ads.googleads.v25.enums.AssetSourceEnum.AssetSourceB\x03\xe0\x41\x03H\x02\x88\x01\x01\x12_\n\nfield_type\x18\x05 \x01(\x0e\x32\x41.google.ads.googleads.v25.enums.AssetFieldTypeEnum.AssetFieldTypeB\x03\xe0\x41\x03H\x03\x88\x01\x01:\xae\x01\xea\x41\xaa\x01\n2googleads.googleapis.com/ChannelAggregateAssetView\x12tcustomers/{customer_id}/channelAggregateAssetViews/{advertising_channel_type}~{asset_id}~{asset_source}~{field_type}B\x1b\n\x19_advertising_channel_typeB\x08\n\x06_assetB\x0f\n\r_asset_sourceB\r\n\x0b_field_typeB\x90\x02\n&com.google.ads.googleads.v25.resourcesB\x1e\x43hannelAggregateAssetViewProtoP\x01ZKgoogle.golang.org/genproto/googleapis/ads/googleads/v25/resources;resources\xa2\x02\x03GAA\xaa\x02\"Google.Ads.GoogleAds.V25.Resources\xca\x02\"Google\\Ads\\GoogleAds\\V25\\Resources\xea\x02&Google::Ads::GoogleAds::V25::Resourcesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Resources + ChannelAggregateAssetView = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.ChannelAggregateAssetView").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/resources/click_view_pb.rb b/lib/google/ads/google_ads/v25/resources/click_view_pb.rb new file mode 100644 index 000000000..0d1d938ca --- /dev/null +++ b/lib/google/ads/google_ads/v25/resources/click_view_pb.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/resources/click_view.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/common/click_location_pb' +require 'google/ads/google_ads/v25/common/criteria_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' + + +descriptor_data = "\n3google/ads/googleads/v25/resources/click_view.proto\x12\"google.ads.googleads.v25.resources\x1a\x34google/ads/googleads/v25/common/click_location.proto\x1a.google/ads/googleads/v25/common/criteria.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\xca\x06\n\tClickView\x12\x41\n\rresource_name\x18\x01 \x01(\tB*\xe0\x41\x03\xfa\x41$\n\"googleads.googleapis.com/ClickView\x12\x17\n\x05gclid\x18\x08 \x01(\tB\x03\xe0\x41\x03H\x00\x88\x01\x01\x12M\n\x10\x61rea_of_interest\x18\x03 \x01(\x0b\x32..google.ads.googleads.v25.common.ClickLocationB\x03\xe0\x41\x03\x12Q\n\x14location_of_presence\x18\x04 \x01(\x0b\x32..google.ads.googleads.v25.common.ClickLocationB\x03\xe0\x41\x03\x12\x1d\n\x0bpage_number\x18\t \x01(\x03\x42\x03\xe0\x41\x03H\x01\x88\x01\x01\x12\x44\n\x0b\x61\x64_group_ad\x18\n \x01(\tB*\xe0\x41\x03\xfa\x41$\n\"googleads.googleapis.com/AdGroupAdH\x02\x88\x01\x01\x12Y\n\x18\x63\x61mpaign_location_target\x18\x0b \x01(\tB2\xe0\x41\x03\xfa\x41,\n*googleads.googleapis.com/GeoTargetConstantH\x03\x88\x01\x01\x12\x41\n\tuser_list\x18\x0c \x01(\tB)\xe0\x41\x03\xfa\x41#\n!googleads.googleapis.com/UserListH\x04\x88\x01\x01\x12\x42\n\x07keyword\x18\r \x01(\tB1\xe0\x41\x03\xfa\x41+\n)googleads.googleapis.com/AdGroupCriterion\x12G\n\x0ckeyword_info\x18\x0e \x01(\x0b\x32,.google.ads.googleads.v25.common.KeywordInfoB\x03\xe0\x41\x03:Z\xea\x41W\n\"googleads.googleapis.com/ClickView\x12\x31\x63ustomers/{customer_id}/clickViews/{date}~{gclid}B\x08\n\x06_gclidB\x0e\n\x0c_page_numberB\x0e\n\x0c_ad_group_adB\x1b\n\x19_campaign_location_targetB\x0c\n\n_user_listB\x80\x02\n&com.google.ads.googleads.v25.resourcesB\x0e\x43lickViewProtoP\x01ZKgoogle.golang.org/genproto/googleapis/ads/googleads/v25/resources;resources\xa2\x02\x03GAA\xaa\x02\"Google.Ads.GoogleAds.V25.Resources\xca\x02\"Google\\Ads\\GoogleAds\\V25\\Resources\xea\x02&Google::Ads::GoogleAds::V25::Resourcesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Resources + ClickView = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.ClickView").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/resources/combined_audience_pb.rb b/lib/google/ads/google_ads/v25/resources/combined_audience_pb.rb new file mode 100644 index 000000000..5cb77349c --- /dev/null +++ b/lib/google/ads/google_ads/v25/resources/combined_audience_pb.rb @@ -0,0 +1,27 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/resources/combined_audience.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/enums/combined_audience_status_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' + + +descriptor_data = "\n:google/ads/googleads/v25/resources/combined_audience.proto\x12\"google.ads.googleads.v25.resources\x1a=google/ads/googleads/v25/enums/combined_audience_status.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\xf4\x02\n\x10\x43ombinedAudience\x12H\n\rresource_name\x18\x01 \x01(\tB1\xe0\x41\x05\xfa\x41+\n)googleads.googleapis.com/CombinedAudience\x12\x0f\n\x02id\x18\x02 \x01(\x03\x42\x03\xe0\x41\x03\x12\x66\n\x06status\x18\x03 \x01(\x0e\x32Q.google.ads.googleads.v25.enums.CombinedAudienceStatusEnum.CombinedAudienceStatusB\x03\xe0\x41\x03\x12\x11\n\x04name\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\x05 \x01(\tB\x03\xe0\x41\x03:p\xea\x41m\n)googleads.googleapis.com/CombinedAudience\x12@customers/{customer_id}/combinedAudiences/{combined_audience_id}B\x87\x02\n&com.google.ads.googleads.v25.resourcesB\x15\x43ombinedAudienceProtoP\x01ZKgoogle.golang.org/genproto/googleapis/ads/googleads/v25/resources;resources\xa2\x02\x03GAA\xaa\x02\"Google.Ads.GoogleAds.V25.Resources\xca\x02\"Google\\Ads\\GoogleAds\\V25\\Resources\xea\x02&Google::Ads::GoogleAds::V25::Resourcesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Resources + CombinedAudience = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.CombinedAudience").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/resources/content_criterion_view_pb.rb b/lib/google/ads/google_ads/v25/resources/content_criterion_view_pb.rb new file mode 100644 index 000000000..744c66325 --- /dev/null +++ b/lib/google/ads/google_ads/v25/resources/content_criterion_view_pb.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/resources/content_criterion_view.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' + + +descriptor_data = "\n?google/ads/googleads/v25/resources/content_criterion_view.proto\x12\"google.ads.googleads.v25.resources\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\xe4\x01\n\x14\x43ontentCriterionView\x12L\n\rresource_name\x18\x01 \x01(\tB5\xe0\x41\x03\xfa\x41/\n-googleads.googleapis.com/ContentCriterionView:~\xea\x41{\n-googleads.googleapis.com/ContentCriterionView\x12Jcustomers/{customer_id}/contentCriterionViews/{ad_group_id}~{criterion_id}B\x8b\x02\n&com.google.ads.googleads.v25.resourcesB\x19\x43ontentCriterionViewProtoP\x01ZKgoogle.golang.org/genproto/googleapis/ads/googleads/v25/resources;resources\xa2\x02\x03GAA\xaa\x02\"Google.Ads.GoogleAds.V25.Resources\xca\x02\"Google\\Ads\\GoogleAds\\V25\\Resources\xea\x02&Google::Ads::GoogleAds::V25::Resourcesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Resources + ContentCriterionView = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.ContentCriterionView").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/resources/conversion_action_pb.rb b/lib/google/ads/google_ads/v25/resources/conversion_action_pb.rb new file mode 100644 index 000000000..85f8e3f46 --- /dev/null +++ b/lib/google/ads/google_ads/v25/resources/conversion_action_pb.rb @@ -0,0 +1,40 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/resources/conversion_action.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/common/tag_snippet_pb' +require 'google/ads/google_ads/v25/enums/attribution_model_pb' +require 'google/ads/google_ads/v25/enums/conversion_action_category_pb' +require 'google/ads/google_ads/v25/enums/conversion_action_counting_type_pb' +require 'google/ads/google_ads/v25/enums/conversion_action_status_pb' +require 'google/ads/google_ads/v25/enums/conversion_action_type_pb' +require 'google/ads/google_ads/v25/enums/conversion_origin_pb' +require 'google/ads/google_ads/v25/enums/data_driven_model_status_pb' +require 'google/ads/google_ads/v25/enums/mobile_app_vendor_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' + + +descriptor_data = "\n:google/ads/googleads/v25/resources/conversion_action.proto\x12\"google.ads.googleads.v25.resources\x1a\x31google/ads/googleads/v25/common/tag_snippet.proto\x1a\x36google/ads/googleads/v25/enums/attribution_model.proto\x1a?google/ads/googleads/v25/enums/conversion_action_category.proto\x1a\x44google/ads/googleads/v25/enums/conversion_action_counting_type.proto\x1a=google/ads/googleads/v25/enums/conversion_action_status.proto\x1a;google/ads/googleads/v25/enums/conversion_action_type.proto\x1a\x36google/ads/googleads/v25/enums/conversion_origin.proto\x1a=google/ads/googleads/v25/enums/data_driven_model_status.proto\x1a\x36google/ads/googleads/v25/enums/mobile_app_vendor.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\x93\x16\n\x10\x43onversionAction\x12H\n\rresource_name\x18\x01 \x01(\tB1\xe0\x41\x05\xfa\x41+\n)googleads.googleapis.com/ConversionAction\x12\x14\n\x02id\x18\x15 \x01(\x03\x42\x03\xe0\x41\x03H\x00\x88\x01\x01\x12\x11\n\x04name\x18\x16 \x01(\tH\x01\x88\x01\x01\x12\x61\n\x06status\x18\x04 \x01(\x0e\x32Q.google.ads.googleads.v25.enums.ConversionActionStatusEnum.ConversionActionStatus\x12`\n\x04type\x18\x05 \x01(\x0e\x32M.google.ads.googleads.v25.enums.ConversionActionTypeEnum.ConversionActionTypeB\x03\xe0\x41\x05\x12Z\n\x06origin\x18\x1e \x01(\x0e\x32\x45.google.ads.googleads.v25.enums.ConversionOriginEnum.ConversionOriginB\x03\xe0\x41\x03\x12\x1d\n\x10primary_for_goal\x18\x1f \x01(\x08H\x02\x88\x01\x01\x12g\n\x08\x63\x61tegory\x18\x06 \x01(\x0e\x32U.google.ads.googleads.v25.enums.ConversionActionCategoryEnum.ConversionActionCategory\x12\x46\n\x0eowner_customer\x18\x17 \x01(\tB)\xe0\x41\x03\xfa\x41#\n!googleads.googleapis.com/CustomerH\x03\x88\x01\x01\x12*\n\x1dinclude_in_conversions_metric\x18\x18 \x01(\x08H\x04\x88\x01\x01\x12/\n\"click_through_lookback_window_days\x18\x19 \x01(\x03H\x05\x88\x01\x01\x12.\n!view_through_lookback_window_days\x18\x1a \x01(\x03H\x06\x88\x01\x01\x12Z\n\x0evalue_settings\x18\x0b \x01(\x0b\x32\x42.google.ads.googleads.v25.resources.ConversionAction.ValueSettings\x12t\n\rcounting_type\x18\x0c \x01(\x0e\x32].google.ads.googleads.v25.enums.ConversionActionCountingTypeEnum.ConversionActionCountingType\x12q\n\x1a\x61ttribution_model_settings\x18\r \x01(\x0b\x32M.google.ads.googleads.v25.resources.ConversionAction.AttributionModelSettings\x12\x46\n\x0ctag_snippets\x18\x0e \x03(\x0b\x32+.google.ads.googleads.v25.common.TagSnippetB\x03\xe0\x41\x03\x12(\n\x1bphone_call_duration_seconds\x18\x1b \x01(\x03H\x07\x88\x01\x01\x12\x13\n\x06\x61pp_id\x18\x1c \x01(\tH\x08\x88\x01\x01\x12\x63\n\x11mobile_app_vendor\x18\x11 \x01(\x0e\x32\x43.google.ads.googleads.v25.enums.MobileAppVendorEnum.MobileAppVendorB\x03\xe0\x41\x03\x12\x65\n\x11\x66irebase_settings\x18\x12 \x01(\x0b\x32\x45.google.ads.googleads.v25.resources.ConversionAction.FirebaseSettingsB\x03\xe0\x41\x03\x12\x84\x01\n\"third_party_app_analytics_settings\x18\x13 \x01(\x0b\x32S.google.ads.googleads.v25.resources.ConversionAction.ThirdPartyAppAnalyticsSettingsB\x03\xe0\x41\x03\x12w\n\x1bgoogle_analytics_4_settings\x18\" \x01(\x0b\x32M.google.ads.googleads.v25.resources.ConversionAction.GoogleAnalytics4SettingsB\x03\xe0\x41\x03\x1a\xf4\x01\n\x18\x41ttributionModelSettings\x12`\n\x11\x61ttribution_model\x18\x01 \x01(\x0e\x32\x45.google.ads.googleads.v25.enums.AttributionModelEnum.AttributionModel\x12v\n\x18\x64\x61ta_driven_model_status\x18\x02 \x01(\x0e\x32O.google.ads.googleads.v25.enums.DataDrivenModelStatusEnum.DataDrivenModelStatusB\x03\xe0\x41\x03\x1a\xbf\x01\n\rValueSettings\x12\x1a\n\rdefault_value\x18\x04 \x01(\x01H\x00\x88\x01\x01\x12\"\n\x15\x64\x65\x66\x61ult_currency_code\x18\x05 \x01(\tH\x01\x88\x01\x01\x12%\n\x18\x61lways_use_default_value\x18\x06 \x01(\x08H\x02\x88\x01\x01\x42\x10\n\x0e_default_valueB\x18\n\x16_default_currency_codeB\x1b\n\x19_always_use_default_value\x1ai\n\x1eThirdPartyAppAnalyticsSettings\x12\x1c\n\nevent_name\x18\x02 \x01(\tB\x03\xe0\x41\x03H\x00\x88\x01\x01\x12\x1a\n\rprovider_name\x18\x03 \x01(\tB\x03\xe0\x41\x03\x42\r\n\x0b_event_name\x1a\xa2\x01\n\x10\x46irebaseSettings\x12\x1c\n\nevent_name\x18\x03 \x01(\tB\x03\xe0\x41\x03H\x00\x88\x01\x01\x12\x1c\n\nproject_id\x18\x04 \x01(\tB\x03\xe0\x41\x03H\x01\x88\x01\x01\x12\x18\n\x0bproperty_id\x18\x05 \x01(\x03\x42\x03\xe0\x41\x03\x12\x1a\n\rproperty_name\x18\x06 \x01(\tB\x03\xe0\x41\x03\x42\r\n\x0b_event_nameB\r\n\x0b_project_id\x1ai\n\x18GoogleAnalytics4Settings\x12\x17\n\nevent_name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x1a\n\rproperty_name\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x18\n\x0bproperty_id\x18\x03 \x01(\x03\x42\x03\xe0\x41\x03:p\xea\x41m\n)googleads.googleapis.com/ConversionAction\x12@customers/{customer_id}/conversionActions/{conversion_action_id}B\x05\n\x03_idB\x07\n\x05_nameB\x13\n\x11_primary_for_goalB\x11\n\x0f_owner_customerB \n\x1e_include_in_conversions_metricB%\n#_click_through_lookback_window_daysB$\n\"_view_through_lookback_window_daysB\x1e\n\x1c_phone_call_duration_secondsB\t\n\x07_app_idB\x87\x02\n&com.google.ads.googleads.v25.resourcesB\x15\x43onversionActionProtoP\x01ZKgoogle.golang.org/genproto/googleapis/ads/googleads/v25/resources;resources\xa2\x02\x03GAA\xaa\x02\"Google.Ads.GoogleAds.V25.Resources\xca\x02\"Google\\Ads\\GoogleAds\\V25\\Resources\xea\x02&Google::Ads::GoogleAds::V25::Resourcesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Resources + ConversionAction = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.ConversionAction").msgclass + ConversionAction::AttributionModelSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.ConversionAction.AttributionModelSettings").msgclass + ConversionAction::ValueSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.ConversionAction.ValueSettings").msgclass + ConversionAction::ThirdPartyAppAnalyticsSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.ConversionAction.ThirdPartyAppAnalyticsSettings").msgclass + ConversionAction::FirebaseSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.ConversionAction.FirebaseSettings").msgclass + ConversionAction::GoogleAnalytics4Settings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.ConversionAction.GoogleAnalytics4Settings").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/resources/conversion_custom_variable_pb.rb b/lib/google/ads/google_ads/v25/resources/conversion_custom_variable_pb.rb new file mode 100644 index 000000000..634a7939c --- /dev/null +++ b/lib/google/ads/google_ads/v25/resources/conversion_custom_variable_pb.rb @@ -0,0 +1,27 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/resources/conversion_custom_variable.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/enums/conversion_custom_variable_status_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' + + +descriptor_data = "\nCgoogle/ads/googleads/v25/resources/conversion_custom_variable.proto\x12\"google.ads.googleads.v25.resources\x1a\x46google/ads/googleads/v25/enums/conversion_custom_variable_status.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\xe8\x03\n\x18\x43onversionCustomVariable\x12P\n\rresource_name\x18\x01 \x01(\tB9\xe0\x41\x05\xfa\x41\x33\n1googleads.googleapis.com/ConversionCustomVariable\x12\x0f\n\x02id\x18\x02 \x01(\x03\x42\x03\xe0\x41\x03\x12\x11\n\x04name\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x13\n\x03tag\x18\x04 \x01(\tB\x06\xe0\x41\x02\xe0\x41\x05\x12q\n\x06status\x18\x05 \x01(\x0e\x32\x61.google.ads.googleads.v25.enums.ConversionCustomVariableStatusEnum.ConversionCustomVariableStatus\x12\x41\n\x0eowner_customer\x18\x06 \x01(\tB)\xe0\x41\x03\xfa\x41#\n!googleads.googleapis.com/Customer:\x8a\x01\xea\x41\x86\x01\n1googleads.googleapis.com/ConversionCustomVariable\x12Qcustomers/{customer_id}/conversionCustomVariables/{conversion_custom_variable_id}B\x8f\x02\n&com.google.ads.googleads.v25.resourcesB\x1d\x43onversionCustomVariableProtoP\x01ZKgoogle.golang.org/genproto/googleapis/ads/googleads/v25/resources;resources\xa2\x02\x03GAA\xaa\x02\"Google.Ads.GoogleAds.V25.Resources\xca\x02\"Google\\Ads\\GoogleAds\\V25\\Resources\xea\x02&Google::Ads::GoogleAds::V25::Resourcesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Resources + ConversionCustomVariable = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.ConversionCustomVariable").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/resources/conversion_goal_campaign_config_pb.rb b/lib/google/ads/google_ads/v25/resources/conversion_goal_campaign_config_pb.rb new file mode 100644 index 000000000..ac18780c7 --- /dev/null +++ b/lib/google/ads/google_ads/v25/resources/conversion_goal_campaign_config_pb.rb @@ -0,0 +1,27 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/resources/conversion_goal_campaign_config.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/enums/goal_config_level_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' + + +descriptor_data = "\nHgoogle/ads/googleads/v25/resources/conversion_goal_campaign_config.proto\x12\"google.ads.googleads.v25.resources\x1a\x36google/ads/googleads/v25/enums/goal_config_level.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\xe6\x03\n\x1c\x43onversionGoalCampaignConfig\x12T\n\rresource_name\x18\x01 \x01(\tB=\xe0\x41\x05\xfa\x41\x37\n5googleads.googleapis.com/ConversionGoalCampaignConfig\x12;\n\x08\x63\x61mpaign\x18\x02 \x01(\tB)\xe0\x41\x05\xfa\x41#\n!googleads.googleapis.com/Campaign\x12^\n\x11goal_config_level\x18\x03 \x01(\x0e\x32\x43.google.ads.googleads.v25.enums.GoalConfigLevelEnum.GoalConfigLevel\x12R\n\x16\x63ustom_conversion_goal\x18\x04 \x01(\tB2\xfa\x41/\n-googleads.googleapis.com/CustomConversionGoal:\x7f\xea\x41|\n5googleads.googleapis.com/ConversionGoalCampaignConfig\x12\x43\x63ustomers/{customer_id}/conversionGoalCampaignConfigs/{campaign_id}B\x93\x02\n&com.google.ads.googleads.v25.resourcesB!ConversionGoalCampaignConfigProtoP\x01ZKgoogle.golang.org/genproto/googleapis/ads/googleads/v25/resources;resources\xa2\x02\x03GAA\xaa\x02\"Google.Ads.GoogleAds.V25.Resources\xca\x02\"Google\\Ads\\GoogleAds\\V25\\Resources\xea\x02&Google::Ads::GoogleAds::V25::Resourcesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Resources + ConversionGoalCampaignConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.ConversionGoalCampaignConfig").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/resources/conversion_value_rule_pb.rb b/lib/google/ads/google_ads/v25/resources/conversion_value_rule_pb.rb new file mode 100644 index 000000000..53d78a59b --- /dev/null +++ b/lib/google/ads/google_ads/v25/resources/conversion_value_rule_pb.rb @@ -0,0 +1,38 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/resources/conversion_value_rule.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/enums/conversion_value_rule_status_pb' +require 'google/ads/google_ads/v25/enums/value_rule_device_type_pb' +require 'google/ads/google_ads/v25/enums/value_rule_geo_location_match_type_pb' +require 'google/ads/google_ads/v25/enums/value_rule_operation_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' + + +descriptor_data = "\n>google/ads/googleads/v25/resources/conversion_value_rule.proto\x12\"google.ads.googleads.v25.resources\x1a\x41google/ads/googleads/v25/enums/conversion_value_rule_status.proto\x1a;google/ads/googleads/v25/enums/value_rule_device_type.proto\x1aGgoogle/ads/googleads/v25/enums/value_rule_geo_location_match_type.proto\x1a\x39google/ads/googleads/v25/enums/value_rule_operation.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\xf8\x13\n\x13\x43onversionValueRule\x12K\n\rresource_name\x18\x01 \x01(\tB4\xe0\x41\x05\xfa\x41.\n,googleads.googleapis.com/ConversionValueRule\x12\x0f\n\x02id\x18\x02 \x01(\x03\x42\x03\xe0\x41\x03\x12W\n\x06\x61\x63tion\x18\x03 \x01(\x0b\x32G.google.ads.googleads.v25.resources.ConversionValueRule.ValueRuleAction\x12u\n\x16geo_location_condition\x18\x04 \x01(\x0b\x32U.google.ads.googleads.v25.resources.ConversionValueRule.ValueRuleGeoLocationCondition\x12j\n\x10\x64\x65vice_condition\x18\x05 \x01(\x0b\x32P.google.ads.googleads.v25.resources.ConversionValueRule.ValueRuleDeviceCondition\x12n\n\x12\x61udience_condition\x18\x06 \x01(\x0b\x32R.google.ads.googleads.v25.resources.ConversionValueRule.ValueRuleAudienceCondition\x12p\n\x13itinerary_condition\x18\t \x01(\x0b\x32S.google.ads.googleads.v25.resources.ConversionValueRule.ValueRuleItineraryCondition\x12\x41\n\x0eowner_customer\x18\x07 \x01(\tB)\xe0\x41\x03\xfa\x41#\n!googleads.googleapis.com/Customer\x12g\n\x06status\x18\x08 \x01(\x0e\x32W.google.ads.googleads.v25.enums.ConversionValueRuleStatusEnum.ConversionValueRuleStatus\x1a~\n\x0fValueRuleAction\x12\\\n\toperation\x18\x01 \x01(\x0e\x32I.google.ads.googleads.v25.enums.ValueRuleOperationEnum.ValueRuleOperation\x12\r\n\x05value\x18\x02 \x01(\x01\x1a\xc2\x03\n\x1dValueRuleGeoLocationCondition\x12V\n\x1d\x65xcluded_geo_target_constants\x18\x01 \x03(\tB/\xfa\x41,\n*googleads.googleapis.com/GeoTargetConstant\x12\x80\x01\n\x17\x65xcluded_geo_match_type\x18\x02 \x01(\x0e\x32_.google.ads.googleads.v25.enums.ValueRuleGeoLocationMatchTypeEnum.ValueRuleGeoLocationMatchType\x12M\n\x14geo_target_constants\x18\x03 \x03(\tB/\xfa\x41,\n*googleads.googleapis.com/GeoTargetConstant\x12w\n\x0egeo_match_type\x18\x04 \x01(\x0e\x32_.google.ads.googleads.v25.enums.ValueRuleGeoLocationMatchTypeEnum.ValueRuleGeoLocationMatchType\x1a}\n\x18ValueRuleDeviceCondition\x12\x61\n\x0c\x64\x65vice_types\x18\x01 \x03(\x0e\x32K.google.ads.googleads.v25.enums.ValueRuleDeviceTypeEnum.ValueRuleDeviceType\x1a\x9c\x01\n\x1aValueRuleAudienceCondition\x12:\n\nuser_lists\x18\x01 \x03(\tB&\xfa\x41#\n!googleads.googleapis.com/UserList\x12\x42\n\x0euser_interests\x18\x02 \x03(\tB*\xfa\x41\'\n%googleads.googleapis.com/UserInterest\x1a\x80\x03\n\x1bValueRuleItineraryCondition\x12~\n\x16\x61\x64vance_booking_window\x18\x01 \x01(\x0b\x32^.google.ads.googleads.v25.resources.ConversionValueRule.ValueRuleItineraryAdvanceBookingWindow\x12m\n\rtravel_length\x18\x02 \x01(\x0b\x32V.google.ads.googleads.v25.resources.ConversionValueRule.ValueRuleItineraryTravelLength\x12r\n\x10travel_start_day\x18\x03 \x01(\x0b\x32X.google.ads.googleads.v25.resources.ConversionValueRule.ValueRuleItineraryTravelStartDay\x1ap\n&ValueRuleItineraryAdvanceBookingWindow\x12\x15\n\x08min_days\x18\x03 \x01(\x05H\x00\x88\x01\x01\x12\x15\n\x08max_days\x18\x04 \x01(\x05H\x01\x88\x01\x01\x42\x0b\n\t_min_daysB\x0b\n\t_max_days\x1aH\n\x1eValueRuleItineraryTravelLength\x12\x12\n\nmin_nights\x18\x01 \x01(\x05\x12\x12\n\nmax_nights\x18\x02 \x01(\x05\x1a\x9a\x01\n ValueRuleItineraryTravelStartDay\x12\x0e\n\x06monday\x18\x01 \x01(\x08\x12\x0f\n\x07tuesday\x18\x02 \x01(\x08\x12\x11\n\twednesday\x18\x03 \x01(\x08\x12\x10\n\x08thursday\x18\x04 \x01(\x08\x12\x0e\n\x06\x66riday\x18\x05 \x01(\x08\x12\x10\n\x08saturday\x18\x06 \x01(\x08\x12\x0e\n\x06sunday\x18\x07 \x01(\x08:z\xea\x41w\n,googleads.googleapis.com/ConversionValueRule\x12Gcustomers/{customer_id}/conversionValueRules/{conversion_value_rule_id}B\x8a\x02\n&com.google.ads.googleads.v25.resourcesB\x18\x43onversionValueRuleProtoP\x01ZKgoogle.golang.org/genproto/googleapis/ads/googleads/v25/resources;resources\xa2\x02\x03GAA\xaa\x02\"Google.Ads.GoogleAds.V25.Resources\xca\x02\"Google\\Ads\\GoogleAds\\V25\\Resources\xea\x02&Google::Ads::GoogleAds::V25::Resourcesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Resources + ConversionValueRule = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.ConversionValueRule").msgclass + ConversionValueRule::ValueRuleAction = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.ConversionValueRule.ValueRuleAction").msgclass + ConversionValueRule::ValueRuleGeoLocationCondition = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.ConversionValueRule.ValueRuleGeoLocationCondition").msgclass + ConversionValueRule::ValueRuleDeviceCondition = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.ConversionValueRule.ValueRuleDeviceCondition").msgclass + ConversionValueRule::ValueRuleAudienceCondition = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.ConversionValueRule.ValueRuleAudienceCondition").msgclass + ConversionValueRule::ValueRuleItineraryCondition = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.ConversionValueRule.ValueRuleItineraryCondition").msgclass + ConversionValueRule::ValueRuleItineraryAdvanceBookingWindow = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.ConversionValueRule.ValueRuleItineraryAdvanceBookingWindow").msgclass + ConversionValueRule::ValueRuleItineraryTravelLength = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.ConversionValueRule.ValueRuleItineraryTravelLength").msgclass + ConversionValueRule::ValueRuleItineraryTravelStartDay = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.ConversionValueRule.ValueRuleItineraryTravelStartDay").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/resources/conversion_value_rule_set_pb.rb b/lib/google/ads/google_ads/v25/resources/conversion_value_rule_set_pb.rb new file mode 100644 index 000000000..f073f84ff --- /dev/null +++ b/lib/google/ads/google_ads/v25/resources/conversion_value_rule_set_pb.rb @@ -0,0 +1,30 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/resources/conversion_value_rule_set.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/enums/conversion_action_category_pb' +require 'google/ads/google_ads/v25/enums/conversion_value_rule_set_status_pb' +require 'google/ads/google_ads/v25/enums/value_rule_set_attachment_type_pb' +require 'google/ads/google_ads/v25/enums/value_rule_set_dimension_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' + + +descriptor_data = "\nBgoogle/ads/googleads/v25/resources/conversion_value_rule_set.proto\x12\"google.ads.googleads.v25.resources\x1a?google/ads/googleads/v25/enums/conversion_action_category.proto\x1a\x45google/ads/googleads/v25/enums/conversion_value_rule_set_status.proto\x1a\x43google/ads/googleads/v25/enums/value_rule_set_attachment_type.proto\x1a=google/ads/googleads/v25/enums/value_rule_set_dimension.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\xa6\x07\n\x16\x43onversionValueRuleSet\x12N\n\rresource_name\x18\x01 \x01(\tB7\xe0\x41\x05\xfa\x41\x31\n/googleads.googleapis.com/ConversionValueRuleSet\x12\x0f\n\x02id\x18\x02 \x01(\x03\x42\x03\xe0\x41\x03\x12Q\n\x16\x63onversion_value_rules\x18\x03 \x03(\tB1\xfa\x41.\n,googleads.googleapis.com/ConversionValueRule\x12\x63\n\ndimensions\x18\x04 \x03(\x0e\x32O.google.ads.googleads.v25.enums.ValueRuleSetDimensionEnum.ValueRuleSetDimension\x12\x41\n\x0eowner_customer\x18\x05 \x01(\tB)\xe0\x41\x03\xfa\x41#\n!googleads.googleapis.com/Customer\x12w\n\x0f\x61ttachment_type\x18\x06 \x01(\x0e\x32Y.google.ads.googleads.v25.enums.ValueRuleSetAttachmentTypeEnum.ValueRuleSetAttachmentTypeB\x03\xe0\x41\x05\x12\x38\n\x08\x63\x61mpaign\x18\x07 \x01(\tB&\xfa\x41#\n!googleads.googleapis.com/Campaign\x12r\n\x06status\x18\x08 \x01(\x0e\x32].google.ads.googleads.v25.enums.ConversionValueRuleSetStatusEnum.ConversionValueRuleSetStatusB\x03\xe0\x41\x03\x12\x80\x01\n\x1c\x63onversion_action_categories\x18\t \x03(\x0e\x32U.google.ads.googleads.v25.enums.ConversionActionCategoryEnum.ConversionActionCategoryB\x03\xe0\x41\x05:\x85\x01\xea\x41\x81\x01\n/googleads.googleapis.com/ConversionValueRuleSet\x12Ncustomers/{customer_id}/conversionValueRuleSets/{conversion_value_rule_set_id}B\x8d\x02\n&com.google.ads.googleads.v25.resourcesB\x1b\x43onversionValueRuleSetProtoP\x01ZKgoogle.golang.org/genproto/googleapis/ads/googleads/v25/resources;resources\xa2\x02\x03GAA\xaa\x02\"Google.Ads.GoogleAds.V25.Resources\xca\x02\"Google\\Ads\\GoogleAds\\V25\\Resources\xea\x02&Google::Ads::GoogleAds::V25::Resourcesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Resources + ConversionValueRuleSet = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.ConversionValueRuleSet").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/resources/currency_constant_pb.rb b/lib/google/ads/google_ads/v25/resources/currency_constant_pb.rb new file mode 100644 index 000000000..3f76ebd02 --- /dev/null +++ b/lib/google/ads/google_ads/v25/resources/currency_constant_pb.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/resources/currency_constant.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' + + +descriptor_data = "\n:google/ads/googleads/v25/resources/currency_constant.proto\x12\"google.ads.googleads.v25.resources\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\xce\x02\n\x10\x43urrencyConstant\x12H\n\rresource_name\x18\x01 \x01(\tB1\xe0\x41\x03\xfa\x41+\n)googleads.googleapis.com/CurrencyConstant\x12\x16\n\x04\x63ode\x18\x06 \x01(\tB\x03\xe0\x41\x03H\x00\x88\x01\x01\x12\x16\n\x04name\x18\x07 \x01(\tB\x03\xe0\x41\x03H\x01\x88\x01\x01\x12\x18\n\x06symbol\x18\x08 \x01(\tB\x03\xe0\x41\x03H\x02\x88\x01\x01\x12&\n\x14\x62illable_unit_micros\x18\t \x01(\x03\x42\x03\xe0\x41\x03H\x03\x88\x01\x01:H\xea\x41\x45\n)googleads.googleapis.com/CurrencyConstant\x12\x18\x63urrencyConstants/{code}B\x07\n\x05_codeB\x07\n\x05_nameB\t\n\x07_symbolB\x17\n\x15_billable_unit_microsB\x87\x02\n&com.google.ads.googleads.v25.resourcesB\x15\x43urrencyConstantProtoP\x01ZKgoogle.golang.org/genproto/googleapis/ads/googleads/v25/resources;resources\xa2\x02\x03GAA\xaa\x02\"Google.Ads.GoogleAds.V25.Resources\xca\x02\"Google\\Ads\\GoogleAds\\V25\\Resources\xea\x02&Google::Ads::GoogleAds::V25::Resourcesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Resources + CurrencyConstant = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.CurrencyConstant").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/resources/custom_audience_pb.rb b/lib/google/ads/google_ads/v25/resources/custom_audience_pb.rb new file mode 100644 index 000000000..be33eb9d7 --- /dev/null +++ b/lib/google/ads/google_ads/v25/resources/custom_audience_pb.rb @@ -0,0 +1,30 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/resources/custom_audience.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/enums/custom_audience_member_type_pb' +require 'google/ads/google_ads/v25/enums/custom_audience_status_pb' +require 'google/ads/google_ads/v25/enums/custom_audience_type_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' + + +descriptor_data = "\n8google/ads/googleads/v25/resources/custom_audience.proto\x12\"google.ads.googleads.v25.resources\x1a@google/ads/googleads/v25/enums/custom_audience_member_type.proto\x1a;google/ads/googleads/v25/enums/custom_audience_status.proto\x1a\x39google/ads/googleads/v25/enums/custom_audience_type.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\x80\x04\n\x0e\x43ustomAudience\x12\x46\n\rresource_name\x18\x01 \x01(\tB/\xe0\x41\x05\xfa\x41)\n\'googleads.googleapis.com/CustomAudience\x12\x0f\n\x02id\x18\x02 \x01(\x03\x42\x03\xe0\x41\x03\x12\x62\n\x06status\x18\x03 \x01(\x0e\x32M.google.ads.googleads.v25.enums.CustomAudienceStatusEnum.CustomAudienceStatusB\x03\xe0\x41\x03\x12\x0c\n\x04name\x18\x04 \x01(\t\x12W\n\x04type\x18\x05 \x01(\x0e\x32I.google.ads.googleads.v25.enums.CustomAudienceTypeEnum.CustomAudienceType\x12\x13\n\x0b\x64\x65scription\x18\x06 \x01(\t\x12I\n\x07members\x18\x07 \x03(\x0b\x32\x38.google.ads.googleads.v25.resources.CustomAudienceMember:j\xea\x41g\n\'googleads.googleapis.com/CustomAudience\x12google/ads/googleads/v25/enums/asset_link_primary_status.proto\x1a\x45google/ads/googleads/v25/enums/asset_link_primary_status_reason.proto\x1a\x36google/ads/googleads/v25/enums/asset_link_status.proto\x1a\x31google/ads/googleads/v25/enums/asset_source.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\xdd\x06\n\rCustomerAsset\x12\x45\n\rresource_name\x18\x01 \x01(\tB.\xe0\x41\x05\xfa\x41(\n&googleads.googleapis.com/CustomerAsset\x12\x38\n\x05\x61sset\x18\x02 \x01(\tB)\xe0\x41\x02\xe0\x41\x05\xfa\x41 \n\x1egoogleads.googleapis.com/Asset\x12]\n\nfield_type\x18\x03 \x01(\x0e\x32\x41.google.ads.googleads.v25.enums.AssetFieldTypeEnum.AssetFieldTypeB\x06\xe0\x41\x02\xe0\x41\x05\x12P\n\x06source\x18\x05 \x01(\x0e\x32;.google.ads.googleads.v25.enums.AssetSourceEnum.AssetSourceB\x03\xe0\x41\x03\x12S\n\x06status\x18\x04 \x01(\x0e\x32\x43.google.ads.googleads.v25.enums.AssetLinkStatusEnum.AssetLinkStatus\x12n\n\x0eprimary_status\x18\x06 \x01(\x0e\x32Q.google.ads.googleads.v25.enums.AssetLinkPrimaryStatusEnum.AssetLinkPrimaryStatusB\x03\xe0\x41\x03\x12\x63\n\x16primary_status_details\x18\x07 \x03(\x0b\x32>.google.ads.googleads.v25.common.AssetLinkPrimaryStatusDetailsB\x03\xe0\x41\x03\x12\x82\x01\n\x16primary_status_reasons\x18\x08 \x03(\x0e\x32].google.ads.googleads.v25.enums.AssetLinkPrimaryStatusReasonEnum.AssetLinkPrimaryStatusReasonB\x03\xe0\x41\x03:k\xea\x41h\n&googleads.googleapis.com/CustomerAsset\x12>customers/{customer_id}/customerAssets/{asset_id}~{field_type}B\x84\x02\n&com.google.ads.googleads.v25.resourcesB\x12\x43ustomerAssetProtoP\x01ZKgoogle.golang.org/genproto/googleapis/ads/googleads/v25/resources;resources\xa2\x02\x03GAA\xaa\x02\"Google.Ads.GoogleAds.V25.Resources\xca\x02\"Google\\Ads\\GoogleAds\\V25\\Resources\xea\x02&Google::Ads::GoogleAds::V25::Resourcesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Resources + CustomerAsset = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.CustomerAsset").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/resources/customer_asset_set_pb.rb b/lib/google/ads/google_ads/v25/resources/customer_asset_set_pb.rb new file mode 100644 index 000000000..1b9153da5 --- /dev/null +++ b/lib/google/ads/google_ads/v25/resources/customer_asset_set_pb.rb @@ -0,0 +1,27 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/resources/customer_asset_set.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/enums/asset_set_link_status_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' + + +descriptor_data = "\n;google/ads/googleads/v25/resources/customer_asset_set.proto\x12\"google.ads.googleads.v25.resources\x1a:google/ads/googleads/v25/enums/asset_set_link_status.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\xa1\x03\n\x10\x43ustomerAssetSet\x12H\n\rresource_name\x18\x01 \x01(\tB1\xe0\x41\x05\xfa\x41+\n)googleads.googleapis.com/CustomerAssetSet\x12<\n\tasset_set\x18\x02 \x01(\tB)\xe0\x41\x05\xfa\x41#\n!googleads.googleapis.com/AssetSet\x12;\n\x08\x63ustomer\x18\x03 \x01(\tB)\xe0\x41\x05\xfa\x41#\n!googleads.googleapis.com/Customer\x12^\n\x06status\x18\x04 \x01(\x0e\x32I.google.ads.googleads.v25.enums.AssetSetLinkStatusEnum.AssetSetLinkStatusB\x03\xe0\x41\x03:h\xea\x41\x65\n)googleads.googleapis.com/CustomerAssetSet\x12\x38\x63ustomers/{customer_id}/customerAssetSets/{asset_set_id}B\x87\x02\n&com.google.ads.googleads.v25.resourcesB\x15\x43ustomerAssetSetProtoP\x01ZKgoogle.golang.org/genproto/googleapis/ads/googleads/v25/resources;resources\xa2\x02\x03GAA\xaa\x02\"Google.Ads.GoogleAds.V25.Resources\xca\x02\"Google\\Ads\\GoogleAds\\V25\\Resources\xea\x02&Google::Ads::GoogleAds::V25::Resourcesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Resources + CustomerAssetSet = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.CustomerAssetSet").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/resources/customer_client_link_pb.rb b/lib/google/ads/google_ads/v25/resources/customer_client_link_pb.rb new file mode 100644 index 000000000..6f2f2c2a2 --- /dev/null +++ b/lib/google/ads/google_ads/v25/resources/customer_client_link_pb.rb @@ -0,0 +1,27 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/resources/customer_client_link.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/enums/manager_link_status_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' + + +descriptor_data = "\n=google/ads/googleads/v25/resources/customer_client_link.proto\x12\"google.ads.googleads.v25.resources\x1a\x38google/ads/googleads/v25/enums/manager_link_status.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\xf5\x03\n\x12\x43ustomerClientLink\x12J\n\rresource_name\x18\x01 \x01(\tB3\xe0\x41\x05\xfa\x41-\n+googleads.googleapis.com/CustomerClientLink\x12G\n\x0f\x63lient_customer\x18\x07 \x01(\tB)\xe0\x41\x05\xfa\x41#\n!googleads.googleapis.com/CustomerH\x00\x88\x01\x01\x12!\n\x0fmanager_link_id\x18\x08 \x01(\x03\x42\x03\xe0\x41\x03H\x01\x88\x01\x01\x12W\n\x06status\x18\x05 \x01(\x0e\x32G.google.ads.googleads.v25.enums.ManagerLinkStatusEnum.ManagerLinkStatus\x12\x13\n\x06hidden\x18\t \x01(\x08H\x02\x88\x01\x01:\x85\x01\xea\x41\x81\x01\n+googleads.googleapis.com/CustomerClientLink\x12Rcustomers/{customer_id}/customerClientLinks/{client_customer_id}~{manager_link_id}B\x12\n\x10_client_customerB\x12\n\x10_manager_link_idB\t\n\x07_hiddenB\x89\x02\n&com.google.ads.googleads.v25.resourcesB\x17\x43ustomerClientLinkProtoP\x01ZKgoogle.golang.org/genproto/googleapis/ads/googleads/v25/resources;resources\xa2\x02\x03GAA\xaa\x02\"Google.Ads.GoogleAds.V25.Resources\xca\x02\"Google\\Ads\\GoogleAds\\V25\\Resources\xea\x02&Google::Ads::GoogleAds::V25::Resourcesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Resources + CustomerClientLink = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.CustomerClientLink").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/resources/customer_client_pb.rb b/lib/google/ads/google_ads/v25/resources/customer_client_pb.rb new file mode 100644 index 000000000..81e0e71af --- /dev/null +++ b/lib/google/ads/google_ads/v25/resources/customer_client_pb.rb @@ -0,0 +1,27 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/resources/customer_client.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/enums/customer_status_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' + + +descriptor_data = "\n8google/ads/googleads/v25/resources/customer_client.proto\x12\"google.ads.googleads.v25.resources\x1a\x34google/ads/googleads/v25/enums/customer_status.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\x8d\x06\n\x0e\x43ustomerClient\x12\x46\n\rresource_name\x18\x01 \x01(\tB/\xe0\x41\x03\xfa\x41)\n\'googleads.googleapis.com/CustomerClient\x12G\n\x0f\x63lient_customer\x18\x0c \x01(\tB)\xe0\x41\x03\xfa\x41#\n!googleads.googleapis.com/CustomerH\x00\x88\x01\x01\x12\x18\n\x06hidden\x18\r \x01(\x08\x42\x03\xe0\x41\x03H\x01\x88\x01\x01\x12\x17\n\x05level\x18\x0e \x01(\x03\x42\x03\xe0\x41\x03H\x02\x88\x01\x01\x12\x1b\n\ttime_zone\x18\x0f \x01(\tB\x03\xe0\x41\x03H\x03\x88\x01\x01\x12\x1e\n\x0ctest_account\x18\x10 \x01(\x08\x42\x03\xe0\x41\x03H\x04\x88\x01\x01\x12\x19\n\x07manager\x18\x11 \x01(\x08\x42\x03\xe0\x41\x03H\x05\x88\x01\x01\x12\"\n\x10\x64\x65scriptive_name\x18\x12 \x01(\tB\x03\xe0\x41\x03H\x06\x88\x01\x01\x12\x1f\n\rcurrency_code\x18\x13 \x01(\tB\x03\xe0\x41\x03H\x07\x88\x01\x01\x12\x14\n\x02id\x18\x14 \x01(\x03\x42\x03\xe0\x41\x03H\x08\x88\x01\x01\x12>\n\x0e\x61pplied_labels\x18\x15 \x03(\tB&\xe0\x41\x03\xfa\x41 \n\x1egoogleads.googleapis.com/Label\x12V\n\x06status\x18\x16 \x01(\x0e\x32\x41.google.ads.googleads.v25.enums.CustomerStatusEnum.CustomerStatusB\x03\xe0\x41\x03:j\xea\x41g\n\'googleads.googleapis.com/CustomerClient\x12\n,location_asset_auto_migration_done_date_time\x18( \x01(\tB\x03\xe0\x41\x03H\r\x88\x01\x01\x12;\n)image_asset_auto_migration_done_date_time\x18) \x01(\tB\x03\xe0\x41\x03H\x0e\x88\x01\x01\x12\x65\n\x1a\x63ustomer_agreement_setting\x18, \x01(\x0b\x32<.google.ads.googleads.v25.resources.CustomerAgreementSettingB\x03\xe0\x41\x03\x12_\n\x17local_services_settings\x18- \x01(\x0b\x32\x39.google.ads.googleads.v25.resources.LocalServicesSettingsB\x03\xe0\x41\x03\x12y\n\x1evideo_brand_safety_suitability\x18. \x01(\x0e\x32Q.google.ads.googleads.v25.enums.BrandSafetySuitabilityEnum.BrandSafetySuitability\x12I\n\x0evideo_customer\x18\x36 \x01(\x0b\x32\x31.google.ads.googleads.v25.resources.VideoCustomer\x12\x8d\x01\n!contains_eu_political_advertising\x18\x37 \x01(\x0e\x32].google.ads.googleads.v25.enums.EuPoliticalAdvertisingStatusEnum.EuPoliticalAdvertisingStatusB\x03\xe0\x41\x03:?\xea\x41<\n!googleads.googleapis.com/Customer\x12\x17\x63ustomers/{customer_id}B\x05\n\x03_idB\x13\n\x11_descriptive_nameB\x10\n\x0e_currency_codeB\x0c\n\n_time_zoneB\x18\n\x16_tracking_url_templateB\x13\n\x11_final_url_suffixB\x17\n\x15_auto_tagging_enabledB\x15\n\x13_has_partners_badgeB\n\n\x08_managerB\x0f\n\r_test_accountB\x15\n\x13_optimization_scoreB%\n#_location_asset_auto_migration_doneB\"\n _image_asset_auto_migration_doneB/\n-_location_asset_auto_migration_done_date_timeB,\n*_image_asset_auto_migration_done_date_time\"\x9c\x02\n\x14\x43\x61llReportingSetting\x12#\n\x16\x63\x61ll_reporting_enabled\x18\n \x01(\x08H\x00\x88\x01\x01\x12.\n!call_conversion_reporting_enabled\x18\x0b \x01(\x08H\x01\x88\x01\x01\x12S\n\x16\x63\x61ll_conversion_action\x18\x0c \x01(\tB.\xfa\x41+\n)googleads.googleapis.com/ConversionActionH\x02\x88\x01\x01\x42\x19\n\x17_call_reporting_enabledB$\n\"_call_conversion_reporting_enabledB\x19\n\x17_call_conversion_action\"\xc9\x03\n\x19\x43onversionTrackingSetting\x12(\n\x16\x63onversion_tracking_id\x18\x03 \x01(\x03\x42\x03\xe0\x41\x03H\x00\x88\x01\x01\x12\x36\n$cross_account_conversion_tracking_id\x18\x04 \x01(\x03\x42\x03\xe0\x41\x03H\x01\x88\x01\x01\x12)\n\x1c\x61\x63\x63\x65pted_customer_data_terms\x18\x05 \x01(\x08\x42\x03\xe0\x41\x03\x12~\n\x1a\x63onversion_tracking_status\x18\x06 \x01(\x0e\x32U.google.ads.googleads.v25.enums.ConversionTrackingStatusEnum.ConversionTrackingStatusB\x03\xe0\x41\x03\x12\x33\n&enhanced_conversions_for_leads_enabled\x18\x07 \x01(\x08\x42\x03\xe0\x41\x03\x12&\n\x1egoogle_ads_conversion_customer\x18\x08 \x01(\tB\x19\n\x17_conversion_tracking_idB\'\n%_cross_account_conversion_tracking_id\"Y\n\x12RemarketingSetting\x12(\n\x16google_global_site_tag\x18\x02 \x01(\tB\x03\xe0\x41\x03H\x00\x88\x01\x01\x42\x19\n\x17_google_global_site_tag\"A\n\x18\x43ustomerAgreementSetting\x12%\n\x18\x61\x63\x63\x65pted_lead_form_terms\x18\x01 \x01(\x08\x42\x03\xe0\x41\x03\"\xe1\x01\n\x15LocalServicesSettings\x12\x61\n\x19granular_license_statuses\x18\x01 \x03(\x0b\x32\x39.google.ads.googleads.v25.resources.GranularLicenseStatusB\x03\xe0\x41\x03\x12\x65\n\x1bgranular_insurance_statuses\x18\x02 \x03(\x0b\x32;.google.ads.googleads.v25.resources.GranularInsuranceStatusB\x03\xe0\x41\x03\"\xa4\x02\n\x15GranularLicenseStatus\x12\"\n\x10geo_criterion_id\x18\x01 \x01(\x03\x42\x03\xe0\x41\x03H\x00\x88\x01\x01\x12\x1d\n\x0b\x63\x61tegory_id\x18\x02 \x01(\tB\x03\xe0\x41\x03H\x01\x88\x01\x01\x12\x8a\x01\n\x13verification_status\x18\x03 \x01(\x0e\x32\x63.google.ads.googleads.v25.enums.LocalServicesVerificationStatusEnum.LocalServicesVerificationStatusB\x03\xe0\x41\x03H\x02\x88\x01\x01\x42\x13\n\x11_geo_criterion_idB\x0e\n\x0c_category_idB\x16\n\x14_verification_status\"\xa6\x02\n\x17GranularInsuranceStatus\x12\"\n\x10geo_criterion_id\x18\x01 \x01(\x03\x42\x03\xe0\x41\x03H\x00\x88\x01\x01\x12\x1d\n\x0b\x63\x61tegory_id\x18\x02 \x01(\tB\x03\xe0\x41\x03H\x01\x88\x01\x01\x12\x8a\x01\n\x13verification_status\x18\x03 \x01(\x0e\x32\x63.google.ads.googleads.v25.enums.LocalServicesVerificationStatusEnum.LocalServicesVerificationStatusB\x03\xe0\x41\x03H\x02\x88\x01\x01\x42\x13\n\x11_geo_criterion_idB\x0e\n\x0c_category_idB\x16\n\x14_verification_status\"\x81\x01\n\rVideoCustomer\x12p\n third_party_integration_partners\x18\x01 \x01(\x0b\x32\x46.google.ads.googleads.v25.common.CustomerThirdPartyIntegrationPartnersB\xff\x01\n&com.google.ads.googleads.v25.resourcesB\rCustomerProtoP\x01ZKgoogle.golang.org/genproto/googleapis/ads/googleads/v25/resources;resources\xa2\x02\x03GAA\xaa\x02\"Google.Ads.GoogleAds.V25.Resources\xca\x02\"Google\\Ads\\GoogleAds\\V25\\Resources\xea\x02&Google::Ads::GoogleAds::V25::Resourcesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Resources + Customer = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.Customer").msgclass + CallReportingSetting = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.CallReportingSetting").msgclass + ConversionTrackingSetting = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.ConversionTrackingSetting").msgclass + RemarketingSetting = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.RemarketingSetting").msgclass + CustomerAgreementSetting = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.CustomerAgreementSetting").msgclass + LocalServicesSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.LocalServicesSettings").msgclass + GranularLicenseStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.GranularLicenseStatus").msgclass + GranularInsuranceStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.GranularInsuranceStatus").msgclass + VideoCustomer = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.VideoCustomer").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/resources/customer_search_term_insight_pb.rb b/lib/google/ads/google_ads/v25/resources/customer_search_term_insight_pb.rb new file mode 100644 index 000000000..3cbfa7227 --- /dev/null +++ b/lib/google/ads/google_ads/v25/resources/customer_search_term_insight_pb.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/resources/customer_search_term_insight.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' + + +descriptor_data = "\nEgoogle/ads/googleads/v25/resources/customer_search_term_insight.proto\x12\"google.ads.googleads.v25.resources\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\xba\x02\n\x19\x43ustomerSearchTermInsight\x12Q\n\rresource_name\x18\x01 \x01(\tB:\xe0\x41\x03\xfa\x41\x34\n2googleads.googleapis.com/CustomerSearchTermInsight\x12 \n\x0e\x63\x61tegory_label\x18\x02 \x01(\tB\x03\xe0\x41\x03H\x00\x88\x01\x01\x12\x14\n\x02id\x18\x03 \x01(\x03\x42\x03\xe0\x41\x03H\x01\x88\x01\x01:x\xea\x41u\n2googleads.googleapis.com/CustomerSearchTermInsight\x12?customers/{customer_id}/customerSearchTermInsights/{cluster_id}B\x11\n\x0f_category_labelB\x05\n\x03_idB\x90\x02\n&com.google.ads.googleads.v25.resourcesB\x1e\x43ustomerSearchTermInsightProtoP\x01ZKgoogle.golang.org/genproto/googleapis/ads/googleads/v25/resources;resources\xa2\x02\x03GAA\xaa\x02\"Google.Ads.GoogleAds.V25.Resources\xca\x02\"Google\\Ads\\GoogleAds\\V25\\Resources\xea\x02&Google::Ads::GoogleAds::V25::Resourcesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Resources + CustomerSearchTermInsight = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.CustomerSearchTermInsight").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/resources/customer_sk_ad_network_conversion_value_schema_pb.rb b/lib/google/ads/google_ads/v25/resources/customer_sk_ad_network_conversion_value_schema_pb.rb new file mode 100644 index 000000000..61d4f8d21 --- /dev/null +++ b/lib/google/ads/google_ads/v25/resources/customer_sk_ad_network_conversion_value_schema_pb.rb @@ -0,0 +1,35 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/resources/customer_sk_ad_network_conversion_value_schema.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/enums/sk_ad_network_coarse_conversion_value_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' + + +descriptor_data = "\nWgoogle/ads/googleads/v25/resources/customer_sk_ad_network_conversion_value_schema.proto\x12\"google.ads.googleads.v25.resources\x1aJgoogle/ads/googleads/v25/enums/sk_ad_network_coarse_conversion_value.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\xf9\x18\n(CustomerSkAdNetworkConversionValueSchema\x12`\n\rresource_name\x18\x01 \x01(\tBI\xe0\x41\x03\xfa\x41\x43\nAgoogleads.googleapis.com/CustomerSkAdNetworkConversionValueSchema\x12\x82\x01\n\x06schema\x18\x02 \x01(\x0b\x32m.google.ads.googleads.v25.resources.CustomerSkAdNetworkConversionValueSchema.SkAdNetworkConversionValueSchemaB\x03\xe0\x41\x03\x1a\xc6\x15\n SkAdNetworkConversionValueSchema\x12\x16\n\x06\x61pp_id\x18\x01 \x01(\tB\x06\xe0\x41\x02\xe0\x41\x03\x12%\n\x18measurement_window_hours\x18\x02 \x01(\x05\x42\x03\xe0\x41\x03\x12\xc6\x01\n&fine_grained_conversion_value_mappings\x18\x03 \x03(\x0b\x32\x90\x01.google.ads.googleads.v25.resources.CustomerSkAdNetworkConversionValueSchema.SkAdNetworkConversionValueSchema.FineGrainedConversionValueMappingsB\x03\xe0\x41\x03\x12\x9d\x01\n\x11postback_mappings\x18\x04 \x03(\x0b\x32}.google.ads.googleads.v25.resources.CustomerSkAdNetworkConversionValueSchema.SkAdNetworkConversionValueSchema.PostbackMappingB\x03\xe0\x41\x03\x1a\xff\x01\n\"FineGrainedConversionValueMappings\x12*\n\x1d\x66ine_grained_conversion_value\x18\x01 \x01(\x05\x42\x03\xe0\x41\x03\x12\xac\x01\n\x18\x63onversion_value_mapping\x18\x02 \x01(\x0b\x32\x84\x01.google.ads.googleads.v25.resources.CustomerSkAdNetworkConversionValueSchema.SkAdNetworkConversionValueSchema.ConversionValueMappingB\x03\xe0\x41\x03\x1a\x8b\x04\n\x0fPostbackMapping\x12$\n\x17postback_sequence_index\x18\x01 \x01(\x05\x42\x03\xe0\x41\x03\x12\xca\x01\n(coarse_grained_conversion_value_mappings\x18\x02 \x01(\x0b\x32\x92\x01.google.ads.googleads.v25.resources.CustomerSkAdNetworkConversionValueSchema.SkAdNetworkConversionValueSchema.CoarseGrainedConversionValueMappingsB\x03\xe0\x41\x03\x12\x99\x01\n#lock_window_coarse_conversion_value\x18\x03 \x01(\x0e\x32\x65.google.ads.googleads.v25.enums.SkAdNetworkCoarseConversionValueEnum.SkAdNetworkCoarseConversionValueB\x03\xe0\x41\x03H\x00\x12\x30\n!lock_window_fine_conversion_value\x18\x04 \x01(\x05\x42\x03\xe0\x41\x03H\x00\x12 \n\x11lock_window_event\x18\x05 \x01(\tB\x03\xe0\x41\x03H\x00\x42\x15\n\x13lock_window_trigger\x1a\xc3\x04\n$CoarseGrainedConversionValueMappings\x12\xb0\x01\n\x1clow_conversion_value_mapping\x18\x01 \x01(\x0b\x32\x84\x01.google.ads.googleads.v25.resources.CustomerSkAdNetworkConversionValueSchema.SkAdNetworkConversionValueSchema.ConversionValueMappingB\x03\xe0\x41\x03\x12\xb3\x01\n\x1fmedium_conversion_value_mapping\x18\x02 \x01(\x0b\x32\x84\x01.google.ads.googleads.v25.resources.CustomerSkAdNetworkConversionValueSchema.SkAdNetworkConversionValueSchema.ConversionValueMappingB\x03\xe0\x41\x03\x12\xb1\x01\n\x1dhigh_conversion_value_mapping\x18\x03 \x01(\x0b\x32\x84\x01.google.ads.googleads.v25.resources.CustomerSkAdNetworkConversionValueSchema.SkAdNetworkConversionValueSchema.ConversionValueMappingB\x03\xe0\x41\x03\x1a\xfe\x01\n\x16\x43onversionValueMapping\x12(\n\x1bmin_time_post_install_hours\x18\x01 \x01(\x03\x42\x03\xe0\x41\x03\x12(\n\x1bmax_time_post_install_hours\x18\x02 \x01(\x03\x42\x03\xe0\x41\x03\x12\x8f\x01\n\rmapped_events\x18\x03 \x03(\x0b\x32s.google.ads.googleads.v25.resources.CustomerSkAdNetworkConversionValueSchema.SkAdNetworkConversionValueSchema.EventB\x03\xe0\x41\x03\x1a\xa2\x05\n\x05\x45vent\x12\x1e\n\x11mapped_event_name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x1a\n\rcurrency_code\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\xa5\x01\n\x13\x65vent_revenue_range\x18\x03 \x01(\x0b\x32\x80\x01.google.ads.googleads.v25.resources.CustomerSkAdNetworkConversionValueSchema.SkAdNetworkConversionValueSchema.Event.RevenueRangeB\x03\xe0\x41\x03H\x00\x12\"\n\x13\x65vent_revenue_value\x18\x04 \x01(\x01\x42\x03\xe0\x41\x03H\x00\x12\xb0\x01\n\x16\x65vent_occurrence_range\x18\x05 \x01(\x0b\x32\x88\x01.google.ads.googleads.v25.resources.CustomerSkAdNetworkConversionValueSchema.SkAdNetworkConversionValueSchema.Event.EventOccurrenceRangeB\x03\xe0\x41\x03H\x01\x12\x1c\n\revent_counter\x18\x06 \x01(\x03\x42\x03\xe0\x41\x03H\x01\x1aN\n\x0cRevenueRange\x12\x1e\n\x11min_event_revenue\x18\x03 \x01(\x01\x42\x03\xe0\x41\x03\x12\x1e\n\x11max_event_revenue\x18\x04 \x01(\x01\x42\x03\xe0\x41\x03\x1aR\n\x14\x45ventOccurrenceRange\x12\x1c\n\x0fmin_event_count\x18\x01 \x01(\x03\x42\x03\xe0\x41\x03\x12\x1c\n\x0fmax_event_count\x18\x02 \x01(\x03\x42\x03\xe0\x41\x03\x42\x0e\n\x0crevenue_rateB\x0c\n\nevent_rate:\x9c\x01\xea\x41\x98\x01\nAgoogleads.googleapis.com/CustomerSkAdNetworkConversionValueSchema\x12Scustomers/{customer_id}/customerSkAdNetworkConversionValueSchemas/{account_link_id}B\x9f\x02\n&com.google.ads.googleads.v25.resourcesB-CustomerSkAdNetworkConversionValueSchemaProtoP\x01ZKgoogle.golang.org/genproto/googleapis/ads/googleads/v25/resources;resources\xa2\x02\x03GAA\xaa\x02\"Google.Ads.GoogleAds.V25.Resources\xca\x02\"Google\\Ads\\GoogleAds\\V25\\Resources\xea\x02&Google::Ads::GoogleAds::V25::Resourcesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Resources + CustomerSkAdNetworkConversionValueSchema = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.CustomerSkAdNetworkConversionValueSchema").msgclass + CustomerSkAdNetworkConversionValueSchema::SkAdNetworkConversionValueSchema = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.CustomerSkAdNetworkConversionValueSchema.SkAdNetworkConversionValueSchema").msgclass + CustomerSkAdNetworkConversionValueSchema::SkAdNetworkConversionValueSchema::FineGrainedConversionValueMappings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.CustomerSkAdNetworkConversionValueSchema.SkAdNetworkConversionValueSchema.FineGrainedConversionValueMappings").msgclass + CustomerSkAdNetworkConversionValueSchema::SkAdNetworkConversionValueSchema::PostbackMapping = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.CustomerSkAdNetworkConversionValueSchema.SkAdNetworkConversionValueSchema.PostbackMapping").msgclass + CustomerSkAdNetworkConversionValueSchema::SkAdNetworkConversionValueSchema::CoarseGrainedConversionValueMappings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.CustomerSkAdNetworkConversionValueSchema.SkAdNetworkConversionValueSchema.CoarseGrainedConversionValueMappings").msgclass + CustomerSkAdNetworkConversionValueSchema::SkAdNetworkConversionValueSchema::ConversionValueMapping = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.CustomerSkAdNetworkConversionValueSchema.SkAdNetworkConversionValueSchema.ConversionValueMapping").msgclass + CustomerSkAdNetworkConversionValueSchema::SkAdNetworkConversionValueSchema::Event = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.CustomerSkAdNetworkConversionValueSchema.SkAdNetworkConversionValueSchema.Event").msgclass + CustomerSkAdNetworkConversionValueSchema::SkAdNetworkConversionValueSchema::Event::RevenueRange = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.CustomerSkAdNetworkConversionValueSchema.SkAdNetworkConversionValueSchema.Event.RevenueRange").msgclass + CustomerSkAdNetworkConversionValueSchema::SkAdNetworkConversionValueSchema::Event::EventOccurrenceRange = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.CustomerSkAdNetworkConversionValueSchema.SkAdNetworkConversionValueSchema.Event.EventOccurrenceRange").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/resources/customer_user_access_invitation_pb.rb b/lib/google/ads/google_ads/v25/resources/customer_user_access_invitation_pb.rb new file mode 100644 index 000000000..62a665574 --- /dev/null +++ b/lib/google/ads/google_ads/v25/resources/customer_user_access_invitation_pb.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/resources/customer_user_access_invitation.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/enums/access_invitation_status_pb' +require 'google/ads/google_ads/v25/enums/access_role_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' + + +descriptor_data = "\nHgoogle/ads/googleads/v25/resources/customer_user_access_invitation.proto\x12\"google.ads.googleads.v25.resources\x1a=google/ads/googleads/v25/enums/access_invitation_status.proto\x1a\x30google/ads/googleads/v25/enums/access_role.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\x99\x04\n\x1c\x43ustomerUserAccessInvitation\x12T\n\rresource_name\x18\x01 \x01(\tB=\xe0\x41\x05\xfa\x41\x37\n5googleads.googleapis.com/CustomerUserAccessInvitation\x12\x1a\n\rinvitation_id\x18\x02 \x01(\x03\x42\x03\xe0\x41\x03\x12S\n\x0b\x61\x63\x63\x65ss_role\x18\x03 \x01(\x0e\x32\x39.google.ads.googleads.v25.enums.AccessRoleEnum.AccessRoleB\x03\xe0\x41\x05\x12\x1a\n\remail_address\x18\x04 \x01(\tB\x03\xe0\x41\x05\x12\x1f\n\x12\x63reation_date_time\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12q\n\x11invitation_status\x18\x06 \x01(\x0e\x32Q.google.ads.googleads.v25.enums.AccessInvitationStatusEnum.AccessInvitationStatusB\x03\xe0\x41\x03:\x81\x01\xea\x41~\n5googleads.googleapis.com/CustomerUserAccessInvitation\x12\x45\x63ustomers/{customer_id}/customerUserAccessInvitations/{invitation_id}B\x93\x02\n&com.google.ads.googleads.v25.resourcesB!CustomerUserAccessInvitationProtoP\x01ZKgoogle.golang.org/genproto/googleapis/ads/googleads/v25/resources;resources\xa2\x02\x03GAA\xaa\x02\"Google.Ads.GoogleAds.V25.Resources\xca\x02\"Google\\Ads\\GoogleAds\\V25\\Resources\xea\x02&Google::Ads::GoogleAds::V25::Resourcesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Resources + CustomerUserAccessInvitation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.CustomerUserAccessInvitation").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/resources/customer_user_access_pb.rb b/lib/google/ads/google_ads/v25/resources/customer_user_access_pb.rb new file mode 100644 index 000000000..e15ee2092 --- /dev/null +++ b/lib/google/ads/google_ads/v25/resources/customer_user_access_pb.rb @@ -0,0 +1,27 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/resources/customer_user_access.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/enums/access_role_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' + + +descriptor_data = "\n=google/ads/googleads/v25/resources/customer_user_access.proto\x12\"google.ads.googleads.v25.resources\x1a\x30google/ads/googleads/v25/enums/access_role.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\xbb\x05\n\x12\x43ustomerUserAccess\x12J\n\rresource_name\x18\x01 \x01(\tB3\xe0\x41\x05\xfa\x41-\n+googleads.googleapis.com/CustomerUserAccess\x12\x14\n\x07user_id\x18\x02 \x01(\x03\x42\x03\xe0\x41\x03\x12\x1f\n\remail_address\x18\x03 \x01(\tB\x03\xe0\x41\x03H\x00\x88\x01\x01\x12N\n\x0b\x61\x63\x63\x65ss_role\x18\x04 \x01(\x0e\x32\x39.google.ads.googleads.v25.enums.AccessRoleEnum.AccessRole\x12+\n\x19\x61\x63\x63\x65ss_creation_date_time\x18\x06 \x01(\tB\x03\xe0\x41\x03H\x01\x88\x01\x01\x12,\n\x1ainviter_user_email_address\x18\x07 \x01(\tB\x03\xe0\x41\x03H\x02\x88\x01\x01\x12!\n\x0fpasskey_enabled\x18\x08 \x01(\x08\x42\x03\xe0\x41\x03H\x03\x88\x01\x01\x12\x63\n\x1fpending_multi_party_auth_review\x18\t \x01(\tB5\xe0\x41\x03\xfa\x41/\n-googleads.googleapis.com/MultiPartyAuthReviewH\x04\x88\x01\x01:h\xea\x41\x65\n+googleads.googleapis.com/CustomerUserAccess\x12\x36\x63ustomers/{customer_id}/customerUserAccesses/{user_id}B\x10\n\x0e_email_addressB\x1c\n\x1a_access_creation_date_timeB\x1d\n\x1b_inviter_user_email_addressB\x12\n\x10_passkey_enabledB\"\n _pending_multi_party_auth_reviewB\x89\x02\n&com.google.ads.googleads.v25.resourcesB\x17\x43ustomerUserAccessProtoP\x01ZKgoogle.golang.org/genproto/googleapis/ads/googleads/v25/resources;resources\xa2\x02\x03GAA\xaa\x02\"Google.Ads.GoogleAds.V25.Resources\xca\x02\"Google\\Ads\\GoogleAds\\V25\\Resources\xea\x02&Google::Ads::GoogleAds::V25::Resourcesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Resources + CustomerUserAccess = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.CustomerUserAccess").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/resources/customizer_attribute_pb.rb b/lib/google/ads/google_ads/v25/resources/customizer_attribute_pb.rb new file mode 100644 index 000000000..2a137afd1 --- /dev/null +++ b/lib/google/ads/google_ads/v25/resources/customizer_attribute_pb.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/resources/customizer_attribute.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/enums/customizer_attribute_status_pb' +require 'google/ads/google_ads/v25/enums/customizer_attribute_type_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' + + +descriptor_data = "\n=google/ads/googleads/v25/resources/customizer_attribute.proto\x12\"google.ads.googleads.v25.resources\x1a@google/ads/googleads/v25/enums/customizer_attribute_status.proto\x1a>google/ads/googleads/v25/enums/customizer_attribute_type.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\xda\x03\n\x13\x43ustomizerAttribute\x12K\n\rresource_name\x18\x01 \x01(\tB4\xe0\x41\x05\xfa\x41.\n,googleads.googleapis.com/CustomizerAttribute\x12\x0f\n\x02id\x18\x02 \x01(\x03\x42\x03\xe0\x41\x03\x12\x14\n\x04name\x18\x03 \x01(\tB\x06\xe0\x41\x02\xe0\x41\x05\x12\x66\n\x04type\x18\x04 \x01(\x0e\x32S.google.ads.googleads.v25.enums.CustomizerAttributeTypeEnum.CustomizerAttributeTypeB\x03\xe0\x41\x05\x12l\n\x06status\x18\x05 \x01(\x0e\x32W.google.ads.googleads.v25.enums.CustomizerAttributeStatusEnum.CustomizerAttributeStatusB\x03\xe0\x41\x03:y\xea\x41v\n,googleads.googleapis.com/CustomizerAttribute\x12\x46\x63ustomers/{customer_id}/customizerAttributes/{customizer_attribute_id}B\x8a\x02\n&com.google.ads.googleads.v25.resourcesB\x18\x43ustomizerAttributeProtoP\x01ZKgoogle.golang.org/genproto/googleapis/ads/googleads/v25/resources;resources\xa2\x02\x03GAA\xaa\x02\"Google.Ads.GoogleAds.V25.Resources\xca\x02\"Google\\Ads\\GoogleAds\\V25\\Resources\xea\x02&Google::Ads::GoogleAds::V25::Resourcesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Resources + CustomizerAttribute = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.CustomizerAttribute").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/resources/data_link_pb.rb b/lib/google/ads/google_ads/v25/resources/data_link_pb.rb new file mode 100644 index 000000000..a243bd980 --- /dev/null +++ b/lib/google/ads/google_ads/v25/resources/data_link_pb.rb @@ -0,0 +1,30 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/resources/data_link.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/enums/data_link_status_pb' +require 'google/ads/google_ads/v25/enums/data_link_type_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' + + +descriptor_data = "\n2google/ads/googleads/v25/resources/data_link.proto\x12\"google.ads.googleads.v25.resources\x1a\x35google/ads/googleads/v25/enums/data_link_status.proto\x1a\x33google/ads/googleads/v25/enums/data_link_type.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\xad\x05\n\x08\x44\x61taLink\x12@\n\rresource_name\x18\x01 \x01(\tB)\xe0\x41\x05\xfa\x41#\n!googleads.googleapis.com/DataLink\x12!\n\x0fproduct_link_id\x18\x02 \x01(\x03\x42\x03\xe0\x41\x03H\x02\x88\x01\x01\x12\x1e\n\x0c\x64\x61ta_link_id\x18\x03 \x01(\x03\x42\x03\xe0\x41\x03H\x03\x88\x01\x01\x12P\n\x04type\x18\x04 \x01(\x0e\x32=.google.ads.googleads.v25.enums.DataLinkTypeEnum.DataLinkTypeB\x03\xe0\x41\x03\x12V\n\x06status\x18\x05 \x01(\x0e\x32\x41.google.ads.googleads.v25.enums.DataLinkStatusEnum.DataLinkStatusB\x03\xe0\x41\x03\x12X\n\ryoutube_video\x18\x06 \x01(\x0b\x32:.google.ads.googleads.v25.resources.YoutubeVideoIdentifierB\x03\xe0\x41\x05H\x00\x12]\n\x15youtube_link_metadata\x18\x07 \x01(\x0b\x32\x37.google.ads.googleads.v25.resources.YoutubeLinkMetadataB\x03\xe0\x41\x05H\x01:j\xea\x41g\n!googleads.googleapis.com/DataLink\x12\x42\x63ustomers/{customer_id}/dataLinks/{product_link_id}~{data_link_id}B\x12\n\x10\x64\x61ta_link_entityB\x14\n\x12\x64\x61ta_link_metadataB\x12\n\x10_product_link_idB\x0f\n\r_data_link_id\"n\n\x16YoutubeVideoIdentifier\x12\x1c\n\nchannel_id\x18\x01 \x01(\tB\x03\xe0\x41\x05H\x00\x88\x01\x01\x12\x1a\n\x08video_id\x18\x02 \x01(\tB\x03\xe0\x41\x05H\x01\x88\x01\x01\x42\r\n\x0b_channel_idB\x0b\n\t_video_id\"N\n\x13YoutubeLinkMetadata\x12\"\n\x10\x62rand_channel_id\x18\x01 \x01(\tB\x03\xe0\x41\x05H\x00\x88\x01\x01\x42\x13\n\x11_brand_channel_idB\xff\x01\n&com.google.ads.googleads.v25.resourcesB\rDataLinkProtoP\x01ZKgoogle.golang.org/genproto/googleapis/ads/googleads/v25/resources;resources\xa2\x02\x03GAA\xaa\x02\"Google.Ads.GoogleAds.V25.Resources\xca\x02\"Google\\Ads\\GoogleAds\\V25\\Resources\xea\x02&Google::Ads::GoogleAds::V25::Resourcesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Resources + DataLink = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.DataLink").msgclass + YoutubeVideoIdentifier = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.YoutubeVideoIdentifier").msgclass + YoutubeLinkMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.YoutubeLinkMetadata").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/resources/detail_content_suitability_placement_view_pb.rb b/lib/google/ads/google_ads/v25/resources/detail_content_suitability_placement_view_pb.rb new file mode 100644 index 000000000..19c9d61db --- /dev/null +++ b/lib/google/ads/google_ads/v25/resources/detail_content_suitability_placement_view_pb.rb @@ -0,0 +1,27 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/resources/detail_content_suitability_placement_view.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/enums/placement_type_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' + + +descriptor_data = "\nRgoogle/ads/googleads/v25/resources/detail_content_suitability_placement_view.proto\x12\"google.ads.googleads.v25.resources\x1a\x33google/ads/googleads/v25/enums/placement_type.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\x9e\x04\n%DetailContentSuitabilityPlacementView\x12]\n\rresource_name\x18\x01 \x01(\tBF\xe0\x41\x03\xfa\x41@\n>googleads.googleapis.com/DetailContentSuitabilityPlacementView\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x16\n\tplacement\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\\\n\x0eplacement_type\x18\x04 \x01(\x0e\x32?.google.ads.googleads.v25.enums.PlacementTypeEnum.PlacementTypeB\x03\xe0\x41\x03\x12\x17\n\ntarget_url\x18\x05 \x01(\tB\x03\xe0\x41\x03:\xeb\x01\xea\x41\xe7\x01\n>googleads.googleapis.com/DetailContentSuitabilityPlacementView\x12Vcustomers/{customer_id}/detailContentSuitabilityPlacementViews/{placement_fingerprint}*&detailContentSuitabilityPlacementViews2%detailContentSuitabilityPlacementViewB\x9c\x02\n&com.google.ads.googleads.v25.resourcesB*DetailContentSuitabilityPlacementViewProtoP\x01ZKgoogle.golang.org/genproto/googleapis/ads/googleads/v25/resources;resources\xa2\x02\x03GAA\xaa\x02\"Google.Ads.GoogleAds.V25.Resources\xca\x02\"Google\\Ads\\GoogleAds\\V25\\Resources\xea\x02&Google::Ads::GoogleAds::V25::Resourcesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Resources + DetailContentSuitabilityPlacementView = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.DetailContentSuitabilityPlacementView").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/resources/detail_placement_view_pb.rb b/lib/google/ads/google_ads/v25/resources/detail_placement_view_pb.rb new file mode 100644 index 000000000..0d00172d2 --- /dev/null +++ b/lib/google/ads/google_ads/v25/resources/detail_placement_view_pb.rb @@ -0,0 +1,27 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/resources/detail_placement_view.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/enums/placement_type_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' + + +descriptor_data = "\n>google/ads/googleads/v25/resources/detail_placement_view.proto\x12\"google.ads.googleads.v25.resources\x1a\x33google/ads/googleads/v25/enums/placement_type.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\x99\x04\n\x13\x44\x65tailPlacementView\x12K\n\rresource_name\x18\x01 \x01(\tB4\xe0\x41\x03\xfa\x41.\n,googleads.googleapis.com/DetailPlacementView\x12\x1b\n\tplacement\x18\x07 \x01(\tB\x03\xe0\x41\x03H\x00\x88\x01\x01\x12\x1e\n\x0c\x64isplay_name\x18\x08 \x01(\tB\x03\xe0\x41\x03H\x01\x88\x01\x01\x12,\n\x1agroup_placement_target_url\x18\t \x01(\tB\x03\xe0\x41\x03H\x02\x88\x01\x01\x12\x1c\n\ntarget_url\x18\n \x01(\tB\x03\xe0\x41\x03H\x03\x88\x01\x01\x12\\\n\x0eplacement_type\x18\x06 \x01(\x0e\x32?.google.ads.googleads.v25.enums.PlacementTypeEnum.PlacementTypeB\x03\xe0\x41\x03:\x80\x01\xea\x41}\n,googleads.googleapis.com/DetailPlacementView\x12Mcustomers/{customer_id}/detailPlacementViews/{ad_group_id}~{base64_placement}B\x0c\n\n_placementB\x0f\n\r_display_nameB\x1d\n\x1b_group_placement_target_urlB\r\n\x0b_target_urlB\x8a\x02\n&com.google.ads.googleads.v25.resourcesB\x18\x44\x65tailPlacementViewProtoP\x01ZKgoogle.golang.org/genproto/googleapis/ads/googleads/v25/resources;resources\xa2\x02\x03GAA\xaa\x02\"Google.Ads.GoogleAds.V25.Resources\xca\x02\"Google\\Ads\\GoogleAds\\V25\\Resources\xea\x02&Google::Ads::GoogleAds::V25::Resourcesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Resources + DetailPlacementView = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.DetailPlacementView").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/resources/detailed_demographic_pb.rb b/lib/google/ads/google_ads/v25/resources/detailed_demographic_pb.rb new file mode 100644 index 000000000..be492ba72 --- /dev/null +++ b/lib/google/ads/google_ads/v25/resources/detailed_demographic_pb.rb @@ -0,0 +1,27 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/resources/detailed_demographic.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/common/criterion_category_availability_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' + + +descriptor_data = "\n=google/ads/googleads/v25/resources/detailed_demographic.proto\x12\"google.ads.googleads.v25.resources\x1a\x45google/ads/googleads/v25/common/criterion_category_availability.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\xc2\x03\n\x13\x44\x65tailedDemographic\x12K\n\rresource_name\x18\x01 \x01(\tB4\xe0\x41\x03\xfa\x41.\n,googleads.googleapis.com/DetailedDemographic\x12\x0f\n\x02id\x18\x02 \x01(\x03\x42\x03\xe0\x41\x03\x12\x11\n\x04name\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x44\n\x06parent\x18\x04 \x01(\tB4\xe0\x41\x03\xfa\x41.\n,googleads.googleapis.com/DetailedDemographic\x12\x1c\n\x0flaunched_to_all\x18\x05 \x01(\x08\x42\x03\xe0\x41\x03\x12[\n\x0e\x61vailabilities\x18\x06 \x03(\x0b\x32>.google.ads.googleads.v25.common.CriterionCategoryAvailabilityB\x03\xe0\x41\x03:y\xea\x41v\n,googleads.googleapis.com/DetailedDemographic\x12\x46\x63ustomers/{customer_id}/detailedDemographics/{detailed_demographic_id}B\x8a\x02\n&com.google.ads.googleads.v25.resourcesB\x18\x44\x65tailedDemographicProtoP\x01ZKgoogle.golang.org/genproto/googleapis/ads/googleads/v25/resources;resources\xa2\x02\x03GAA\xaa\x02\"Google.Ads.GoogleAds.V25.Resources\xca\x02\"Google\\Ads\\GoogleAds\\V25\\Resources\xea\x02&Google::Ads::GoogleAds::V25::Resourcesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Resources + DetailedDemographic = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.DetailedDemographic").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/resources/display_keyword_view_pb.rb b/lib/google/ads/google_ads/v25/resources/display_keyword_view_pb.rb new file mode 100644 index 000000000..febab25a6 --- /dev/null +++ b/lib/google/ads/google_ads/v25/resources/display_keyword_view_pb.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/resources/display_keyword_view.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' + + +descriptor_data = "\n=google/ads/googleads/v25/resources/display_keyword_view.proto\x12\"google.ads.googleads.v25.resources\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\xdc\x01\n\x12\x44isplayKeywordView\x12J\n\rresource_name\x18\x01 \x01(\tB3\xe0\x41\x03\xfa\x41-\n+googleads.googleapis.com/DisplayKeywordView:z\xea\x41w\n+googleads.googleapis.com/DisplayKeywordView\x12Hcustomers/{customer_id}/displayKeywordViews/{ad_group_id}~{criterion_id}B\x89\x02\n&com.google.ads.googleads.v25.resourcesB\x17\x44isplayKeywordViewProtoP\x01ZKgoogle.golang.org/genproto/googleapis/ads/googleads/v25/resources;resources\xa2\x02\x03GAA\xaa\x02\"Google.Ads.GoogleAds.V25.Resources\xca\x02\"Google\\Ads\\GoogleAds\\V25\\Resources\xea\x02&Google::Ads::GoogleAds::V25::Resourcesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Resources + DisplayKeywordView = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.DisplayKeywordView").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/resources/distance_view_pb.rb b/lib/google/ads/google_ads/v25/resources/distance_view_pb.rb new file mode 100644 index 000000000..3030272ac --- /dev/null +++ b/lib/google/ads/google_ads/v25/resources/distance_view_pb.rb @@ -0,0 +1,27 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/resources/distance_view.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/enums/distance_bucket_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' + + +descriptor_data = "\n6google/ads/googleads/v25/resources/distance_view.proto\x12\"google.ads.googleads.v25.resources\x1a\x34google/ads/googleads/v25/enums/distance_bucket.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\xe4\x02\n\x0c\x44istanceView\x12\x44\n\rresource_name\x18\x01 \x01(\tB-\xe0\x41\x03\xfa\x41\'\n%googleads.googleapis.com/DistanceView\x12_\n\x0f\x64istance_bucket\x18\x02 \x01(\x0e\x32\x41.google.ads.googleads.v25.enums.DistanceBucketEnum.DistanceBucketB\x03\xe0\x41\x03\x12\x1f\n\rmetric_system\x18\x04 \x01(\x08\x42\x03\xe0\x41\x03H\x00\x88\x01\x01:z\xea\x41w\n%googleads.googleapis.com/DistanceView\x12Ncustomers/{customer_id}/distanceViews/{placeholder_chain_id}~{distance_bucket}B\x10\n\x0e_metric_systemB\x83\x02\n&com.google.ads.googleads.v25.resourcesB\x11\x44istanceViewProtoP\x01ZKgoogle.golang.org/genproto/googleapis/ads/googleads/v25/resources;resources\xa2\x02\x03GAA\xaa\x02\"Google.Ads.GoogleAds.V25.Resources\xca\x02\"Google\\Ads\\GoogleAds\\V25\\Resources\xea\x02&Google::Ads::GoogleAds::V25::Resourcesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Resources + DistanceView = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.DistanceView").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/resources/domain_category_pb.rb b/lib/google/ads/google_ads/v25/resources/domain_category_pb.rb new file mode 100644 index 000000000..6b412c30f --- /dev/null +++ b/lib/google/ads/google_ads/v25/resources/domain_category_pb.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/resources/domain_category.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' + + +descriptor_data = "\n8google/ads/googleads/v25/resources/domain_category.proto\x12\"google.ads.googleads.v25.resources\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\x9e\x05\n\x0e\x44omainCategory\x12\x46\n\rresource_name\x18\x01 \x01(\tB/\xe0\x41\x03\xfa\x41)\n\'googleads.googleapis.com/DomainCategory\x12@\n\x08\x63\x61mpaign\x18\n \x01(\tB)\xe0\x41\x03\xfa\x41#\n!googleads.googleapis.com/CampaignH\x00\x88\x01\x01\x12\x1a\n\x08\x63\x61tegory\x18\x0b \x01(\tB\x03\xe0\x41\x03H\x01\x88\x01\x01\x12\x1f\n\rlanguage_code\x18\x0c \x01(\tB\x03\xe0\x41\x03H\x02\x88\x01\x01\x12\x18\n\x06\x64omain\x18\r \x01(\tB\x03\xe0\x41\x03H\x03\x88\x01\x01\x12#\n\x11\x63overage_fraction\x18\x0e \x01(\x01\x42\x03\xe0\x41\x03H\x04\x88\x01\x01\x12\x1f\n\rcategory_rank\x18\x0f \x01(\x03\x42\x03\xe0\x41\x03H\x05\x88\x01\x01\x12\x1e\n\x0chas_children\x18\x10 \x01(\x08\x42\x03\xe0\x41\x03H\x06\x88\x01\x01\x12,\n\x1arecommended_cpc_bid_micros\x18\x11 \x01(\x03\x42\x03\xe0\x41\x03H\x07\x88\x01\x01:\x87\x01\xea\x41\x83\x01\n\'googleads.googleapis.com/DomainCategory\x12Xcustomers/{customer_id}/domainCategories/{campaign_id}~{base64_category}~{language_code}B\x0b\n\t_campaignB\x0b\n\t_categoryB\x10\n\x0e_language_codeB\t\n\x07_domainB\x14\n\x12_coverage_fractionB\x10\n\x0e_category_rankB\x0f\n\r_has_childrenB\x1d\n\x1b_recommended_cpc_bid_microsB\x85\x02\n&com.google.ads.googleads.v25.resourcesB\x13\x44omainCategoryProtoP\x01ZKgoogle.golang.org/genproto/googleapis/ads/googleads/v25/resources;resources\xa2\x02\x03GAA\xaa\x02\"Google.Ads.GoogleAds.V25.Resources\xca\x02\"Google\\Ads\\GoogleAds\\V25\\Resources\xea\x02&Google::Ads::GoogleAds::V25::Resourcesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Resources + DomainCategory = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.DomainCategory").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/resources/dynamic_search_ads_search_term_view_pb.rb b/lib/google/ads/google_ads/v25/resources/dynamic_search_ads_search_term_view_pb.rb new file mode 100644 index 000000000..281d6427c --- /dev/null +++ b/lib/google/ads/google_ads/v25/resources/dynamic_search_ads_search_term_view_pb.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/resources/dynamic_search_ads_search_term_view.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' + + +descriptor_data = "\nLgoogle/ads/googleads/v25/resources/dynamic_search_ads_search_term_view.proto\x12\"google.ads.googleads.v25.resources\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\xd0\x05\n\x1e\x44ynamicSearchAdsSearchTermView\x12V\n\rresource_name\x18\x01 \x01(\tB?\xe0\x41\x03\xfa\x41\x39\n7googleads.googleapis.com/DynamicSearchAdsSearchTermView\x12\x1d\n\x0bsearch_term\x18\t \x01(\tB\x03\xe0\x41\x03H\x00\x88\x01\x01\x12\x1a\n\x08headline\x18\n \x01(\tB\x03\xe0\x41\x03H\x01\x88\x01\x01\x12\x1e\n\x0clanding_page\x18\x0b \x01(\tB\x03\xe0\x41\x03H\x02\x88\x01\x01\x12\x1a\n\x08page_url\x18\x0c \x01(\tB\x03\xe0\x41\x03H\x03\x88\x01\x01\x12&\n\x14has_negative_keyword\x18\r \x01(\x08\x42\x03\xe0\x41\x03H\x04\x88\x01\x01\x12&\n\x14has_matching_keyword\x18\x0e \x01(\x08\x42\x03\xe0\x41\x03H\x05\x88\x01\x01\x12\"\n\x10has_negative_url\x18\x0f \x01(\x08\x42\x03\xe0\x41\x03H\x06\x88\x01\x01:\xe8\x01\xea\x41\xe4\x01\n7googleads.googleapis.com/DynamicSearchAdsSearchTermView\x12\xa8\x01\x63ustomers/{customer_id}/dynamicSearchAdsSearchTermViews/{ad_group_id}~{search_term_fingerprint}~{headline_fingerprint}~{landing_page_fingerprint}~{page_url_fingerprint}B\x0e\n\x0c_search_termB\x0b\n\t_headlineB\x0f\n\r_landing_pageB\x0b\n\t_page_urlB\x17\n\x15_has_negative_keywordB\x17\n\x15_has_matching_keywordB\x13\n\x11_has_negative_urlB\x95\x02\n&com.google.ads.googleads.v25.resourcesB#DynamicSearchAdsSearchTermViewProtoP\x01ZKgoogle.golang.org/genproto/googleapis/ads/googleads/v25/resources;resources\xa2\x02\x03GAA\xaa\x02\"Google.Ads.GoogleAds.V25.Resources\xca\x02\"Google\\Ads\\GoogleAds\\V25\\Resources\xea\x02&Google::Ads::GoogleAds::V25::Resourcesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Resources + DynamicSearchAdsSearchTermView = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.DynamicSearchAdsSearchTermView").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/resources/expanded_landing_page_view_pb.rb b/lib/google/ads/google_ads/v25/resources/expanded_landing_page_view_pb.rb new file mode 100644 index 000000000..5b68ab882 --- /dev/null +++ b/lib/google/ads/google_ads/v25/resources/expanded_landing_page_view_pb.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/resources/expanded_landing_page_view.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' + + +descriptor_data = "\nCgoogle/ads/googleads/v25/resources/expanded_landing_page_view.proto\x12\"google.ads.googleads.v25.resources\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\xb3\x02\n\x17\x45xpandedLandingPageView\x12O\n\rresource_name\x18\x01 \x01(\tB8\xe0\x41\x03\xfa\x41\x32\n0googleads.googleapis.com/ExpandedLandingPageView\x12$\n\x12\x65xpanded_final_url\x18\x03 \x01(\tB\x03\xe0\x41\x03H\x00\x88\x01\x01:\x89\x01\xea\x41\x85\x01\n0googleads.googleapis.com/ExpandedLandingPageView\x12Qcustomers/{customer_id}/expandedLandingPageViews/{expanded_final_url_fingerprint}B\x15\n\x13_expanded_final_urlB\x8e\x02\n&com.google.ads.googleads.v25.resourcesB\x1c\x45xpandedLandingPageViewProtoP\x01ZKgoogle.golang.org/genproto/googleapis/ads/googleads/v25/resources;resources\xa2\x02\x03GAA\xaa\x02\"Google.Ads.GoogleAds.V25.Resources\xca\x02\"Google\\Ads\\GoogleAds\\V25\\Resources\xea\x02&Google::Ads::GoogleAds::V25::Resourcesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Resources + ExpandedLandingPageView = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.ExpandedLandingPageView").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/resources/experiment_arm_pb.rb b/lib/google/ads/google_ads/v25/resources/experiment_arm_pb.rb new file mode 100644 index 000000000..0cf63a8a4 --- /dev/null +++ b/lib/google/ads/google_ads/v25/resources/experiment_arm_pb.rb @@ -0,0 +1,36 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/resources/experiment_arm.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/enums/asset_field_type_pb' +require 'google/ads/google_ads/v25/enums/bidding_strategy_type_pb' +require 'google/ads/google_ads/v25/enums/experiment_asset_detail_operation_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' + + +descriptor_data = "\n7google/ads/googleads/v25/resources/experiment_arm.proto\x12\"google.ads.googleads.v25.resources\x1a\x35google/ads/googleads/v25/enums/asset_field_type.proto\x1a:google/ads/googleads/v25/enums/bidding_strategy_type.proto\x1a\x46google/ads/googleads/v25/enums/experiment_asset_detail_operation.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\x8d\x11\n\rExperimentArm\x12\x45\n\rresource_name\x18\x01 \x01(\tB.\xe0\x41\x05\xfa\x41(\n&googleads.googleapis.com/ExperimentArm\x12?\n\nexperiment\x18\x08 \x01(\tB+\xe0\x41\x05\xfa\x41%\n#googleads.googleapis.com/Experiment\x12\x11\n\x04name\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x0f\n\x07\x63ontrol\x18\x04 \x01(\x08\x12\x15\n\rtraffic_split\x18\x05 \x01(\x03\x12\x39\n\tcampaigns\x18\x06 \x03(\tB&\xfa\x41#\n!googleads.googleapis.com/Campaign\x12\x46\n\x13in_design_campaigns\x18\x07 \x03(\tB)\xe0\x41\x03\xfa\x41#\n!googleads.googleapis.com/Campaign\x12^\n\x12\x61sset_testing_info\x18\t \x01(\x0b\x32\x42.google.ads.googleads.v25.resources.ExperimentArm.AssetTestingInfo\x12V\n\x0c\x61sset_groups\x18\n \x03(\x0b\x32@.google.ads.googleads.v25.resources.ExperimentArm.AssetGroupInfo\x12\x83\x01\n#performance_max_experiment_arm_info\x18\x0b \x01(\x0b\x32Q.google.ads.googleads.v25.resources.ExperimentArm.PerformanceMaxExperimentArmInfoB\x03\xe0\x41\x05\x1aw\n\x10\x41ssetTestingInfo\x12\x63\n\x15\x61sset_variation_infos\x18\x01 \x03(\x0b\x32\x44.google.ads.googleads.v25.resources.ExperimentArm.AssetVariationInfo\x1a\xdb\x01\n\x12\x41ssetVariationInfo\x12<\n\rbase_ad_group\x18\x01 \x01(\tB%\xfa\x41\"\n googleads.googleapis.com/AdGroup\x12\x31\n\x07\x62\x61se_ad\x18\x02 \x01(\tB \xfa\x41\x1d\n\x1bgoogleads.googleapis.com/Ad\x12T\n\rasset_details\x18\x03 \x03(\x0b\x32=.google.ads.googleads.v25.resources.ExperimentArm.AssetDetail\x1a\x9c\x02\n\x0b\x41ssetDetail\x12\x32\n\x05\x61sset\x18\x01 \x01(\tB#\xfa\x41 \n\x1egoogleads.googleapis.com/Asset\x12U\n\nfield_type\x18\x02 \x01(\x0e\x32\x41.google.ads.googleads.v25.enums.AssetFieldTypeEnum.AssetFieldType\x12\x81\x01\n\x16\x61sset_detail_operation\x18\x03 \x01(\x0e\x32\x61.google.ads.googleads.v25.enums.ExperimentAssetDetailOperationEnum.ExperimentAssetDetailOperation\x1a\xb2\x01\n\x0e\x41ssetGroupInfo\x12=\n\x0b\x61sset_group\x18\x01 \x01(\tB(\xfa\x41%\n#googleads.googleapis.com/AssetGroup\x12\x61\n\x12\x61sset_group_assets\x18\x02 \x03(\x0b\x32\x45.google.ads.googleads.v25.resources.ExperimentArm.AssetGroupAssetInfo\x1a\xa0\x01\n\x13\x41ssetGroupAssetInfo\x12\x32\n\x05\x61sset\x18\x01 \x01(\tB#\xfa\x41 \n\x1egoogleads.googleapis.com/Asset\x12U\n\nfield_type\x18\x02 \x01(\x0e\x32\x41.google.ads.googleads.v25.enums.AssetFieldTypeEnum.AssetFieldType\x1a\xfa\x01\n*ExperimentalPerformanceMaxCampaignSettings\x12!\n\x14\x62udget_amount_micros\x18\x01 \x01(\x03\x42\x03\xe0\x41\x05\x12\x18\n\x0btarget_roas\x18\x02 \x01(\x01\x42\x03\xe0\x41\x05\x12\x1e\n\x11target_cpa_micros\x18\x03 \x01(\x03\x42\x03\xe0\x41\x05\x12o\n\x15\x62idding_strategy_type\x18\x04 \x01(\x0e\x32K.google.ads.googleads.v25.enums.BiddingStrategyTypeEnum.BiddingStrategyTypeB\x03\xe0\x41\x05\x1a\xbd\x01\n\x1fPerformanceMaxExperimentArmInfo\x12\x99\x01\n.experimental_performance_max_campaign_settings\x18\x01 \x01(\x0b\x32\\.google.ads.googleads.v25.resources.ExperimentArm.ExperimentalPerformanceMaxCampaignSettingsB\x03\xe0\x41\x05:m\xea\x41j\n&googleads.googleapis.com/ExperimentArm\x12@customers/{customer_id}/experimentArms/{trial_id}~{trial_arm_id}B\x84\x02\n&com.google.ads.googleads.v25.resourcesB\x12\x45xperimentArmProtoP\x01ZKgoogle.golang.org/genproto/googleapis/ads/googleads/v25/resources;resources\xa2\x02\x03GAA\xaa\x02\"Google.Ads.GoogleAds.V25.Resources\xca\x02\"Google\\Ads\\GoogleAds\\V25\\Resources\xea\x02&Google::Ads::GoogleAds::V25::Resourcesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Resources + ExperimentArm = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.ExperimentArm").msgclass + ExperimentArm::AssetTestingInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.ExperimentArm.AssetTestingInfo").msgclass + ExperimentArm::AssetVariationInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.ExperimentArm.AssetVariationInfo").msgclass + ExperimentArm::AssetDetail = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.ExperimentArm.AssetDetail").msgclass + ExperimentArm::AssetGroupInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.ExperimentArm.AssetGroupInfo").msgclass + ExperimentArm::AssetGroupAssetInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.ExperimentArm.AssetGroupAssetInfo").msgclass + ExperimentArm::ExperimentalPerformanceMaxCampaignSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.ExperimentArm.ExperimentalPerformanceMaxCampaignSettings").msgclass + ExperimentArm::PerformanceMaxExperimentArmInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.ExperimentArm.PerformanceMaxExperimentArmInfo").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/resources/experiment_pb.rb b/lib/google/ads/google_ads/v25/resources/experiment_pb.rb new file mode 100644 index 000000000..14f1b9405 --- /dev/null +++ b/lib/google/ads/google_ads/v25/resources/experiment_pb.rb @@ -0,0 +1,31 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/resources/experiment.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/common/experiment_types_pb' +require 'google/ads/google_ads/v25/common/metric_goal_pb' +require 'google/ads/google_ads/v25/enums/async_action_status_pb' +require 'google/ads/google_ads/v25/enums/experiment_status_pb' +require 'google/ads/google_ads/v25/enums/experiment_type_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' + + +descriptor_data = "\n3google/ads/googleads/v25/resources/experiment.proto\x12\"google.ads.googleads.v25.resources\x1a\x36google/ads/googleads/v25/common/experiment_types.proto\x1a\x31google/ads/googleads/v25/common/metric_goal.proto\x1a\x38google/ads/googleads/v25/enums/async_action_status.proto\x1a\x36google/ads/googleads/v25/enums/experiment_status.proto\x1a\x34google/ads/googleads/v25/enums/experiment_type.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\xfa\x07\n\nExperiment\x12\x42\n\rresource_name\x18\x01 \x01(\tB+\xe0\x41\x05\xfa\x41%\n#googleads.googleapis.com/Experiment\x12\x1f\n\rexperiment_id\x18\t \x01(\x03\x42\x03\xe0\x41\x03H\x01\x88\x01\x01\x12\x11\n\x04name\x18\n \x01(\tB\x03\xe0\x41\x02\x12\x13\n\x0b\x64\x65scription\x18\x0b \x01(\t\x12\x0e\n\x06suffix\x18\x0c \x01(\t\x12T\n\x04type\x18\r \x01(\x0e\x32\x41.google.ads.googleads.v25.enums.ExperimentTypeEnum.ExperimentTypeB\x03\xe0\x41\x02\x12U\n\x06status\x18\x0e \x01(\x0e\x32\x45.google.ads.googleads.v25.enums.ExperimentStatusEnum.ExperimentStatus\x12\x17\n\nstart_date\x18\x0f \x01(\tH\x02\x88\x01\x01\x12\x15\n\x08\x65nd_date\x18\x10 \x01(\tH\x03\x88\x01\x01\x12:\n\x05goals\x18\x11 \x03(\x0b\x32+.google.ads.googleads.v25.common.MetricGoal\x12(\n\x16long_running_operation\x18\x12 \x01(\tB\x03\xe0\x41\x03H\x04\x88\x01\x01\x12\x64\n\x0epromote_status\x18\x13 \x01(\x0e\x32G.google.ads.googleads.v25.enums.AsyncActionStatusEnum.AsyncActionStatusB\x03\xe0\x41\x03\x12\x1e\n\x0csync_enabled\x18\x14 \x01(\x08\x42\x03\xe0\x41\x05H\x05\x88\x01\x01\x12U\n\x10video_experiment\x18\x15 \x01(\x0b\x32\x34.google.ads.googleads.v25.common.VideoExperimentInfoB\x03\xe0\x41\x05H\x00\x12h\n\x1aoptimize_assets_experiment\x18\x16 \x01(\x0b\x32=.google.ads.googleads.v25.common.OptimizeAssetsExperimentInfoB\x03\xe0\x41\x05H\x00:X\xea\x41U\n#googleads.googleapis.com/Experiment\x12.customers/{customer_id}/experiments/{trial_id}B\x11\n\x0f\x65xperiment_infoB\x10\n\x0e_experiment_idB\r\n\x0b_start_dateB\x0b\n\t_end_dateB\x19\n\x17_long_running_operationB\x0f\n\r_sync_enabledB\x81\x02\n&com.google.ads.googleads.v25.resourcesB\x0f\x45xperimentProtoP\x01ZKgoogle.golang.org/genproto/googleapis/ads/googleads/v25/resources;resources\xa2\x02\x03GAA\xaa\x02\"Google.Ads.GoogleAds.V25.Resources\xca\x02\"Google\\Ads\\GoogleAds\\V25\\Resources\xea\x02&Google::Ads::GoogleAds::V25::Resourcesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Resources + Experiment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.Experiment").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/resources/final_url_expansion_asset_view_pb.rb b/lib/google/ads/google_ads/v25/resources/final_url_expansion_asset_view_pb.rb new file mode 100644 index 000000000..752f95150 --- /dev/null +++ b/lib/google/ads/google_ads/v25/resources/final_url_expansion_asset_view_pb.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/resources/final_url_expansion_asset_view.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/enums/asset_field_type_pb' +require 'google/ads/google_ads/v25/enums/asset_link_status_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' + + +descriptor_data = "\nGgoogle/ads/googleads/v25/resources/final_url_expansion_asset_view.proto\x12\"google.ads.googleads.v25.resources\x1a\x35google/ads/googleads/v25/enums/asset_field_type.proto\x1a\x36google/ads/googleads/v25/enums/asset_link_status.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\xc7\x06\n\x1a\x46inalUrlExpansionAssetView\x12R\n\rresource_name\x18\x01 \x01(\tB;\xe0\x41\x03\xfa\x41\x35\n3googleads.googleapis.com/FinalUrlExpansionAssetView\x12@\n\x08\x63\x61mpaign\x18\x02 \x01(\tB)\xe0\x41\x03\xfa\x41#\n!googleads.googleapis.com/CampaignH\x01\x88\x01\x01\x12:\n\x05\x61sset\x18\x03 \x01(\tB&\xe0\x41\x03\xfa\x41 \n\x1egoogleads.googleapis.com/AssetH\x02\x88\x01\x01\x12Z\n\nfield_type\x18\x04 \x01(\x0e\x32\x41.google.ads.googleads.v25.enums.AssetFieldTypeEnum.AssetFieldTypeB\x03\xe0\x41\x03\x12]\n\x06status\x18\x05 \x01(\x0e\x32\x43.google.ads.googleads.v25.enums.AssetLinkStatusEnum.AssetLinkStatusB\x03\xe0\x41\x03H\x03\x88\x01\x01\x12\x16\n\tfinal_url\x18\x06 \x01(\tB\x03\xe0\x41\x03\x12<\n\x08\x61\x64_group\x18\x07 \x01(\tB(\xe0\x41\x03\xfa\x41\"\n googleads.googleapis.com/AdGroupH\x00\x12\x42\n\x0b\x61sset_group\x18\x08 \x01(\tB+\xe0\x41\x03\xfa\x41%\n#googleads.googleapis.com/AssetGroupH\x00:\xd6\x01\xea\x41\xd2\x01\n3googleads.googleapis.com/FinalUrlExpansionAssetView\x12\x62\x63ustomers/{customer_id}/finalUrlExpansionAssetViews/{campaign_id}~{asset_id}~{field_type}~{url_fp}*\x1b\x66inalUrlExpansionAssetViews2\x1a\x66inalUrlExpansionAssetViewB\x07\n\x05levelB\x0b\n\t_campaignB\x08\n\x06_assetB\t\n\x07_statusB\x91\x02\n&com.google.ads.googleads.v25.resourcesB\x1f\x46inalUrlExpansionAssetViewProtoP\x01ZKgoogle.golang.org/genproto/googleapis/ads/googleads/v25/resources;resources\xa2\x02\x03GAA\xaa\x02\"Google.Ads.GoogleAds.V25.Resources\xca\x02\"Google\\Ads\\GoogleAds\\V25\\Resources\xea\x02&Google::Ads::GoogleAds::V25::Resourcesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Resources + FinalUrlExpansionAssetView = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.FinalUrlExpansionAssetView").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/resources/gender_view_pb.rb b/lib/google/ads/google_ads/v25/resources/gender_view_pb.rb new file mode 100644 index 000000000..56fc990b0 --- /dev/null +++ b/lib/google/ads/google_ads/v25/resources/gender_view_pb.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/resources/gender_view.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' + + +descriptor_data = "\n4google/ads/googleads/v25/resources/gender_view.proto\x12\"google.ads.googleads.v25.resources\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\xbc\x01\n\nGenderView\x12\x42\n\rresource_name\x18\x01 \x01(\tB+\xe0\x41\x03\xfa\x41%\n#googleads.googleapis.com/GenderView:j\xea\x41g\n#googleads.googleapis.com/GenderView\x12@customers/{customer_id}/genderViews/{ad_group_id}~{criterion_id}B\x81\x02\n&com.google.ads.googleads.v25.resourcesB\x0fGenderViewProtoP\x01ZKgoogle.golang.org/genproto/googleapis/ads/googleads/v25/resources;resources\xa2\x02\x03GAA\xaa\x02\"Google.Ads.GoogleAds.V25.Resources\xca\x02\"Google\\Ads\\GoogleAds\\V25\\Resources\xea\x02&Google::Ads::GoogleAds::V25::Resourcesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Resources + GenderView = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.GenderView").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/resources/geo_target_constant_pb.rb b/lib/google/ads/google_ads/v25/resources/geo_target_constant_pb.rb new file mode 100644 index 000000000..59ce3ecd8 --- /dev/null +++ b/lib/google/ads/google_ads/v25/resources/geo_target_constant_pb.rb @@ -0,0 +1,27 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/resources/geo_target_constant.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/enums/geo_target_constant_status_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' + + +descriptor_data = "\ngoogle/ads/googleads/v25/enums/google_ads_field_category.proto\x1a?google/ads/googleads/v25/enums/google_ads_field_data_type.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\x82\x06\n\x0eGoogleAdsField\x12\x46\n\rresource_name\x18\x01 \x01(\tB/\xe0\x41\x03\xfa\x41)\n\'googleads.googleapis.com/GoogleAdsField\x12\x16\n\x04name\x18\x15 \x01(\tB\x03\xe0\x41\x03H\x00\x88\x01\x01\x12h\n\x08\x63\x61tegory\x18\x03 \x01(\x0e\x32Q.google.ads.googleads.v25.enums.GoogleAdsFieldCategoryEnum.GoogleAdsFieldCategoryB\x03\xe0\x41\x03\x12\x1c\n\nselectable\x18\x16 \x01(\x08\x42\x03\xe0\x41\x03H\x01\x88\x01\x01\x12\x1c\n\nfilterable\x18\x17 \x01(\x08\x42\x03\xe0\x41\x03H\x02\x88\x01\x01\x12\x1a\n\x08sortable\x18\x18 \x01(\x08\x42\x03\xe0\x41\x03H\x03\x88\x01\x01\x12\x1c\n\x0fselectable_with\x18\x19 \x03(\tB\x03\xe0\x41\x03\x12 \n\x13\x61ttribute_resources\x18\x1a \x03(\tB\x03\xe0\x41\x03\x12\x14\n\x07metrics\x18\x1b \x03(\tB\x03\xe0\x41\x03\x12\x15\n\x08segments\x18\x1c \x03(\tB\x03\xe0\x41\x03\x12\x18\n\x0b\x65num_values\x18\x1d \x03(\tB\x03\xe0\x41\x03\x12i\n\tdata_type\x18\x0c \x01(\x0e\x32Q.google.ads.googleads.v25.enums.GoogleAdsFieldDataTypeEnum.GoogleAdsFieldDataTypeB\x03\xe0\x41\x03\x12\x1a\n\x08type_url\x18\x1e \x01(\tB\x03\xe0\x41\x03H\x04\x88\x01\x01\x12\x1d\n\x0bis_repeated\x18\x1f \x01(\x08\x42\x03\xe0\x41\x03H\x05\x88\x01\x01:P\xea\x41M\n\'googleads.googleapis.com/GoogleAdsField\x12\"googleAdsFields/{google_ads_field}B\x07\n\x05_nameB\r\n\x0b_selectableB\r\n\x0b_filterableB\x0b\n\t_sortableB\x0b\n\t_type_urlB\x0e\n\x0c_is_repeatedB\x85\x02\n&com.google.ads.googleads.v25.resourcesB\x13GoogleAdsFieldProtoP\x01ZKgoogle.golang.org/genproto/googleapis/ads/googleads/v25/resources;resources\xa2\x02\x03GAA\xaa\x02\"Google.Ads.GoogleAds.V25.Resources\xca\x02\"Google\\Ads\\GoogleAds\\V25\\Resources\xea\x02&Google::Ads::GoogleAds::V25::Resourcesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Resources + GoogleAdsField = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.GoogleAdsField").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/resources/group_content_suitability_placement_view_pb.rb b/lib/google/ads/google_ads/v25/resources/group_content_suitability_placement_view_pb.rb new file mode 100644 index 000000000..464b11d61 --- /dev/null +++ b/lib/google/ads/google_ads/v25/resources/group_content_suitability_placement_view_pb.rb @@ -0,0 +1,27 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/resources/group_content_suitability_placement_view.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/enums/placement_type_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' + + +descriptor_data = "\nQgoogle/ads/googleads/v25/resources/group_content_suitability_placement_view.proto\x12\"google.ads.googleads.v25.resources\x1a\x33google/ads/googleads/v25/enums/placement_type.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\x98\x04\n$GroupContentSuitabilityPlacementView\x12\\\n\rresource_name\x18\x01 \x01(\tBE\xe0\x41\x03\xfa\x41?\n=googleads.googleapis.com/GroupContentSuitabilityPlacementView\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x16\n\tplacement\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\\\n\x0eplacement_type\x18\x04 \x01(\x0e\x32?.google.ads.googleads.v25.enums.PlacementTypeEnum.PlacementTypeB\x03\xe0\x41\x03\x12\x17\n\ntarget_url\x18\x05 \x01(\tB\x03\xe0\x41\x03:\xe7\x01\xea\x41\xe3\x01\n=googleads.googleapis.com/GroupContentSuitabilityPlacementView\x12Ucustomers/{customer_id}/groupContentSuitabilityPlacementViews/{placement_fingerprint}*%groupContentSuitabilityPlacementViews2$groupContentSuitabilityPlacementViewB\x9b\x02\n&com.google.ads.googleads.v25.resourcesB)GroupContentSuitabilityPlacementViewProtoP\x01ZKgoogle.golang.org/genproto/googleapis/ads/googleads/v25/resources;resources\xa2\x02\x03GAA\xaa\x02\"Google.Ads.GoogleAds.V25.Resources\xca\x02\"Google\\Ads\\GoogleAds\\V25\\Resources\xea\x02&Google::Ads::GoogleAds::V25::Resourcesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Resources + GroupContentSuitabilityPlacementView = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.GroupContentSuitabilityPlacementView").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/resources/group_placement_view_pb.rb b/lib/google/ads/google_ads/v25/resources/group_placement_view_pb.rb new file mode 100644 index 000000000..3c8759fd3 --- /dev/null +++ b/lib/google/ads/google_ads/v25/resources/group_placement_view_pb.rb @@ -0,0 +1,27 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/resources/group_placement_view.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/enums/placement_type_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' + + +descriptor_data = "\n=google/ads/googleads/v25/resources/group_placement_view.proto\x12\"google.ads.googleads.v25.resources\x1a\x33google/ads/googleads/v25/enums/placement_type.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\xc7\x03\n\x12GroupPlacementView\x12J\n\rresource_name\x18\x01 \x01(\tB3\xe0\x41\x03\xfa\x41-\n+googleads.googleapis.com/GroupPlacementView\x12\x1b\n\tplacement\x18\x06 \x01(\tB\x03\xe0\x41\x03H\x00\x88\x01\x01\x12\x1e\n\x0c\x64isplay_name\x18\x07 \x01(\tB\x03\xe0\x41\x03H\x01\x88\x01\x01\x12\x1c\n\ntarget_url\x18\x08 \x01(\tB\x03\xe0\x41\x03H\x02\x88\x01\x01\x12\\\n\x0eplacement_type\x18\x05 \x01(\x0e\x32?.google.ads.googleads.v25.enums.PlacementTypeEnum.PlacementTypeB\x03\xe0\x41\x03:~\xea\x41{\n+googleads.googleapis.com/GroupPlacementView\x12Lcustomers/{customer_id}/groupPlacementViews/{ad_group_id}~{base64_placement}B\x0c\n\n_placementB\x0f\n\r_display_nameB\r\n\x0b_target_urlB\x89\x02\n&com.google.ads.googleads.v25.resourcesB\x17GroupPlacementViewProtoP\x01ZKgoogle.golang.org/genproto/googleapis/ads/googleads/v25/resources;resources\xa2\x02\x03GAA\xaa\x02\"Google.Ads.GoogleAds.V25.Resources\xca\x02\"Google\\Ads\\GoogleAds\\V25\\Resources\xea\x02&Google::Ads::GoogleAds::V25::Resourcesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Resources + GroupPlacementView = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.GroupPlacementView").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/resources/hotel_group_view_pb.rb b/lib/google/ads/google_ads/v25/resources/hotel_group_view_pb.rb new file mode 100644 index 000000000..095d445a5 --- /dev/null +++ b/lib/google/ads/google_ads/v25/resources/hotel_group_view_pb.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/resources/hotel_group_view.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' + + +descriptor_data = "\n9google/ads/googleads/v25/resources/hotel_group_view.proto\x12\"google.ads.googleads.v25.resources\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\xcc\x01\n\x0eHotelGroupView\x12\x46\n\rresource_name\x18\x01 \x01(\tB/\xe0\x41\x03\xfa\x41)\n\'googleads.googleapis.com/HotelGroupView:r\xea\x41o\n\'googleads.googleapis.com/HotelGroupView\x12\x44\x63ustomers/{customer_id}/hotelGroupViews/{ad_group_id}~{criterion_id}B\x85\x02\n&com.google.ads.googleads.v25.resourcesB\x13HotelGroupViewProtoP\x01ZKgoogle.golang.org/genproto/googleapis/ads/googleads/v25/resources;resources\xa2\x02\x03GAA\xaa\x02\"Google.Ads.GoogleAds.V25.Resources\xca\x02\"Google\\Ads\\GoogleAds\\V25\\Resources\xea\x02&Google::Ads::GoogleAds::V25::Resourcesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Resources + HotelGroupView = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.HotelGroupView").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/resources/hotel_performance_view_pb.rb b/lib/google/ads/google_ads/v25/resources/hotel_performance_view_pb.rb new file mode 100644 index 000000000..35ae551dc --- /dev/null +++ b/lib/google/ads/google_ads/v25/resources/hotel_performance_view_pb.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/resources/hotel_performance_view.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' + + +descriptor_data = "\n?google/ads/googleads/v25/resources/hotel_performance_view.proto\x12\"google.ads.googleads.v25.resources\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\xc6\x01\n\x14HotelPerformanceView\x12L\n\rresource_name\x18\x01 \x01(\tB5\xe0\x41\x03\xfa\x41/\n-googleads.googleapis.com/HotelPerformanceView:`\xea\x41]\n-googleads.googleapis.com/HotelPerformanceView\x12,customers/{customer_id}/hotelPerformanceViewB\x8b\x02\n&com.google.ads.googleads.v25.resourcesB\x19HotelPerformanceViewProtoP\x01ZKgoogle.golang.org/genproto/googleapis/ads/googleads/v25/resources;resources\xa2\x02\x03GAA\xaa\x02\"Google.Ads.GoogleAds.V25.Resources\xca\x02\"Google\\Ads\\GoogleAds\\V25\\Resources\xea\x02&Google::Ads::GoogleAds::V25::Resourcesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Resources + HotelPerformanceView = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.HotelPerformanceView").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/resources/hotel_reconciliation_pb.rb b/lib/google/ads/google_ads/v25/resources/hotel_reconciliation_pb.rb new file mode 100644 index 000000000..60c8290e3 --- /dev/null +++ b/lib/google/ads/google_ads/v25/resources/hotel_reconciliation_pb.rb @@ -0,0 +1,27 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/resources/hotel_reconciliation.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/enums/hotel_reconciliation_status_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' + + +descriptor_data = "\n=google/ads/googleads/v25/resources/hotel_reconciliation.proto\x12\"google.ads.googleads.v25.resources\x1a@google/ads/googleads/v25/enums/hotel_reconciliation_status.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\xe3\x04\n\x13HotelReconciliation\x12K\n\rresource_name\x18\x01 \x01(\tB4\xe0\x41\x05\xfa\x41.\n,googleads.googleapis.com/HotelReconciliation\x12\x1d\n\rcommission_id\x18\x02 \x01(\tB\x06\xe0\x41\x02\xe0\x41\x03\x12\x15\n\x08order_id\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12;\n\x08\x63\x61mpaign\x18\x0b \x01(\tB)\xe0\x41\x03\xfa\x41#\n!googleads.googleapis.com/Campaign\x12\x1c\n\x0fhotel_center_id\x18\x04 \x01(\x03\x42\x03\xe0\x41\x03\x12\x15\n\x08hotel_id\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12\x1a\n\rcheck_in_date\x18\x06 \x01(\tB\x03\xe0\x41\x03\x12\x1b\n\x0e\x63heck_out_date\x18\x07 \x01(\tB\x03\xe0\x41\x03\x12\'\n\x17reconciled_value_micros\x18\x08 \x01(\x03\x42\x06\xe0\x41\x02\xe0\x41\x03\x12\x13\n\x06\x62illed\x18\t \x01(\x08\x42\x03\xe0\x41\x03\x12o\n\x06status\x18\n \x01(\x0e\x32W.google.ads.googleads.v25.enums.HotelReconciliationStatusEnum.HotelReconciliationStatusB\x06\xe0\x41\x02\xe0\x41\x03:o\xea\x41l\n,googleads.googleapis.com/HotelReconciliation\x12\n,excess_credit_adjustment_total_amount_micros\x18\n \x01(\x03\x42\x03\xe0\x41\x03H\t\x88\x01\x01\x12\x39\n\'regulatory_costs_subtotal_amount_micros\x18\x0b \x01(\x03\x42\x03\xe0\x41\x03H\n\x88\x01\x01\x12\x34\n\"regulatory_costs_tax_amount_micros\x18\x0c \x01(\x03\x42\x03\xe0\x41\x03H\x0b\x88\x01\x01\x12\x36\n$regulatory_costs_total_amount_micros\x18\r \x01(\x03\x42\x03\xe0\x41\x03H\x0c\x88\x01\x01\x12\x36\n$export_charge_subtotal_amount_micros\x18\x11 \x01(\x03\x42\x03\xe0\x41\x03H\r\x88\x01\x01\x12\x31\n\x1f\x65xport_charge_tax_amount_micros\x18\x12 \x01(\x03\x42\x03\xe0\x41\x03H\x0e\x88\x01\x01\x12\x33\n!export_charge_total_amount_micros\x18\x13 \x01(\x03\x42\x03\xe0\x41\x03H\x0f\x88\x01\x01\x12(\n\x16subtotal_amount_micros\x18\x0e \x01(\x03\x42\x03\xe0\x41\x03H\x10\x88\x01\x01\x12#\n\x11tax_amount_micros\x18\x0f \x01(\x03\x42\x03\xe0\x41\x03H\x11\x88\x01\x01\x12%\n\x13total_amount_micros\x18\x10 \x01(\x03\x42\x03\xe0\x41\x03H\x12\x88\x01\x01\x12i\n\x19regulatory_cost_summaries\x18\x14 \x03(\x0b\x32\x41.google.ads.googleads.v25.resources.Invoice.RegulatoryCostSummaryB\x03\xe0\x41\x03\x12`\n\x14\x61\x64justment_summaries\x18\x15 \x03(\x0b\x32=.google.ads.googleads.v25.resources.Invoice.AdjustmentSummaryB\x03\xe0\x41\x03\x42\x0b\n\t_customerB,\n*_billing_correction_subtotal_amount_microsB\'\n%_billing_correction_tax_amount_microsB)\n\'_billing_correction_total_amount_microsB+\n)_coupon_adjustment_subtotal_amount_microsB&\n$_coupon_adjustment_tax_amount_microsB(\n&_coupon_adjustment_total_amount_microsB2\n0_excess_credit_adjustment_subtotal_amount_microsB-\n+_excess_credit_adjustment_tax_amount_microsB/\n-_excess_credit_adjustment_total_amount_microsB*\n(_regulatory_costs_subtotal_amount_microsB%\n#_regulatory_costs_tax_amount_microsB\'\n%_regulatory_costs_total_amount_microsB\'\n%_export_charge_subtotal_amount_microsB\"\n _export_charge_tax_amount_microsB$\n\"_export_charge_total_amount_microsB\x19\n\x17_subtotal_amount_microsB\x14\n\x12_tax_amount_microsB\x16\n\x14_total_amount_micros\x1a\xc6\x08\n\x14\x41\x63\x63ountBudgetSummary\x12\x1a\n\x08\x63ustomer\x18\n \x01(\tB\x03\xe0\x41\x03H\x00\x88\x01\x01\x12+\n\x19\x63ustomer_descriptive_name\x18\x0b \x01(\tB\x03\xe0\x41\x03H\x01\x88\x01\x01\x12 \n\x0e\x61\x63\x63ount_budget\x18\x0c \x01(\tB\x03\xe0\x41\x03H\x02\x88\x01\x01\x12%\n\x13\x61\x63\x63ount_budget_name\x18\r \x01(\tB\x03\xe0\x41\x03H\x03\x88\x01\x01\x12\'\n\x15purchase_order_number\x18\x0e \x01(\tB\x03\xe0\x41\x03H\x04\x88\x01\x01\x12(\n\x16subtotal_amount_micros\x18\x0f \x01(\x03\x42\x03\xe0\x41\x03H\x05\x88\x01\x01\x12#\n\x11tax_amount_micros\x18\x10 \x01(\x03\x42\x03\xe0\x41\x03H\x06\x88\x01\x01\x12%\n\x13total_amount_micros\x18\x11 \x01(\x03\x42\x03\xe0\x41\x03H\x07\x88\x01\x01\x12U\n\x1c\x62illable_activity_date_range\x18\t \x01(\x0b\x32*.google.ads.googleads.v25.common.DateRangeB\x03\xe0\x41\x03\x12&\n\x14served_amount_micros\x18\x12 \x01(\x03\x42\x03\xe0\x41\x03H\x08\x88\x01\x01\x12&\n\x14\x62illed_amount_micros\x18\x13 \x01(\x03\x42\x03\xe0\x41\x03H\t\x88\x01\x01\x12,\n\x1aoverdelivery_amount_micros\x18\x14 \x01(\x03\x42\x03\xe0\x41\x03H\n\x88\x01\x01\x12\x30\n\x1einvalid_activity_amount_micros\x18\x15 \x01(\x03\x42\x03\xe0\x41\x03H\x0b\x88\x01\x01\x12k\n\x1ainvalid_activity_summaries\x18\x16 \x03(\x0b\x32\x42.google.ads.googleads.v25.resources.Invoice.InvalidActivitySummaryB\x03\xe0\x41\x03\x12\\\n\x12\x63\x61mpaign_summaries\x18\x17 \x03(\x0b\x32;.google.ads.googleads.v25.resources.Invoice.CampaignSummaryB\x03\xe0\x41\x03\x42\x0b\n\t_customerB\x1c\n\x1a_customer_descriptive_nameB\x11\n\x0f_account_budgetB\x16\n\x14_account_budget_nameB\x18\n\x16_purchase_order_numberB\x19\n\x17_subtotal_amount_microsB\x14\n\x12_tax_amount_microsB\x16\n\x14_total_amount_microsB\x17\n\x15_served_amount_microsB\x17\n\x15_billed_amount_microsB\x1d\n\x1b_overdelivery_amount_microsB!\n\x1f_invalid_activity_amount_micros\x1a\x81\x04\n\x16InvalidActivitySummary\x12h\n\x19original_month_of_service\x18\x01 \x01(\x0e\x32;.google.ads.googleads.v25.enums.MonthOfYearEnum.MonthOfYearB\x03\xe0\x41\x03H\x00\x88\x01\x01\x12*\n\x18original_year_of_service\x18\x02 \x01(\tB\x03\xe0\x41\x03H\x01\x88\x01\x01\x12%\n\x13original_invoice_id\x18\x03 \x01(\tB\x03\xe0\x41\x03H\x02\x88\x01\x01\x12.\n\x1coriginal_account_budget_name\x18\x04 \x01(\tB\x03\xe0\x41\x03H\x03\x88\x01\x01\x12\x30\n\x1eoriginal_purchase_order_number\x18\x05 \x01(\tB\x03\xe0\x41\x03H\x04\x88\x01\x01\x12\x1f\n\ramount_micros\x18\x06 \x01(\x03\x42\x03\xe0\x41\x03H\x05\x88\x01\x01\x42\x1c\n\x1a_original_month_of_serviceB\x1b\n\x19_original_year_of_serviceB\x16\n\x14_original_invoice_idB\x1f\n\x1d_original_account_budget_nameB!\n\x1f_original_purchase_order_numberB\x10\n\x0e_amount_micros\x1a\xa6\x02\n\x0f\x43\x61mpaignSummary\x12&\n\x14\x63\x61mpaign_description\x18\x01 \x01(\tB\x03\xe0\x41\x03H\x00\x88\x01\x01\x12\x1a\n\x08quantity\x18\x02 \x01(\x03\x42\x03\xe0\x41\x03H\x01\x88\x01\x01\x12\x62\n\x0funit_of_measure\x18\x03 \x01(\x0e\x32?.google.ads.googleads.v25.enums.UnitOfMeasureEnum.UnitOfMeasureB\x03\xe0\x41\x03H\x02\x88\x01\x01\x12\x1f\n\ramount_micros\x18\x04 \x01(\x03\x42\x03\xe0\x41\x03H\x03\x88\x01\x01\x42\x17\n\x15_campaign_descriptionB\x0b\n\t_quantityB\x12\n\x10_unit_of_measureB\x10\n\x0e_amount_micros\x1a\xd2\x01\n\x15RegulatoryCostSummary\x12n\n\x13regulatory_fee_type\x18\x01 \x01(\x0e\x32G.google.ads.googleads.v25.enums.RegulatoryFeeTypeEnum.RegulatoryFeeTypeB\x03\xe0\x41\x03H\x00\x88\x01\x01\x12\x1f\n\ramount_micros\x18\x02 \x01(\x03\x42\x03\xe0\x41\x03H\x01\x88\x01\x01\x42\x16\n\x14_regulatory_fee_typeB\x10\n\x0e_amount_micros\x1a\x8b\x01\n\x11\x41\x64justmentSummary\x12(\n\x16\x61\x64justment_description\x18\x01 \x01(\tB\x03\xe0\x41\x03H\x00\x88\x01\x01\x12\x1f\n\ramount_micros\x18\x02 \x01(\x03\x42\x03\xe0\x41\x03H\x01\x88\x01\x01\x42\x19\n\x17_adjustment_descriptionB\x10\n\x0e_amount_micros:T\xea\x41Q\n googleads.googleapis.com/Invoice\x12-customers/{customer_id}/invoices/{invoice_id}B\x05\n\x03_idB\x10\n\x0e_billing_setupB\x16\n\x14_payments_account_idB\x16\n\x14_payments_profile_idB\r\n\x0b_issue_dateB\x0b\n\t_due_dateB\x10\n\x0e_currency_codeB\'\n%_export_charge_subtotal_amount_microsB\"\n _export_charge_tax_amount_microsB$\n\"_export_charge_total_amount_microsB\x19\n\x17_subtotal_amount_microsB\x14\n\x12_tax_amount_microsB\x16\n\x14_total_amount_microsB\x14\n\x12_corrected_invoiceB\n\n\x08_pdf_urlB\xfe\x01\n&com.google.ads.googleads.v25.resourcesB\x0cInvoiceProtoP\x01ZKgoogle.golang.org/genproto/googleapis/ads/googleads/v25/resources;resources\xa2\x02\x03GAA\xaa\x02\"Google.Ads.GoogleAds.V25.Resources\xca\x02\"Google\\Ads\\GoogleAds\\V25\\Resources\xea\x02&Google::Ads::GoogleAds::V25::Resourcesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Resources + Invoice = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.Invoice").msgclass + Invoice::AccountSummary = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.Invoice.AccountSummary").msgclass + Invoice::AccountBudgetSummary = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.Invoice.AccountBudgetSummary").msgclass + Invoice::InvalidActivitySummary = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.Invoice.InvalidActivitySummary").msgclass + Invoice::CampaignSummary = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.Invoice.CampaignSummary").msgclass + Invoice::RegulatoryCostSummary = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.Invoice.RegulatoryCostSummary").msgclass + Invoice::AdjustmentSummary = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.Invoice.AdjustmentSummary").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/resources/keyword_plan_ad_group_keyword_pb.rb b/lib/google/ads/google_ads/v25/resources/keyword_plan_ad_group_keyword_pb.rb new file mode 100644 index 000000000..732ea1832 --- /dev/null +++ b/lib/google/ads/google_ads/v25/resources/keyword_plan_ad_group_keyword_pb.rb @@ -0,0 +1,27 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/resources/keyword_plan_ad_group_keyword.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/enums/keyword_match_type_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' + + +descriptor_data = "\nFgoogle/ads/googleads/v25/resources/keyword_plan_ad_group_keyword.proto\x12\"google.ads.googleads.v25.resources\x1a\x37google/ads/googleads/v25/enums/keyword_match_type.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\xdd\x04\n\x19KeywordPlanAdGroupKeyword\x12Q\n\rresource_name\x18\x01 \x01(\tB:\xe0\x41\x05\xfa\x41\x34\n2googleads.googleapis.com/KeywordPlanAdGroupKeyword\x12T\n\x15keyword_plan_ad_group\x18\x08 \x01(\tB0\xfa\x41-\n+googleads.googleapis.com/KeywordPlanAdGroupH\x00\x88\x01\x01\x12\x14\n\x02id\x18\t \x01(\x03\x42\x03\xe0\x41\x03H\x01\x88\x01\x01\x12\x11\n\x04text\x18\n \x01(\tH\x02\x88\x01\x01\x12Y\n\nmatch_type\x18\x05 \x01(\x0e\x32\x45.google.ads.googleads.v25.enums.KeywordMatchTypeEnum.KeywordMatchType\x12\x1b\n\x0e\x63pc_bid_micros\x18\x0b \x01(\x03H\x03\x88\x01\x01\x12\x1a\n\x08negative\x18\x0c \x01(\x08\x42\x03\xe0\x41\x05H\x04\x88\x01\x01:\x8f\x01\xea\x41\x8b\x01\n2googleads.googleapis.com/KeywordPlanAdGroupKeyword\x12Ucustomers/{customer_id}/keywordPlanAdGroupKeywords/{keyword_plan_ad_group_keyword_id}B\x18\n\x16_keyword_plan_ad_groupB\x05\n\x03_idB\x07\n\x05_textB\x11\n\x0f_cpc_bid_microsB\x0b\n\t_negativeB\x90\x02\n&com.google.ads.googleads.v25.resourcesB\x1eKeywordPlanAdGroupKeywordProtoP\x01ZKgoogle.golang.org/genproto/googleapis/ads/googleads/v25/resources;resources\xa2\x02\x03GAA\xaa\x02\"Google.Ads.GoogleAds.V25.Resources\xca\x02\"Google\\Ads\\GoogleAds\\V25\\Resources\xea\x02&Google::Ads::GoogleAds::V25::Resourcesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Resources + KeywordPlanAdGroupKeyword = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.KeywordPlanAdGroupKeyword").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/resources/keyword_plan_ad_group_pb.rb b/lib/google/ads/google_ads/v25/resources/keyword_plan_ad_group_pb.rb new file mode 100644 index 000000000..47a23d9c2 --- /dev/null +++ b/lib/google/ads/google_ads/v25/resources/keyword_plan_ad_group_pb.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/resources/keyword_plan_ad_group.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' + + +descriptor_data = "\n>google/ads/googleads/v25/resources/keyword_plan_ad_group.proto\x12\"google.ads.googleads.v25.resources\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\xb4\x03\n\x12KeywordPlanAdGroup\x12J\n\rresource_name\x18\x01 \x01(\tB3\xe0\x41\x05\xfa\x41-\n+googleads.googleapis.com/KeywordPlanAdGroup\x12U\n\x15keyword_plan_campaign\x18\x06 \x01(\tB1\xfa\x41.\n,googleads.googleapis.com/KeywordPlanCampaignH\x00\x88\x01\x01\x12\x14\n\x02id\x18\x07 \x01(\x03\x42\x03\xe0\x41\x03H\x01\x88\x01\x01\x12\x11\n\x04name\x18\x08 \x01(\tH\x02\x88\x01\x01\x12\x1b\n\x0e\x63pc_bid_micros\x18\t \x01(\x03H\x03\x88\x01\x01:x\xea\x41u\n+googleads.googleapis.com/KeywordPlanAdGroup\x12\x46\x63ustomers/{customer_id}/keywordPlanAdGroups/{keyword_plan_ad_group_id}B\x18\n\x16_keyword_plan_campaignB\x05\n\x03_idB\x07\n\x05_nameB\x11\n\x0f_cpc_bid_microsB\x89\x02\n&com.google.ads.googleads.v25.resourcesB\x17KeywordPlanAdGroupProtoP\x01ZKgoogle.golang.org/genproto/googleapis/ads/googleads/v25/resources;resources\xa2\x02\x03GAA\xaa\x02\"Google.Ads.GoogleAds.V25.Resources\xca\x02\"Google\\Ads\\GoogleAds\\V25\\Resources\xea\x02&Google::Ads::GoogleAds::V25::Resourcesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Resources + KeywordPlanAdGroup = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.KeywordPlanAdGroup").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/resources/keyword_plan_campaign_keyword_pb.rb b/lib/google/ads/google_ads/v25/resources/keyword_plan_campaign_keyword_pb.rb new file mode 100644 index 000000000..019ae83ae --- /dev/null +++ b/lib/google/ads/google_ads/v25/resources/keyword_plan_campaign_keyword_pb.rb @@ -0,0 +1,27 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/resources/keyword_plan_campaign_keyword.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/enums/keyword_match_type_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' + + +descriptor_data = "\nFgoogle/ads/googleads/v25/resources/keyword_plan_campaign_keyword.proto\x12\"google.ads.googleads.v25.resources\x1a\x37google/ads/googleads/v25/enums/keyword_match_type.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\xb2\x04\n\x1aKeywordPlanCampaignKeyword\x12R\n\rresource_name\x18\x01 \x01(\tB;\xe0\x41\x05\xfa\x41\x35\n3googleads.googleapis.com/KeywordPlanCampaignKeyword\x12U\n\x15keyword_plan_campaign\x18\x08 \x01(\tB1\xfa\x41.\n,googleads.googleapis.com/KeywordPlanCampaignH\x00\x88\x01\x01\x12\x14\n\x02id\x18\t \x01(\x03\x42\x03\xe0\x41\x03H\x01\x88\x01\x01\x12\x11\n\x04text\x18\n \x01(\tH\x02\x88\x01\x01\x12Y\n\nmatch_type\x18\x05 \x01(\x0e\x32\x45.google.ads.googleads.v25.enums.KeywordMatchTypeEnum.KeywordMatchType\x12\x1a\n\x08negative\x18\x0b \x01(\x08\x42\x03\xe0\x41\x05H\x03\x88\x01\x01:\x91\x01\xea\x41\x8d\x01\n3googleads.googleapis.com/KeywordPlanCampaignKeyword\x12Vcustomers/{customer_id}/keywordPlanCampaignKeywords/{keyword_plan_campaign_keyword_id}B\x18\n\x16_keyword_plan_campaignB\x05\n\x03_idB\x07\n\x05_textB\x0b\n\t_negativeB\x91\x02\n&com.google.ads.googleads.v25.resourcesB\x1fKeywordPlanCampaignKeywordProtoP\x01ZKgoogle.golang.org/genproto/googleapis/ads/googleads/v25/resources;resources\xa2\x02\x03GAA\xaa\x02\"Google.Ads.GoogleAds.V25.Resources\xca\x02\"Google\\Ads\\GoogleAds\\V25\\Resources\xea\x02&Google::Ads::GoogleAds::V25::Resourcesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Resources + KeywordPlanCampaignKeyword = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.KeywordPlanCampaignKeyword").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/resources/keyword_plan_campaign_pb.rb b/lib/google/ads/google_ads/v25/resources/keyword_plan_campaign_pb.rb new file mode 100644 index 000000000..a3a67bc8e --- /dev/null +++ b/lib/google/ads/google_ads/v25/resources/keyword_plan_campaign_pb.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/resources/keyword_plan_campaign.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/enums/keyword_plan_network_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' + + +descriptor_data = "\n>google/ads/googleads/v25/resources/keyword_plan_campaign.proto\x12\"google.ads.googleads.v25.resources\x1a\x39google/ads/googleads/v25/enums/keyword_plan_network.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\xa2\x05\n\x13KeywordPlanCampaign\x12K\n\rresource_name\x18\x01 \x01(\tB4\xe0\x41\x05\xfa\x41.\n,googleads.googleapis.com/KeywordPlanCampaign\x12\x44\n\x0ckeyword_plan\x18\t \x01(\tB)\xfa\x41&\n$googleads.googleapis.com/KeywordPlanH\x00\x88\x01\x01\x12\x14\n\x02id\x18\n \x01(\x03\x42\x03\xe0\x41\x03H\x01\x88\x01\x01\x12\x11\n\x04name\x18\x0b \x01(\tH\x02\x88\x01\x01\x12J\n\x12language_constants\x18\x0c \x03(\tB.\xfa\x41+\n)googleads.googleapis.com/LanguageConstant\x12g\n\x14keyword_plan_network\x18\x06 \x01(\x0e\x32I.google.ads.googleads.v25.enums.KeywordPlanNetworkEnum.KeywordPlanNetwork\x12\x1b\n\x0e\x63pc_bid_micros\x18\r \x01(\x03H\x03\x88\x01\x01\x12M\n\x0bgeo_targets\x18\x08 \x03(\x0b\x32\x38.google.ads.googleads.v25.resources.KeywordPlanGeoTarget:z\xea\x41w\n,googleads.googleapis.com/KeywordPlanCampaign\x12Gcustomers/{customer_id}/keywordPlanCampaigns/{keyword_plan_campaign_id}B\x0f\n\r_keyword_planB\x05\n\x03_idB\x07\n\x05_nameB\x11\n\x0f_cpc_bid_micros\"\x81\x01\n\x14KeywordPlanGeoTarget\x12Q\n\x13geo_target_constant\x18\x02 \x01(\tB/\xfa\x41,\n*googleads.googleapis.com/GeoTargetConstantH\x00\x88\x01\x01\x42\x16\n\x14_geo_target_constantB\x8a\x02\n&com.google.ads.googleads.v25.resourcesB\x18KeywordPlanCampaignProtoP\x01ZKgoogle.golang.org/genproto/googleapis/ads/googleads/v25/resources;resources\xa2\x02\x03GAA\xaa\x02\"Google.Ads.GoogleAds.V25.Resources\xca\x02\"Google\\Ads\\GoogleAds\\V25\\Resources\xea\x02&Google::Ads::GoogleAds::V25::Resourcesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Resources + KeywordPlanCampaign = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.KeywordPlanCampaign").msgclass + KeywordPlanGeoTarget = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.KeywordPlanGeoTarget").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/resources/keyword_plan_pb.rb b/lib/google/ads/google_ads/v25/resources/keyword_plan_pb.rb new file mode 100644 index 000000000..ec5ebc479 --- /dev/null +++ b/lib/google/ads/google_ads/v25/resources/keyword_plan_pb.rb @@ -0,0 +1,29 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/resources/keyword_plan.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/common/dates_pb' +require 'google/ads/google_ads/v25/enums/keyword_plan_forecast_interval_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' + + +descriptor_data = "\n5google/ads/googleads/v25/resources/keyword_plan.proto\x12\"google.ads.googleads.v25.resources\x1a+google/ads/googleads/v25/common/dates.proto\x1a\x43google/ads/googleads/v25/enums/keyword_plan_forecast_interval.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\xc6\x02\n\x0bKeywordPlan\x12\x43\n\rresource_name\x18\x01 \x01(\tB,\xe0\x41\x05\xfa\x41&\n$googleads.googleapis.com/KeywordPlan\x12\x14\n\x02id\x18\x05 \x01(\x03\x42\x03\xe0\x41\x03H\x00\x88\x01\x01\x12\x11\n\x04name\x18\x06 \x01(\tH\x01\x88\x01\x01\x12V\n\x0f\x66orecast_period\x18\x04 \x01(\x0b\x32=.google.ads.googleads.v25.resources.KeywordPlanForecastPeriod:a\xea\x41^\n$googleads.googleapis.com/KeywordPlan\x12\x36\x63ustomers/{customer_id}/keywordPlans/{keyword_plan_id}B\x05\n\x03_idB\x07\n\x05_name\"\xdf\x01\n\x19KeywordPlanForecastPeriod\x12t\n\rdate_interval\x18\x01 \x01(\x0e\x32[.google.ads.googleads.v25.enums.KeywordPlanForecastIntervalEnum.KeywordPlanForecastIntervalH\x00\x12@\n\ndate_range\x18\x02 \x01(\x0b\x32*.google.ads.googleads.v25.common.DateRangeH\x00\x42\n\n\x08intervalB\x82\x02\n&com.google.ads.googleads.v25.resourcesB\x10KeywordPlanProtoP\x01ZKgoogle.golang.org/genproto/googleapis/ads/googleads/v25/resources;resources\xa2\x02\x03GAA\xaa\x02\"Google.Ads.GoogleAds.V25.Resources\xca\x02\"Google\\Ads\\GoogleAds\\V25\\Resources\xea\x02&Google::Ads::GoogleAds::V25::Resourcesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Resources + KeywordPlan = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.KeywordPlan").msgclass + KeywordPlanForecastPeriod = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.KeywordPlanForecastPeriod").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/resources/keyword_theme_constant_pb.rb b/lib/google/ads/google_ads/v25/resources/keyword_theme_constant_pb.rb new file mode 100644 index 000000000..f3e20119d --- /dev/null +++ b/lib/google/ads/google_ads/v25/resources/keyword_theme_constant_pb.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/resources/keyword_theme_constant.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' + + +descriptor_data = "\n?google/ads/googleads/v25/resources/keyword_theme_constant.proto\x12\"google.ads.googleads.v25.resources\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\xf4\x02\n\x14KeywordThemeConstant\x12L\n\rresource_name\x18\x01 \x01(\tB5\xe0\x41\x03\xfa\x41/\n-googleads.googleapis.com/KeywordThemeConstant\x12\x1e\n\x0c\x63ountry_code\x18\x02 \x01(\tB\x03\xe0\x41\x03H\x00\x88\x01\x01\x12\x1f\n\rlanguage_code\x18\x03 \x01(\tB\x03\xe0\x41\x03H\x01\x88\x01\x01\x12\x1e\n\x0c\x64isplay_name\x18\x04 \x01(\tB\x03\xe0\x41\x03H\x02\x88\x01\x01:y\xea\x41v\n-googleads.googleapis.com/KeywordThemeConstant\x12\x45keywordThemeConstants/{express_category_id}~{express_sub_category_id}B\x0f\n\r_country_codeB\x10\n\x0e_language_codeB\x0f\n\r_display_nameB\x8b\x02\n&com.google.ads.googleads.v25.resourcesB\x19KeywordThemeConstantProtoP\x01ZKgoogle.golang.org/genproto/googleapis/ads/googleads/v25/resources;resources\xa2\x02\x03GAA\xaa\x02\"Google.Ads.GoogleAds.V25.Resources\xca\x02\"Google\\Ads\\GoogleAds\\V25\\Resources\xea\x02&Google::Ads::GoogleAds::V25::Resourcesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Resources + KeywordThemeConstant = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.KeywordThemeConstant").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/resources/keyword_view_pb.rb b/lib/google/ads/google_ads/v25/resources/keyword_view_pb.rb new file mode 100644 index 000000000..4bec4d111 --- /dev/null +++ b/lib/google/ads/google_ads/v25/resources/keyword_view_pb.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/resources/keyword_view.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' + + +descriptor_data = "\n5google/ads/googleads/v25/resources/keyword_view.proto\x12\"google.ads.googleads.v25.resources\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\xc0\x01\n\x0bKeywordView\x12\x43\n\rresource_name\x18\x01 \x01(\tB,\xe0\x41\x03\xfa\x41&\n$googleads.googleapis.com/KeywordView:l\xea\x41i\n$googleads.googleapis.com/KeywordView\x12\x41\x63ustomers/{customer_id}/keywordViews/{ad_group_id}~{criterion_id}B\x82\x02\n&com.google.ads.googleads.v25.resourcesB\x10KeywordViewProtoP\x01ZKgoogle.golang.org/genproto/googleapis/ads/googleads/v25/resources;resources\xa2\x02\x03GAA\xaa\x02\"Google.Ads.GoogleAds.V25.Resources\xca\x02\"Google\\Ads\\GoogleAds\\V25\\Resources\xea\x02&Google::Ads::GoogleAds::V25::Resourcesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Resources + KeywordView = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.KeywordView").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/resources/label_pb.rb b/lib/google/ads/google_ads/v25/resources/label_pb.rb new file mode 100644 index 000000000..4a8a5198a --- /dev/null +++ b/lib/google/ads/google_ads/v25/resources/label_pb.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/resources/label.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/common/text_label_pb' +require 'google/ads/google_ads/v25/enums/label_status_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' + + +descriptor_data = "\n.google/ads/googleads/v25/resources/label.proto\x12\"google.ads.googleads.v25.resources\x1a\x30google/ads/googleads/v25/common/text_label.proto\x1a\x31google/ads/googleads/v25/enums/label_status.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\xe1\x02\n\x05Label\x12=\n\rresource_name\x18\x01 \x01(\tB&\xe0\x41\x05\xfa\x41 \n\x1egoogleads.googleapis.com/Label\x12\x14\n\x02id\x18\x06 \x01(\x03\x42\x03\xe0\x41\x03H\x00\x88\x01\x01\x12\x11\n\x04name\x18\x07 \x01(\tH\x01\x88\x01\x01\x12P\n\x06status\x18\x04 \x01(\x0e\x32;.google.ads.googleads.v25.enums.LabelStatusEnum.LabelStatusB\x03\xe0\x41\x03\x12>\n\ntext_label\x18\x05 \x01(\x0b\x32*.google.ads.googleads.v25.common.TextLabel:N\xea\x41K\n\x1egoogleads.googleapis.com/Label\x12)customers/{customer_id}/labels/{label_id}B\x05\n\x03_idB\x07\n\x05_nameB\xfc\x01\n&com.google.ads.googleads.v25.resourcesB\nLabelProtoP\x01ZKgoogle.golang.org/genproto/googleapis/ads/googleads/v25/resources;resources\xa2\x02\x03GAA\xaa\x02\"Google.Ads.GoogleAds.V25.Resources\xca\x02\"Google\\Ads\\GoogleAds\\V25\\Resources\xea\x02&Google::Ads::GoogleAds::V25::Resourcesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Resources + Label = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.Label").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/resources/landing_page_view_pb.rb b/lib/google/ads/google_ads/v25/resources/landing_page_view_pb.rb new file mode 100644 index 000000000..888a080ed --- /dev/null +++ b/lib/google/ads/google_ads/v25/resources/landing_page_view_pb.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/resources/landing_page_view.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' + + +descriptor_data = "\n:google/ads/googleads/v25/resources/landing_page_view.proto\x12\"google.ads.googleads.v25.resources\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\x97\x02\n\x0fLandingPageView\x12G\n\rresource_name\x18\x01 \x01(\tB0\xe0\x41\x03\xfa\x41*\n(googleads.googleapis.com/LandingPageView\x12&\n\x14unexpanded_final_url\x18\x03 \x01(\tB\x03\xe0\x41\x03H\x00\x88\x01\x01:z\xea\x41w\n(googleads.googleapis.com/LandingPageView\x12Kcustomers/{customer_id}/landingPageViews/{unexpanded_final_url_fingerprint}B\x17\n\x15_unexpanded_final_urlB\x86\x02\n&com.google.ads.googleads.v25.resourcesB\x14LandingPageViewProtoP\x01ZKgoogle.golang.org/genproto/googleapis/ads/googleads/v25/resources;resources\xa2\x02\x03GAA\xaa\x02\"Google.Ads.GoogleAds.V25.Resources\xca\x02\"Google\\Ads\\GoogleAds\\V25\\Resources\xea\x02&Google::Ads::GoogleAds::V25::Resourcesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Resources + LandingPageView = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.LandingPageView").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/resources/language_constant_pb.rb b/lib/google/ads/google_ads/v25/resources/language_constant_pb.rb new file mode 100644 index 000000000..9b1407eac --- /dev/null +++ b/lib/google/ads/google_ads/v25/resources/language_constant_pb.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/resources/language_constant.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' + + +descriptor_data = "\n:google/ads/googleads/v25/resources/language_constant.proto\x12\"google.ads.googleads.v25.resources\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\xba\x02\n\x10LanguageConstant\x12H\n\rresource_name\x18\x01 \x01(\tB1\xe0\x41\x03\xfa\x41+\n)googleads.googleapis.com/LanguageConstant\x12\x14\n\x02id\x18\x06 \x01(\x03\x42\x03\xe0\x41\x03H\x00\x88\x01\x01\x12\x16\n\x04\x63ode\x18\x07 \x01(\tB\x03\xe0\x41\x03H\x01\x88\x01\x01\x12\x16\n\x04name\x18\x08 \x01(\tB\x03\xe0\x41\x03H\x02\x88\x01\x01\x12\x1c\n\ntargetable\x18\t \x01(\x08\x42\x03\xe0\x41\x03H\x03\x88\x01\x01:P\xea\x41M\n)googleads.googleapis.com/LanguageConstant\x12 languageConstants/{criterion_id}B\x05\n\x03_idB\x07\n\x05_codeB\x07\n\x05_nameB\r\n\x0b_targetableB\x87\x02\n&com.google.ads.googleads.v25.resourcesB\x15LanguageConstantProtoP\x01ZKgoogle.golang.org/genproto/googleapis/ads/googleads/v25/resources;resources\xa2\x02\x03GAA\xaa\x02\"Google.Ads.GoogleAds.V25.Resources\xca\x02\"Google\\Ads\\GoogleAds\\V25\\Resources\xea\x02&Google::Ads::GoogleAds::V25::Resourcesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Resources + LanguageConstant = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.LanguageConstant").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/resources/lead_form_submission_data_pb.rb b/lib/google/ads/google_ads/v25/resources/lead_form_submission_data_pb.rb new file mode 100644 index 000000000..5f05a9d51 --- /dev/null +++ b/lib/google/ads/google_ads/v25/resources/lead_form_submission_data_pb.rb @@ -0,0 +1,29 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/resources/lead_form_submission_data.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/enums/lead_form_field_user_input_type_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' + + +descriptor_data = "\nBgoogle/ads/googleads/v25/resources/lead_form_submission_data.proto\x12\"google.ads.googleads.v25.resources\x1a\x44google/ads/googleads/v25/enums/lead_form_field_user_input_type.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\x83\x06\n\x16LeadFormSubmissionData\x12N\n\rresource_name\x18\x01 \x01(\tB7\xe0\x41\x03\xfa\x41\x31\n/googleads.googleapis.com/LeadFormSubmissionData\x12\x0f\n\x02id\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x35\n\x05\x61sset\x18\x03 \x01(\tB&\xe0\x41\x03\xfa\x41 \n\x1egoogleads.googleapis.com/Asset\x12;\n\x08\x63\x61mpaign\x18\x04 \x01(\tB)\xe0\x41\x03\xfa\x41#\n!googleads.googleapis.com/Campaign\x12\x65\n\x1blead_form_submission_fields\x18\x05 \x03(\x0b\x32;.google.ads.googleads.v25.resources.LeadFormSubmissionFieldB\x03\xe0\x41\x03\x12r\n\"custom_lead_form_submission_fields\x18\n \x03(\x0b\x32\x41.google.ads.googleads.v25.resources.CustomLeadFormSubmissionFieldB\x03\xe0\x41\x03\x12:\n\x08\x61\x64_group\x18\x06 \x01(\tB(\xe0\x41\x03\xfa\x41\"\n googleads.googleapis.com/AdGroup\x12?\n\x0b\x61\x64_group_ad\x18\x07 \x01(\tB*\xe0\x41\x03\xfa\x41$\n\"googleads.googleapis.com/AdGroupAd\x12\x12\n\x05gclid\x18\x08 \x01(\tB\x03\xe0\x41\x03\x12!\n\x14submission_date_time\x18\t \x01(\tB\x03\xe0\x41\x03:\x84\x01\xea\x41\x80\x01\n/googleads.googleapis.com/LeadFormSubmissionData\x12Mcustomers/{customer_id}/leadFormSubmissionData/{lead_form_user_submission_id}\"\xa7\x01\n\x17LeadFormSubmissionField\x12r\n\nfield_type\x18\x01 \x01(\x0e\x32Y.google.ads.googleads.v25.enums.LeadFormFieldUserInputTypeEnum.LeadFormFieldUserInputTypeB\x03\xe0\x41\x03\x12\x18\n\x0b\x66ield_value\x18\x02 \x01(\tB\x03\xe0\x41\x03\"U\n\x1d\x43ustomLeadFormSubmissionField\x12\x1a\n\rquestion_text\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x18\n\x0b\x66ield_value\x18\x02 \x01(\tB\x03\xe0\x41\x03\x42\x8d\x02\n&com.google.ads.googleads.v25.resourcesB\x1bLeadFormSubmissionDataProtoP\x01ZKgoogle.golang.org/genproto/googleapis/ads/googleads/v25/resources;resources\xa2\x02\x03GAA\xaa\x02\"Google.Ads.GoogleAds.V25.Resources\xca\x02\"Google\\Ads\\GoogleAds\\V25\\Resources\xea\x02&Google::Ads::GoogleAds::V25::Resourcesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Resources + LeadFormSubmissionData = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.LeadFormSubmissionData").msgclass + LeadFormSubmissionField = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.LeadFormSubmissionField").msgclass + CustomLeadFormSubmissionField = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.CustomLeadFormSubmissionField").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/resources/life_event_pb.rb b/lib/google/ads/google_ads/v25/resources/life_event_pb.rb new file mode 100644 index 000000000..0bdb79043 --- /dev/null +++ b/lib/google/ads/google_ads/v25/resources/life_event_pb.rb @@ -0,0 +1,27 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/resources/life_event.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/common/criterion_category_availability_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' + + +descriptor_data = "\n3google/ads/googleads/v25/resources/life_event.proto\x12\"google.ads.googleads.v25.resources\x1a\x45google/ads/googleads/v25/common/criterion_category_availability.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\x86\x03\n\tLifeEvent\x12\x41\n\rresource_name\x18\x01 \x01(\tB*\xe0\x41\x03\xfa\x41$\n\"googleads.googleapis.com/LifeEvent\x12\x0f\n\x02id\x18\x02 \x01(\x03\x42\x03\xe0\x41\x03\x12\x11\n\x04name\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12:\n\x06parent\x18\x04 \x01(\tB*\xe0\x41\x03\xfa\x41$\n\"googleads.googleapis.com/LifeEvent\x12\x1c\n\x0flaunched_to_all\x18\x05 \x01(\x08\x42\x03\xe0\x41\x03\x12[\n\x0e\x61vailabilities\x18\x06 \x03(\x0b\x32>.google.ads.googleads.v25.common.CriterionCategoryAvailabilityB\x03\xe0\x41\x03:[\xea\x41X\n\"googleads.googleapis.com/LifeEvent\x12\x32\x63ustomers/{customer_id}/lifeEvents/{life_event_id}B\x80\x02\n&com.google.ads.googleads.v25.resourcesB\x0eLifeEventProtoP\x01ZKgoogle.golang.org/genproto/googleapis/ads/googleads/v25/resources;resources\xa2\x02\x03GAA\xaa\x02\"Google.Ads.GoogleAds.V25.Resources\xca\x02\"Google\\Ads\\GoogleAds\\V25\\Resources\xea\x02&Google::Ads::GoogleAds::V25::Resourcesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Resources + LifeEvent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.LifeEvent").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/resources/local_services_employee_pb.rb b/lib/google/ads/google_ads/v25/resources/local_services_employee_pb.rb new file mode 100644 index 000000000..4a70ed8d8 --- /dev/null +++ b/lib/google/ads/google_ads/v25/resources/local_services_employee_pb.rb @@ -0,0 +1,31 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/resources/local_services_employee.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/enums/local_services_employee_status_pb' +require 'google/ads/google_ads/v25/enums/local_services_employee_type_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' + + +descriptor_data = "\n@google/ads/googleads/v25/resources/local_services_employee.proto\x12\"google.ads.googleads.v25.resources\x1a\x43google/ads/googleads/v25/enums/local_services_employee_status.proto\x1a\x41google/ads/googleads/v25/enums/local_services_employee_type.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\x98\t\n\x15LocalServicesEmployee\x12M\n\rresource_name\x18\x01 \x01(\tB6\xe0\x41\x05\xfa\x41\x30\n.googleads.googleapis.com/LocalServicesEmployee\x12\x14\n\x02id\x18\x02 \x01(\x03\x42\x03\xe0\x41\x03H\x00\x88\x01\x01\x12\x1f\n\x12\x63reation_date_time\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12p\n\x06status\x18\x04 \x01(\x0e\x32[.google.ads.googleads.v25.enums.LocalServicesEmployeeStatusEnum.LocalServicesEmployeeStatusB\x03\xe0\x41\x03\x12j\n\x04type\x18\x05 \x01(\x0e\x32W.google.ads.googleads.v25.enums.LocalServicesEmployeeTypeEnum.LocalServicesEmployeeTypeB\x03\xe0\x41\x03\x12U\n\x12university_degrees\x18\x06 \x03(\x0b\x32\x34.google.ads.googleads.v25.resources.UniversityDegreeB\x03\xe0\x41\x03\x12G\n\x0bresidencies\x18\x07 \x03(\x0b\x32-.google.ads.googleads.v25.resources.ResidencyB\x03\xe0\x41\x03\x12H\n\x0b\x66\x65llowships\x18\x08 \x03(\x0b\x32..google.ads.googleads.v25.resources.FellowshipB\x03\xe0\x41\x03\x12\x1b\n\tjob_title\x18\t \x01(\tB\x03\xe0\x41\x03H\x01\x88\x01\x01\x12)\n\x17year_started_practicing\x18\n \x01(\x05\x42\x03\xe0\x41\x03H\x02\x88\x01\x01\x12\x1d\n\x10languages_spoken\x18\x0b \x03(\tB\x03\xe0\x41\x03\x12\x19\n\x0c\x63\x61tegory_ids\x18\x0c \x03(\tB\x03\xe0\x41\x03\x12-\n\x1bnational_provider_id_number\x18\r \x01(\tB\x03\xe0\x41\x03H\x03\x88\x01\x01\x12\x1f\n\remail_address\x18\x0e \x01(\tB\x03\xe0\x41\x03H\x04\x88\x01\x01\x12\x1c\n\nfirst_name\x18\x0f \x01(\tB\x03\xe0\x41\x03H\x05\x88\x01\x01\x12\x1d\n\x0bmiddle_name\x18\x10 \x01(\tB\x03\xe0\x41\x03H\x06\x88\x01\x01\x12\x1b\n\tlast_name\x18\x11 \x01(\tB\x03\xe0\x41\x03H\x07\x88\x01\x01:u\xea\x41r\n.googleads.googleapis.com/LocalServicesEmployee\x12@customers/{customer_id}/localServicesEmployees/{gls_employee_id}B\x05\n\x03_idB\x0c\n\n_job_titleB\x1a\n\x18_year_started_practicingB\x1e\n\x1c_national_provider_id_numberB\x10\n\x0e_email_addressB\r\n\x0b_first_nameB\x0e\n\x0c_middle_nameB\x0c\n\n_last_name\"\xa7\x01\n\x10UniversityDegree\x12\"\n\x10institution_name\x18\x01 \x01(\tB\x03\xe0\x41\x03H\x00\x88\x01\x01\x12\x18\n\x06\x64\x65gree\x18\x02 \x01(\tB\x03\xe0\x41\x03H\x01\x88\x01\x01\x12!\n\x0fgraduation_year\x18\x03 \x01(\x05\x42\x03\xe0\x41\x03H\x02\x88\x01\x01\x42\x13\n\x11_institution_nameB\t\n\x07_degreeB\x12\n\x10_graduation_year\"{\n\tResidency\x12\"\n\x10institution_name\x18\x01 \x01(\tB\x03\xe0\x41\x03H\x00\x88\x01\x01\x12!\n\x0f\x63ompletion_year\x18\x02 \x01(\x05\x42\x03\xe0\x41\x03H\x01\x88\x01\x01\x42\x13\n\x11_institution_nameB\x12\n\x10_completion_year\"|\n\nFellowship\x12\"\n\x10institution_name\x18\x01 \x01(\tB\x03\xe0\x41\x03H\x00\x88\x01\x01\x12!\n\x0f\x63ompletion_year\x18\x02 \x01(\x05\x42\x03\xe0\x41\x03H\x01\x88\x01\x01\x42\x13\n\x11_institution_nameB\x12\n\x10_completion_yearB\x8c\x02\n&com.google.ads.googleads.v25.resourcesB\x1aLocalServicesEmployeeProtoP\x01ZKgoogle.golang.org/genproto/googleapis/ads/googleads/v25/resources;resources\xa2\x02\x03GAA\xaa\x02\"Google.Ads.GoogleAds.V25.Resources\xca\x02\"Google\\Ads\\GoogleAds\\V25\\Resources\xea\x02&Google::Ads::GoogleAds::V25::Resourcesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Resources + LocalServicesEmployee = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.LocalServicesEmployee").msgclass + UniversityDegree = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.UniversityDegree").msgclass + Residency = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.Residency").msgclass + Fellowship = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.Fellowship").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/resources/local_services_lead_conversation_pb.rb b/lib/google/ads/google_ads/v25/resources/local_services_lead_conversation_pb.rb new file mode 100644 index 000000000..04e8028a4 --- /dev/null +++ b/lib/google/ads/google_ads/v25/resources/local_services_lead_conversation_pb.rb @@ -0,0 +1,30 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/resources/local_services_lead_conversation.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/enums/local_services_conversation_type_pb' +require 'google/ads/google_ads/v25/enums/local_services_participant_type_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' + + +descriptor_data = "\nIgoogle/ads/googleads/v25/resources/local_services_lead_conversation.proto\x12\"google.ads.googleads.v25.resources\x1a\x45google/ads/googleads/v25/enums/local_services_conversation_type.proto\x1a\x44google/ads/googleads/v25/enums/local_services_participant_type.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\xce\x06\n\x1dLocalServicesLeadConversation\x12U\n\rresource_name\x18\x01 \x01(\tB>\xe0\x41\x03\xfa\x41\x38\n6googleads.googleapis.com/LocalServicesLeadConversation\x12\x0f\n\x02id\x18\x02 \x01(\x03\x42\x03\xe0\x41\x03\x12y\n\x14\x63onversation_channel\x18\x03 \x01(\x0e\x32V.google.ads.googleads.v25.enums.LocalServicesLeadConversationTypeEnum.ConversationTypeB\x03\xe0\x41\x03\x12o\n\x10participant_type\x18\x04 \x01(\x0e\x32P.google.ads.googleads.v25.enums.LocalServicesParticipantTypeEnum.ParticipantTypeB\x03\xe0\x41\x03\x12@\n\x04lead\x18\x05 \x01(\tB2\xe0\x41\x03\xfa\x41,\n*googleads.googleapis.com/LocalServicesLead\x12\x1c\n\x0f\x65vent_date_time\x18\x06 \x01(\tB\x03\xe0\x41\x03\x12Z\n\x12phone_call_details\x18\x07 \x01(\x0b\x32\x34.google.ads.googleads.v25.resources.PhoneCallDetailsB\x03\xe0\x41\x03H\x00\x88\x01\x01\x12U\n\x0fmessage_details\x18\x08 \x01(\x0b\x32\x32.google.ads.googleads.v25.resources.MessageDetailsB\x03\xe0\x41\x03H\x01\x88\x01\x01:\x9a\x01\xea\x41\x96\x01\n6googleads.googleapis.com/LocalServicesLeadConversation\x12\\customers/{customer_id}/localServicesLeadConversations/{local_services_lead_conversation_id}B\x15\n\x13_phone_call_detailsB\x12\n\x10_message_details\"V\n\x10PhoneCallDetails\x12!\n\x14\x63\x61ll_duration_millis\x18\x01 \x01(\x03\x42\x03\xe0\x41\x03\x12\x1f\n\x12\x63\x61ll_recording_url\x18\x02 \x01(\tB\x03\xe0\x41\x03\"A\n\x0eMessageDetails\x12\x11\n\x04text\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x1c\n\x0f\x61ttachment_urls\x18\x02 \x03(\tB\x03\xe0\x41\x03\x42\x94\x02\n&com.google.ads.googleads.v25.resourcesB\"LocalServicesLeadConversationProtoP\x01ZKgoogle.golang.org/genproto/googleapis/ads/googleads/v25/resources;resources\xa2\x02\x03GAA\xaa\x02\"Google.Ads.GoogleAds.V25.Resources\xca\x02\"Google\\Ads\\GoogleAds\\V25\\Resources\xea\x02&Google::Ads::GoogleAds::V25::Resourcesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Resources + LocalServicesLeadConversation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.LocalServicesLeadConversation").msgclass + PhoneCallDetails = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.PhoneCallDetails").msgclass + MessageDetails = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.MessageDetails").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/resources/local_services_lead_pb.rb b/lib/google/ads/google_ads/v25/resources/local_services_lead_pb.rb new file mode 100644 index 000000000..2fb607efc --- /dev/null +++ b/lib/google/ads/google_ads/v25/resources/local_services_lead_pb.rb @@ -0,0 +1,32 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/resources/local_services_lead.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/enums/local_services_lead_credit_state_pb' +require 'google/ads/google_ads/v25/enums/local_services_lead_status_pb' +require 'google/ads/google_ads/v25/enums/local_services_lead_type_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' + + +descriptor_data = "\n.google.ads.googleads.v25.common.LocalServicesDocumentReadOnlyB\x03\xe0\x41\x03H\x02\x88\x01\x01\x12&\n\x14\x65xpiration_date_time\x18\x04 \x01(\tB\x03\xe0\x41\x03H\x03\x88\x01\x01\x42\x10\n\x0e_amount_microsB\x13\n\x11_rejection_reasonB\x1e\n\x1c_insurance_document_readonlyB\x17\n\x15_expiration_date_time\"\xf2\x04\n\x1bLicenseVerificationArtifact\x12\x1e\n\x0clicense_type\x18\x01 \x01(\tB\x03\xe0\x41\x03H\x00\x88\x01\x01\x12 \n\x0elicense_number\x18\x02 \x01(\tB\x03\xe0\x41\x03H\x01\x88\x01\x01\x12%\n\x13licensee_first_name\x18\x03 \x01(\tB\x03\xe0\x41\x03H\x02\x88\x01\x01\x12$\n\x12licensee_last_name\x18\x04 \x01(\tB\x03\xe0\x41\x03H\x03\x88\x01\x01\x12\x8f\x01\n\x10rejection_reason\x18\x05 \x01(\x0e\x32k.google.ads.googleads.v25.enums.LocalServicesLicenseRejectionReasonEnum.LocalServicesLicenseRejectionReasonB\x03\xe0\x41\x03H\x04\x88\x01\x01\x12k\n\x19license_document_readonly\x18\x06 \x01(\x0b\x32>.google.ads.googleads.v25.common.LocalServicesDocumentReadOnlyB\x03\xe0\x41\x03H\x05\x88\x01\x01\x12&\n\x14\x65xpiration_date_time\x18\x07 \x01(\tB\x03\xe0\x41\x03H\x06\x88\x01\x01\x42\x0f\n\r_license_typeB\x11\n\x0f_license_numberB\x16\n\x14_licensee_first_nameB\x15\n\x13_licensee_last_nameB\x13\n\x11_rejection_reasonB\x1c\n\x1a_license_document_readonlyB\x17\n\x15_expiration_date_time\"\xb6\x05\n-BusinessRegistrationCheckVerificationArtifact\x12\x94\x01\n\x11registration_type\x18\x03 \x01(\x0e\x32o.google.ads.googleads.v25.enums.LocalServicesBusinessRegistrationTypeEnum.LocalServicesBusinessRegistrationTypeB\x03\xe0\x41\x03H\x01\x88\x01\x01\x12\x1a\n\x08\x63heck_id\x18\x04 \x01(\tB\x03\xe0\x41\x03H\x02\x88\x01\x01\x12\xb4\x01\n\x10rejection_reason\x18\x05 \x01(\x0e\x32\x8f\x01.google.ads.googleads.v25.enums.LocalServicesBusinessRegistrationCheckRejectionReasonEnum.LocalServicesBusinessRegistrationCheckRejectionReasonB\x03\xe0\x41\x03H\x03\x88\x01\x01\x12\x62\n\x13registration_number\x18\x01 \x01(\x0b\x32>.google.ads.googleads.v25.resources.BusinessRegistrationNumberB\x03\xe0\x41\x03H\x00\x12\x66\n\x15registration_document\x18\x02 \x01(\x0b\x32@.google.ads.googleads.v25.resources.BusinessRegistrationDocumentB\x03\xe0\x41\x03H\x00\x42\x17\n\x15\x62usiness_registrationB\x14\n\x12_registration_typeB\x0b\n\t_check_idB\x13\n\x11_rejection_reason\"A\n\x1a\x42usinessRegistrationNumber\x12\x18\n\x06number\x18\x01 \x01(\tB\x03\xe0\x41\x03H\x00\x88\x01\x01\x42\t\n\x07_number\"\x99\x01\n\x1c\x42usinessRegistrationDocument\x12\x63\n\x11\x64ocument_readonly\x18\x01 \x01(\x0b\x32>.google.ads.googleads.v25.common.LocalServicesDocumentReadOnlyB\x03\xe0\x41\x03H\x00\x88\x01\x01\x42\x14\n\x12_document_readonlyB\x98\x02\n&com.google.ads.googleads.v25.resourcesB&LocalServicesVerificationArtifactProtoP\x01ZKgoogle.golang.org/genproto/googleapis/ads/googleads/v25/resources;resources\xa2\x02\x03GAA\xaa\x02\"Google.Ads.GoogleAds.V25.Resources\xca\x02\"Google\\Ads\\GoogleAds\\V25\\Resources\xea\x02&Google::Ads::GoogleAds::V25::Resourcesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Resources + LocalServicesVerificationArtifact = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.LocalServicesVerificationArtifact").msgclass + BackgroundCheckVerificationArtifact = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.BackgroundCheckVerificationArtifact").msgclass + InsuranceVerificationArtifact = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.InsuranceVerificationArtifact").msgclass + LicenseVerificationArtifact = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.LicenseVerificationArtifact").msgclass + BusinessRegistrationCheckVerificationArtifact = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.BusinessRegistrationCheckVerificationArtifact").msgclass + BusinessRegistrationNumber = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.BusinessRegistrationNumber").msgclass + BusinessRegistrationDocument = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.BusinessRegistrationDocument").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/resources/location_interest_view_pb.rb b/lib/google/ads/google_ads/v25/resources/location_interest_view_pb.rb new file mode 100644 index 000000000..a5ee6604d --- /dev/null +++ b/lib/google/ads/google_ads/v25/resources/location_interest_view_pb.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/resources/location_interest_view.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' + + +descriptor_data = "\n?google/ads/googleads/v25/resources/location_interest_view.proto\x12\"google.ads.googleads.v25.resources\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\xa1\x02\n\x14LocationInterestView\x12L\n\rresource_name\x18\x01 \x01(\tB5\xe0\x41\x03\xfa\x41/\n-googleads.googleapis.com/LocationInterestView:\xba\x01\xea\x41\xb6\x01\n-googleads.googleapis.com/LocationInterestView\x12Xcustomers/{customer_id}/locationInterestViews/{campaign_id}~{ad_group_id}~{criterion_id}*\x15locationInterestViews2\x14locationInterestViewB\x8b\x02\n&com.google.ads.googleads.v25.resourcesB\x19LocationInterestViewProtoP\x01ZKgoogle.golang.org/genproto/googleapis/ads/googleads/v25/resources;resources\xa2\x02\x03GAA\xaa\x02\"Google.Ads.GoogleAds.V25.Resources\xca\x02\"Google\\Ads\\GoogleAds\\V25\\Resources\xea\x02&Google::Ads::GoogleAds::V25::Resourcesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Resources + LocationInterestView = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.LocationInterestView").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/resources/location_view_pb.rb b/lib/google/ads/google_ads/v25/resources/location_view_pb.rb new file mode 100644 index 000000000..987c2443f --- /dev/null +++ b/lib/google/ads/google_ads/v25/resources/location_view_pb.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/resources/location_view.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' + + +descriptor_data = "\n6google/ads/googleads/v25/resources/location_view.proto\x12\"google.ads.googleads.v25.resources\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\xc4\x01\n\x0cLocationView\x12\x44\n\rresource_name\x18\x01 \x01(\tB-\xe0\x41\x03\xfa\x41\'\n%googleads.googleapis.com/LocationView:n\xea\x41k\n%googleads.googleapis.com/LocationView\x12\x42\x63ustomers/{customer_id}/locationViews/{campaign_id}~{criterion_id}B\x83\x02\n&com.google.ads.googleads.v25.resourcesB\x11LocationViewProtoP\x01ZKgoogle.golang.org/genproto/googleapis/ads/googleads/v25/resources;resources\xa2\x02\x03GAA\xaa\x02\"Google.Ads.GoogleAds.V25.Resources\xca\x02\"Google\\Ads\\GoogleAds\\V25\\Resources\xea\x02&Google::Ads::GoogleAds::V25::Resourcesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Resources + LocationView = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.LocationView").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/resources/managed_placement_view_pb.rb b/lib/google/ads/google_ads/v25/resources/managed_placement_view_pb.rb new file mode 100644 index 000000000..7185df6f4 --- /dev/null +++ b/lib/google/ads/google_ads/v25/resources/managed_placement_view_pb.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/resources/managed_placement_view.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' + + +descriptor_data = "\n?google/ads/googleads/v25/resources/managed_placement_view.proto\x12\"google.ads.googleads.v25.resources\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\xe4\x01\n\x14ManagedPlacementView\x12L\n\rresource_name\x18\x01 \x01(\tB5\xe0\x41\x03\xfa\x41/\n-googleads.googleapis.com/ManagedPlacementView:~\xea\x41{\n-googleads.googleapis.com/ManagedPlacementView\x12Jcustomers/{customer_id}/managedPlacementViews/{ad_group_id}~{criterion_id}B\x8b\x02\n&com.google.ads.googleads.v25.resourcesB\x19ManagedPlacementViewProtoP\x01ZKgoogle.golang.org/genproto/googleapis/ads/googleads/v25/resources;resources\xa2\x02\x03GAA\xaa\x02\"Google.Ads.GoogleAds.V25.Resources\xca\x02\"Google\\Ads\\GoogleAds\\V25\\Resources\xea\x02&Google::Ads::GoogleAds::V25::Resourcesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Resources + ManagedPlacementView = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.ManagedPlacementView").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/resources/matched_location_interest_view_pb.rb b/lib/google/ads/google_ads/v25/resources/matched_location_interest_view_pb.rb new file mode 100644 index 000000000..24592ebbc --- /dev/null +++ b/lib/google/ads/google_ads/v25/resources/matched_location_interest_view_pb.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/resources/matched_location_interest_view.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' + + +descriptor_data = "\nGgoogle/ads/googleads/v25/resources/matched_location_interest_view.proto\x12\"google.ads.googleads.v25.resources\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\xb7\x02\n\x1bMatchedLocationInterestView\x12S\n\rresource_name\x18\x01 \x01(\tB<\xe0\x41\x03\xfa\x41\x36\n4googleads.googleapis.com/MatchedLocationInterestView:\xc2\x01\xea\x41\xbe\x01\n4googleads.googleapis.com/MatchedLocationInterestView\x12Kcustomers/{customer_id}/matchedLocationInterestViews/{country_criterion_id}*\x1cmatchedLocationInterestViews2\x1bmatchedLocationInterestViewB\x92\x02\n&com.google.ads.googleads.v25.resourcesB MatchedLocationInterestViewProtoP\x01ZKgoogle.golang.org/genproto/googleapis/ads/googleads/v25/resources;resources\xa2\x02\x03GAA\xaa\x02\"Google.Ads.GoogleAds.V25.Resources\xca\x02\"Google\\Ads\\GoogleAds\\V25\\Resources\xea\x02&Google::Ads::GoogleAds::V25::Resourcesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Resources + MatchedLocationInterestView = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.MatchedLocationInterestView").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/resources/media_file_pb.rb b/lib/google/ads/google_ads/v25/resources/media_file_pb.rb new file mode 100644 index 000000000..5911e517b --- /dev/null +++ b/lib/google/ads/google_ads/v25/resources/media_file_pb.rb @@ -0,0 +1,32 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/resources/media_file.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/enums/media_type_pb' +require 'google/ads/google_ads/v25/enums/mime_type_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' + + +descriptor_data = "\n3google/ads/googleads/v25/resources/media_file.proto\x12\"google.ads.googleads.v25.resources\x1a/google/ads/googleads/v25/enums/media_type.proto\x1a.google/ads/googleads/v25/enums/mime_type.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\x89\x06\n\tMediaFile\x12\x41\n\rresource_name\x18\x01 \x01(\tB*\xe0\x41\x05\xfa\x41$\n\"googleads.googleapis.com/MediaFile\x12\x14\n\x02id\x18\x0c \x01(\x03\x42\x03\xe0\x41\x03H\x01\x88\x01\x01\x12J\n\x04type\x18\x05 \x01(\x0e\x32\x37.google.ads.googleads.v25.enums.MediaTypeEnum.MediaTypeB\x03\xe0\x41\x05\x12M\n\tmime_type\x18\x06 \x01(\x0e\x32\x35.google.ads.googleads.v25.enums.MimeTypeEnum.MimeTypeB\x03\xe0\x41\x03\x12\x1c\n\nsource_url\x18\r \x01(\tB\x03\xe0\x41\x05H\x02\x88\x01\x01\x12\x16\n\x04name\x18\x0e \x01(\tB\x03\xe0\x41\x05H\x03\x88\x01\x01\x12\x1b\n\tfile_size\x18\x0f \x01(\x03\x42\x03\xe0\x41\x03H\x04\x88\x01\x01\x12\x44\n\x05image\x18\x03 \x01(\x0b\x32..google.ads.googleads.v25.resources.MediaImageB\x03\xe0\x41\x05H\x00\x12L\n\x0cmedia_bundle\x18\x04 \x01(\x0b\x32/.google.ads.googleads.v25.resources.MediaBundleB\x03\xe0\x41\x05H\x00\x12\x44\n\x05\x61udio\x18\n \x01(\x0b\x32..google.ads.googleads.v25.resources.MediaAudioB\x03\xe0\x41\x03H\x00\x12\x44\n\x05video\x18\x0b \x01(\x0b\x32..google.ads.googleads.v25.resources.MediaVideoB\x03\xe0\x41\x05H\x00:[\xea\x41X\n\"googleads.googleapis.com/MediaFile\x12\x32\x63ustomers/{customer_id}/mediaFiles/{media_file_id}B\x0b\n\tmediatypeB\x05\n\x03_idB\r\n\x0b_source_urlB\x07\n\x05_nameB\x0c\n\n_file_size\"\xb1\x01\n\nMediaImage\x12\x16\n\x04\x64\x61ta\x18\x04 \x01(\x0c\x42\x03\xe0\x41\x05H\x00\x88\x01\x01\x12%\n\x13\x66ull_size_image_url\x18\x02 \x01(\tB\x03\xe0\x41\x03H\x01\x88\x01\x01\x12(\n\x16preview_size_image_url\x18\x03 \x01(\tB\x03\xe0\x41\x03H\x02\x88\x01\x01\x42\x07\n\x05_dataB\x16\n\x14_full_size_image_urlB\x19\n\x17_preview_size_image_url\"M\n\x0bMediaBundle\x12\x16\n\x04\x64\x61ta\x18\x03 \x01(\x0c\x42\x03\xe0\x41\x05H\x00\x88\x01\x01\x12\x15\n\x03url\x18\x02 \x01(\tB\x03\xe0\x41\x03H\x01\x88\x01\x01\x42\x07\n\x05_dataB\x06\n\x04_url\"I\n\nMediaAudio\x12$\n\x12\x61\x64_duration_millis\x18\x02 \x01(\x03\x42\x03\xe0\x41\x03H\x00\x88\x01\x01\x42\x15\n\x13_ad_duration_millis\"\xec\x01\n\nMediaVideo\x12$\n\x12\x61\x64_duration_millis\x18\x05 \x01(\x03\x42\x03\xe0\x41\x03H\x00\x88\x01\x01\x12\"\n\x10youtube_video_id\x18\x06 \x01(\tB\x03\xe0\x41\x05H\x01\x88\x01\x01\x12%\n\x13\x61\x64vertising_id_code\x18\x07 \x01(\tB\x03\xe0\x41\x03H\x02\x88\x01\x01\x12\x1b\n\tisci_code\x18\x08 \x01(\tB\x03\xe0\x41\x03H\x03\x88\x01\x01\x42\x15\n\x13_ad_duration_millisB\x13\n\x11_youtube_video_idB\x16\n\x14_advertising_id_codeB\x0c\n\n_isci_codeB\x80\x02\n&com.google.ads.googleads.v25.resourcesB\x0eMediaFileProtoP\x01ZKgoogle.golang.org/genproto/googleapis/ads/googleads/v25/resources;resources\xa2\x02\x03GAA\xaa\x02\"Google.Ads.GoogleAds.V25.Resources\xca\x02\"Google\\Ads\\GoogleAds\\V25\\Resources\xea\x02&Google::Ads::GoogleAds::V25::Resourcesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Resources + MediaFile = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.MediaFile").msgclass + MediaImage = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.MediaImage").msgclass + MediaBundle = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.MediaBundle").msgclass + MediaAudio = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.MediaAudio").msgclass + MediaVideo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.MediaVideo").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/resources/mobile_app_category_constant_pb.rb b/lib/google/ads/google_ads/v25/resources/mobile_app_category_constant_pb.rb new file mode 100644 index 000000000..1ecbb8405 --- /dev/null +++ b/lib/google/ads/google_ads/v25/resources/mobile_app_category_constant_pb.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/resources/mobile_app_category_constant.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' + + +descriptor_data = "\nEgoogle/ads/googleads/v25/resources/mobile_app_category_constant.proto\x12\"google.ads.googleads.v25.resources\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\x9a\x02\n\x19MobileAppCategoryConstant\x12Q\n\rresource_name\x18\x01 \x01(\tB:\xe0\x41\x03\xfa\x41\x34\n2googleads.googleapis.com/MobileAppCategoryConstant\x12\x14\n\x02id\x18\x04 \x01(\x05\x42\x03\xe0\x41\x03H\x00\x88\x01\x01\x12\x16\n\x04name\x18\x05 \x01(\tB\x03\xe0\x41\x03H\x01\x88\x01\x01:l\xea\x41i\n2googleads.googleapis.com/MobileAppCategoryConstant\x12\x33mobileAppCategoryConstants/{mobile_app_category_id}B\x05\n\x03_idB\x07\n\x05_nameB\x90\x02\n&com.google.ads.googleads.v25.resourcesB\x1eMobileAppCategoryConstantProtoP\x01ZKgoogle.golang.org/genproto/googleapis/ads/googleads/v25/resources;resources\xa2\x02\x03GAA\xaa\x02\"Google.Ads.GoogleAds.V25.Resources\xca\x02\"Google\\Ads\\GoogleAds\\V25\\Resources\xea\x02&Google::Ads::GoogleAds::V25::Resourcesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Resources + MobileAppCategoryConstant = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.MobileAppCategoryConstant").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/resources/mobile_device_constant_pb.rb b/lib/google/ads/google_ads/v25/resources/mobile_device_constant_pb.rb new file mode 100644 index 000000000..08e09011c --- /dev/null +++ b/lib/google/ads/google_ads/v25/resources/mobile_device_constant_pb.rb @@ -0,0 +1,27 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/resources/mobile_device_constant.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/enums/mobile_device_type_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' + + +descriptor_data = "\n?google/ads/googleads/v25/resources/mobile_device_constant.proto\x12\"google.ads.googleads.v25.resources\x1a\x37google/ads/googleads/v25/enums/mobile_device_type.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\xd4\x03\n\x14MobileDeviceConstant\x12L\n\rresource_name\x18\x01 \x01(\tB5\xe0\x41\x03\xfa\x41/\n-googleads.googleapis.com/MobileDeviceConstant\x12\x14\n\x02id\x18\x07 \x01(\x03\x42\x03\xe0\x41\x03H\x00\x88\x01\x01\x12\x16\n\x04name\x18\x08 \x01(\tB\x03\xe0\x41\x03H\x01\x88\x01\x01\x12#\n\x11manufacturer_name\x18\t \x01(\tB\x03\xe0\x41\x03H\x02\x88\x01\x01\x12\'\n\x15operating_system_name\x18\n \x01(\tB\x03\xe0\x41\x03H\x03\x88\x01\x01\x12X\n\x04type\x18\x06 \x01(\x0e\x32\x45.google.ads.googleads.v25.enums.MobileDeviceTypeEnum.MobileDeviceTypeB\x03\xe0\x41\x03:X\xea\x41U\n-googleads.googleapis.com/MobileDeviceConstant\x12$mobileDeviceConstants/{criterion_id}B\x05\n\x03_idB\x07\n\x05_nameB\x14\n\x12_manufacturer_nameB\x18\n\x16_operating_system_nameB\x8b\x02\n&com.google.ads.googleads.v25.resourcesB\x19MobileDeviceConstantProtoP\x01ZKgoogle.golang.org/genproto/googleapis/ads/googleads/v25/resources;resources\xa2\x02\x03GAA\xaa\x02\"Google.Ads.GoogleAds.V25.Resources\xca\x02\"Google\\Ads\\GoogleAds\\V25\\Resources\xea\x02&Google::Ads::GoogleAds::V25::Resourcesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Resources + MobileDeviceConstant = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.MobileDeviceConstant").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/resources/multi_party_auth_review_pb.rb b/lib/google/ads/google_ads/v25/resources/multi_party_auth_review_pb.rb new file mode 100644 index 000000000..46ef88ccb --- /dev/null +++ b/lib/google/ads/google_ads/v25/resources/multi_party_auth_review_pb.rb @@ -0,0 +1,33 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/resources/multi_party_auth_review.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/enums/multi_party_auth_operation_type_pb' +require 'google/ads/google_ads/v25/enums/multi_party_auth_review_status_pb' +require 'google/ads/google_ads/v25/enums/multi_party_auth_review_target_resource_pb' +require 'google/ads/google_ads/v25/resources/customer_user_access_pb' +require 'google/ads/google_ads/v25/resources/customer_user_access_invitation_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' + + +descriptor_data = "\n@google/ads/googleads/v25/resources/multi_party_auth_review.proto\x12\"google.ads.googleads.v25.resources\x1a\x44google/ads/googleads/v25/enums/multi_party_auth_operation_type.proto\x1a\x43google/ads/googleads/v25/enums/multi_party_auth_review_status.proto\x1aLgoogle/ads/googleads/v25/enums/multi_party_auth_review_target_resource.proto\x1a=google/ads/googleads/v25/resources/customer_user_access.proto\x1aHgoogle/ads/googleads/v25/resources/customer_user_access_invitation.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\x89\x08\n\x14MultiPartyAuthReview\x12L\n\rresource_name\x18\x01 \x01(\tB5\xe0\x41\x05\xfa\x41/\n-googleads.googleapis.com/MultiPartyAuthReview\x12\'\n\x1amulti_party_auth_review_id\x18\x04 \x01(\x03\x42\x03\xe0\x41\x03\x12\x1f\n\x12\x63reation_date_time\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12u\n\rreview_status\x18\x06 \x01(\x0e\x32Y.google.ads.googleads.v25.enums.MultiPartyAuthReviewStatusEnum.MultiPartyAuthReviewStatusB\x03\xe0\x41\x03\x12\x1f\n\x12\x61pproval_date_time\x18\x07 \x01(\tB\x03\xe0\x41\x03\x12\x1a\n\rjustification\x18\t \x01(\tB\x03\xe0\x41\x03\x12\x1f\n\x12request_user_email\x18\n \x01(\tB\x03\xe0\x41\x03\x12x\n\x0eoperation_type\x18\x0b \x01(\x0e\x32[.google.ads.googleads.v25.enums.MultiPartyAuthOperationTypeEnum.MultiPartyAuthOperationTypeB\x03\xe0\x41\x03\x12\x87\x01\n\x0ftarget_resource\x18\x0c \x01(\x0e\x32i.google.ads.googleads.v25.enums.MultiPartyAuthReviewTargetResourceEnum.MultiPartyAuthReviewTargetResourceB\x03\xe0\x41\x03\x12h\n\x1b\x63ustomer_user_access_review\x18\x02 \x01(\x0b\x32<.google.ads.googleads.v25.resources.CustomerUserAccessReviewB\x03\xe0\x41\x03H\x00\x12}\n&customer_user_access_invitation_review\x18\x03 \x01(\x0b\x32\x46.google.ads.googleads.v25.resources.CustomerUserAccessInvitationReviewB\x03\xe0\x41\x03H\x00:z\xea\x41w\n-googleads.googleapis.com/MultiPartyAuthReview\x12\x46\x63ustomers/{customer_id}/multiPartyAuthReviews/{customer_invitation_id}B\x1b\n\x19multi_party_review_detail\"\xd0\x01\n\x18\x43ustomerUserAccessReview\x12U\n\x18old_customer_user_access\x18\x01 \x01(\tB3\xe0\x41\x03\xfa\x41-\n+googleads.googleapis.com/CustomerUserAccess\x12]\n\x18new_customer_user_access\x18\x02 \x01(\x0b\x32\x36.google.ads.googleads.v25.resources.CustomerUserAccessB\x03\xe0\x41\x03\"\x98\x01\n\"CustomerUserAccessInvitationReview\x12r\n#new_customer_user_access_invitation\x18\x02 \x01(\x0b\x32@.google.ads.googleads.v25.resources.CustomerUserAccessInvitationB\x03\xe0\x41\x03\x42\x8b\x02\n&com.google.ads.googleads.v25.resourcesB\x19MultiPartyAuthReviewProtoP\x01ZKgoogle.golang.org/genproto/googleapis/ads/googleads/v25/resources;resources\xa2\x02\x03GAA\xaa\x02\"Google.Ads.GoogleAds.V25.Resources\xca\x02\"Google\\Ads\\GoogleAds\\V25\\Resources\xea\x02&Google::Ads::GoogleAds::V25::Resourcesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Resources + MultiPartyAuthReview = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.MultiPartyAuthReview").msgclass + CustomerUserAccessReview = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.CustomerUserAccessReview").msgclass + CustomerUserAccessInvitationReview = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.CustomerUserAccessInvitationReview").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/resources/offline_conversion_upload_client_summary_pb.rb b/lib/google/ads/google_ads/v25/resources/offline_conversion_upload_client_summary_pb.rb new file mode 100644 index 000000000..939c44304 --- /dev/null +++ b/lib/google/ads/google_ads/v25/resources/offline_conversion_upload_client_summary_pb.rb @@ -0,0 +1,41 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/resources/offline_conversion_upload_client_summary.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/enums/offline_conversion_diagnostic_status_enum_pb' +require 'google/ads/google_ads/v25/enums/offline_event_upload_client_enum_pb' +require 'google/ads/google_ads/v25/errors/collection_size_error_pb' +require 'google/ads/google_ads/v25/errors/conversion_adjustment_upload_error_pb' +require 'google/ads/google_ads/v25/errors/conversion_upload_error_pb' +require 'google/ads/google_ads/v25/errors/date_error_pb' +require 'google/ads/google_ads/v25/errors/distinct_error_pb' +require 'google/ads/google_ads/v25/errors/field_error_pb' +require 'google/ads/google_ads/v25/errors/mutate_error_pb' +require 'google/ads/google_ads/v25/errors/not_allowlisted_error_pb' +require 'google/ads/google_ads/v25/errors/string_format_error_pb' +require 'google/ads/google_ads/v25/errors/string_length_error_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' + + +descriptor_data = "\nQgoogle/ads/googleads/v25/resources/offline_conversion_upload_client_summary.proto\x12\"google.ads.googleads.v25.resources\x1aNgoogle/ads/googleads/v25/enums/offline_conversion_diagnostic_status_enum.proto\x1a\x45google/ads/googleads/v25/enums/offline_event_upload_client_enum.proto\x1a;google/ads/googleads/v25/errors/collection_size_error.proto\x1aHgoogle/ads/googleads/v25/errors/conversion_adjustment_upload_error.proto\x1a=google/ads/googleads/v25/errors/conversion_upload_error.proto\x1a\x30google/ads/googleads/v25/errors/date_error.proto\x1a\x34google/ads/googleads/v25/errors/distinct_error.proto\x1a\x31google/ads/googleads/v25/errors/field_error.proto\x1a\x32google/ads/googleads/v25/errors/mutate_error.proto\x1a;google/ads/googleads/v25/errors/not_allowlisted_error.proto\x1a\x39google/ads/googleads/v25/errors/string_format_error.proto\x1a\x39google/ads/googleads/v25/errors/string_length_error.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\xc5\x07\n$OfflineConversionUploadClientSummary\x12\\\n\rresource_name\x18\x01 \x01(\tBE\xe0\x41\x03\xfa\x41?\n=googleads.googleapis.com/OfflineConversionUploadClientSummary\x12j\n\x06\x63lient\x18\x02 \x01(\x0e\x32U.google.ads.googleads.v25.enums.OfflineEventUploadClientEnum.OfflineEventUploadClientB\x03\xe0\x41\x03\x12|\n\x06status\x18\x03 \x01(\x0e\x32g.google.ads.googleads.v25.enums.OfflineConversionDiagnosticStatusEnum.OfflineConversionDiagnosticStatusB\x03\xe0\x41\x03\x12\x1e\n\x11total_event_count\x18\x04 \x01(\x03\x42\x03\xe0\x41\x03\x12#\n\x16successful_event_count\x18\x05 \x01(\x03\x42\x03\xe0\x41\x03\x12\x19\n\x0csuccess_rate\x18\x06 \x01(\x01\x42\x03\xe0\x41\x03\x12 \n\x13pending_event_count\x18\x0b \x01(\x03\x42\x03\xe0\x41\x03\x12\x19\n\x0cpending_rate\x18\x0c \x01(\x01\x42\x03\xe0\x41\x03\x12\"\n\x15last_upload_date_time\x18\x07 \x01(\tB\x03\xe0\x41\x03\x12Z\n\x0f\x64\x61ily_summaries\x18\x08 \x03(\x0b\x32<.google.ads.googleads.v25.resources.OfflineConversionSummaryB\x03\xe0\x41\x03\x12X\n\rjob_summaries\x18\t \x03(\x0b\x32<.google.ads.googleads.v25.resources.OfflineConversionSummaryB\x03\xe0\x41\x03\x12O\n\x06\x61lerts\x18\n \x03(\x0b\x32:.google.ads.googleads.v25.resources.OfflineConversionAlertB\x03\xe0\x41\x03:\x8c\x01\xea\x41\x88\x01\n=googleads.googleapis.com/OfflineConversionUploadClientSummary\x12Gcustomers/{customer_id}/offlineConversionUploadClientSummaries/{client}\"\xb4\x01\n\x18OfflineConversionSummary\x12\x1d\n\x10successful_count\x18\x03 \x01(\x03\x42\x03\xe0\x41\x03\x12\x19\n\x0c\x66\x61iled_count\x18\x04 \x01(\x03\x42\x03\xe0\x41\x03\x12\x1a\n\rpending_count\x18\x05 \x01(\x03\x42\x03\xe0\x41\x03\x12\x15\n\x06job_id\x18\x01 \x01(\x03\x42\x03\xe0\x41\x03H\x00\x12\x1a\n\x0bupload_date\x18\x02 \x01(\tB\x03\xe0\x41\x03H\x00\x42\x0f\n\rdimension_key\"\x87\x01\n\x16OfflineConversionAlert\x12N\n\x05\x65rror\x18\x01 \x01(\x0b\x32:.google.ads.googleads.v25.resources.OfflineConversionErrorB\x03\xe0\x41\x03\x12\x1d\n\x10\x65rror_percentage\x18\x02 \x01(\x01\x42\x03\xe0\x41\x03\"\xe7\x08\n\x16OfflineConversionError\x12r\n\x15\x63ollection_size_error\x18\x01 \x01(\x0e\x32L.google.ads.googleads.v25.errors.CollectionSizeErrorEnum.CollectionSizeErrorB\x03\xe0\x41\x03H\x00\x12\x97\x01\n\"conversion_adjustment_upload_error\x18\x02 \x01(\x0e\x32\x64.google.ads.googleads.v25.errors.ConversionAdjustmentUploadErrorEnum.ConversionAdjustmentUploadErrorB\x03\xe0\x41\x03H\x00\x12x\n\x17\x63onversion_upload_error\x18\x03 \x01(\x0e\x32P.google.ads.googleads.v25.errors.ConversionUploadErrorEnum.ConversionUploadErrorB\x03\xe0\x41\x03H\x00\x12S\n\ndate_error\x18\x04 \x01(\x0e\x32\x38.google.ads.googleads.v25.errors.DateErrorEnum.DateErrorB\x03\xe0\x41\x03H\x00\x12_\n\x0e\x64istinct_error\x18\x05 \x01(\x0e\x32@.google.ads.googleads.v25.errors.DistinctErrorEnum.DistinctErrorB\x03\xe0\x41\x03H\x00\x12V\n\x0b\x66ield_error\x18\x06 \x01(\x0e\x32:.google.ads.googleads.v25.errors.FieldErrorEnum.FieldErrorB\x03\xe0\x41\x03H\x00\x12Y\n\x0cmutate_error\x18\x07 \x01(\x0e\x32<.google.ads.googleads.v25.errors.MutateErrorEnum.MutateErrorB\x03\xe0\x41\x03H\x00\x12r\n\x15not_allowlisted_error\x18\x08 \x01(\x0e\x32L.google.ads.googleads.v25.errors.NotAllowlistedErrorEnum.NotAllowlistedErrorB\x03\xe0\x41\x03H\x00\x12l\n\x13string_format_error\x18\t \x01(\x0e\x32H.google.ads.googleads.v25.errors.StringFormatErrorEnum.StringFormatErrorB\x03\xe0\x41\x03H\x00\x12l\n\x13string_length_error\x18\n \x01(\x0e\x32H.google.ads.googleads.v25.errors.StringLengthErrorEnum.StringLengthErrorB\x03\xe0\x41\x03H\x00\x42\x0c\n\nerror_codeB\x9b\x02\n&com.google.ads.googleads.v25.resourcesB)OfflineConversionUploadClientSummaryProtoP\x01ZKgoogle.golang.org/genproto/googleapis/ads/googleads/v25/resources;resources\xa2\x02\x03GAA\xaa\x02\"Google.Ads.GoogleAds.V25.Resources\xca\x02\"Google\\Ads\\GoogleAds\\V25\\Resources\xea\x02&Google::Ads::GoogleAds::V25::Resourcesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Resources + OfflineConversionUploadClientSummary = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.OfflineConversionUploadClientSummary").msgclass + OfflineConversionSummary = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.OfflineConversionSummary").msgclass + OfflineConversionAlert = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.OfflineConversionAlert").msgclass + OfflineConversionError = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.OfflineConversionError").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/resources/offline_conversion_upload_conversion_action_summary_pb.rb b/lib/google/ads/google_ads/v25/resources/offline_conversion_upload_conversion_action_summary_pb.rb new file mode 100644 index 000000000..ac80055c9 --- /dev/null +++ b/lib/google/ads/google_ads/v25/resources/offline_conversion_upload_conversion_action_summary_pb.rb @@ -0,0 +1,29 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/resources/offline_conversion_upload_conversion_action_summary.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/enums/offline_conversion_diagnostic_status_enum_pb' +require 'google/ads/google_ads/v25/enums/offline_event_upload_client_enum_pb' +require 'google/ads/google_ads/v25/resources/offline_conversion_upload_client_summary_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' + + +descriptor_data = "\n\\google/ads/googleads/v25/resources/offline_conversion_upload_conversion_action_summary.proto\x12\"google.ads.googleads.v25.resources\x1aNgoogle/ads/googleads/v25/enums/offline_conversion_diagnostic_status_enum.proto\x1a\x45google/ads/googleads/v25/enums/offline_event_upload_client_enum.proto\x1aQgoogle/ads/googleads/v25/resources/offline_conversion_upload_client_summary.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\x94\x08\n.OfflineConversionUploadConversionActionSummary\x12\x66\n\rresource_name\x18\x01 \x01(\tBO\xe0\x41\x03\xfa\x41I\nGgoogleads.googleapis.com/OfflineConversionUploadConversionActionSummary\x12j\n\x06\x63lient\x18\x02 \x01(\x0e\x32U.google.ads.googleads.v25.enums.OfflineEventUploadClientEnum.OfflineEventUploadClientB\x03\xe0\x41\x03\x12!\n\x14\x63onversion_action_id\x18\x03 \x01(\x03\x42\x03\xe0\x41\x03\x12#\n\x16\x63onversion_action_name\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12|\n\x06status\x18\x05 \x01(\x0e\x32g.google.ads.googleads.v25.enums.OfflineConversionDiagnosticStatusEnum.OfflineConversionDiagnosticStatusB\x03\xe0\x41\x03\x12\x1e\n\x11total_event_count\x18\x06 \x01(\x03\x42\x03\xe0\x41\x03\x12#\n\x16successful_event_count\x18\x07 \x01(\x03\x42\x03\xe0\x41\x03\x12 \n\x13pending_event_count\x18\x08 \x01(\x03\x42\x03\xe0\x41\x03\x12\"\n\x15last_upload_date_time\x18\t \x01(\tB\x03\xe0\x41\x03\x12Z\n\x0f\x64\x61ily_summaries\x18\n \x03(\x0b\x32<.google.ads.googleads.v25.resources.OfflineConversionSummaryB\x03\xe0\x41\x03\x12X\n\rjob_summaries\x18\x0b \x03(\x0b\x32<.google.ads.googleads.v25.resources.OfflineConversionSummaryB\x03\xe0\x41\x03\x12O\n\x06\x61lerts\x18\x0c \x03(\x0b\x32:.google.ads.googleads.v25.resources.OfflineConversionAlertB\x03\xe0\x41\x03:\xb5\x01\xea\x41\xb1\x01\nGgoogleads.googleapis.com/OfflineConversionUploadConversionActionSummary\x12\x66\x63ustomers/{customer_id}/offlineConversionUploadConversionActionSummaries/{conversion_type_id}~{client}B\xa5\x02\n&com.google.ads.googleads.v25.resourcesB3OfflineConversionUploadConversionActionSummaryProtoP\x01ZKgoogle.golang.org/genproto/googleapis/ads/googleads/v25/resources;resources\xa2\x02\x03GAA\xaa\x02\"Google.Ads.GoogleAds.V25.Resources\xca\x02\"Google\\Ads\\GoogleAds\\V25\\Resources\xea\x02&Google::Ads::GoogleAds::V25::Resourcesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Resources + OfflineConversionUploadConversionActionSummary = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.OfflineConversionUploadConversionActionSummary").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/resources/offline_user_data_job_pb.rb b/lib/google/ads/google_ads/v25/resources/offline_user_data_job_pb.rb new file mode 100644 index 000000000..82559aab2 --- /dev/null +++ b/lib/google/ads/google_ads/v25/resources/offline_user_data_job_pb.rb @@ -0,0 +1,32 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/resources/offline_user_data_job.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/common/offline_user_data_pb' +require 'google/ads/google_ads/v25/enums/offline_user_data_job_failure_reason_pb' +require 'google/ads/google_ads/v25/enums/offline_user_data_job_match_rate_range_pb' +require 'google/ads/google_ads/v25/enums/offline_user_data_job_status_pb' +require 'google/ads/google_ads/v25/enums/offline_user_data_job_type_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' + + +descriptor_data = "\n>google/ads/googleads/v25/resources/offline_user_data_job.proto\x12\"google.ads.googleads.v25.resources\x1a\x37google/ads/googleads/v25/common/offline_user_data.proto\x1aIgoogle/ads/googleads/v25/enums/offline_user_data_job_failure_reason.proto\x1aKgoogle/ads/googleads/v25/enums/offline_user_data_job_match_rate_range.proto\x1a\x41google/ads/googleads/v25/enums/offline_user_data_job_status.proto\x1a?google/ads/googleads/v25/enums/offline_user_data_job_type.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\xb7\x07\n\x12OfflineUserDataJob\x12J\n\rresource_name\x18\x01 \x01(\tB3\xe0\x41\x05\xfa\x41-\n+googleads.googleapis.com/OfflineUserDataJob\x12\x14\n\x02id\x18\t \x01(\x03\x42\x03\xe0\x41\x03H\x01\x88\x01\x01\x12\x1d\n\x0b\x65xternal_id\x18\n \x01(\x03\x42\x03\xe0\x41\x05H\x02\x88\x01\x01\x12\x64\n\x04type\x18\x04 \x01(\x0e\x32Q.google.ads.googleads.v25.enums.OfflineUserDataJobTypeEnum.OfflineUserDataJobTypeB\x03\xe0\x41\x05\x12j\n\x06status\x18\x05 \x01(\x0e\x32U.google.ads.googleads.v25.enums.OfflineUserDataJobStatusEnum.OfflineUserDataJobStatusB\x03\xe0\x41\x03\x12\x80\x01\n\x0e\x66\x61ilure_reason\x18\x06 \x01(\x0e\x32\x63.google.ads.googleads.v25.enums.OfflineUserDataJobFailureReasonEnum.OfflineUserDataJobFailureReasonB\x03\xe0\x41\x03\x12_\n\x12operation_metadata\x18\x0b \x01(\x0b\x32>.google.ads.googleads.v25.resources.OfflineUserDataJobMetadataB\x03\xe0\x41\x03\x12p\n!customer_match_user_list_metadata\x18\x07 \x01(\x0b\x32>.google.ads.googleads.v25.common.CustomerMatchUserListMetadataB\x03\xe0\x41\x05H\x00\x12X\n\x14store_sales_metadata\x18\x08 \x01(\x0b\x32\x33.google.ads.googleads.v25.common.StoreSalesMetadataB\x03\xe0\x41\x05H\x00:{\xea\x41x\n+googleads.googleapis.com/OfflineUserDataJob\x12Icustomers/{customer_id}/offlineUserDataJobs/{offline_user_data_update_id}B\n\n\x08metadataB\x05\n\x03_idB\x0e\n\x0c_external_id\"\xa3\x01\n\x1aOfflineUserDataJobMetadata\x12\x84\x01\n\x10match_rate_range\x18\x01 \x01(\x0e\x32\x65.google.ads.googleads.v25.enums.OfflineUserDataJobMatchRateRangeEnum.OfflineUserDataJobMatchRateRangeB\x03\xe0\x41\x03\x42\x89\x02\n&com.google.ads.googleads.v25.resourcesB\x17OfflineUserDataJobProtoP\x01ZKgoogle.golang.org/genproto/googleapis/ads/googleads/v25/resources;resources\xa2\x02\x03GAA\xaa\x02\"Google.Ads.GoogleAds.V25.Resources\xca\x02\"Google\\Ads\\GoogleAds\\V25\\Resources\xea\x02&Google::Ads::GoogleAds::V25::Resourcesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Resources + OfflineUserDataJob = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.OfflineUserDataJob").msgclass + OfflineUserDataJobMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.OfflineUserDataJobMetadata").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/resources/operating_system_version_constant_pb.rb b/lib/google/ads/google_ads/v25/resources/operating_system_version_constant_pb.rb new file mode 100644 index 000000000..469807707 --- /dev/null +++ b/lib/google/ads/google_ads/v25/resources/operating_system_version_constant_pb.rb @@ -0,0 +1,27 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/resources/operating_system_version_constant.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/enums/operating_system_version_operator_type_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' + + +descriptor_data = "\nJgoogle/ads/googleads/v25/resources/operating_system_version_constant.proto\x12\"google.ads.googleads.v25.resources\x1aKgoogle/ads/googleads/v25/enums/operating_system_version_operator_type.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\x9e\x04\n\x1eOperatingSystemVersionConstant\x12V\n\rresource_name\x18\x01 \x01(\tB?\xe0\x41\x03\xfa\x41\x39\n7googleads.googleapis.com/OperatingSystemVersionConstant\x12\x14\n\x02id\x18\x07 \x01(\x03\x42\x03\xe0\x41\x03H\x00\x88\x01\x01\x12\x16\n\x04name\x18\x08 \x01(\tB\x03\xe0\x41\x03H\x01\x88\x01\x01\x12\"\n\x10os_major_version\x18\t \x01(\x05\x42\x03\xe0\x41\x03H\x02\x88\x01\x01\x12\"\n\x10os_minor_version\x18\n \x01(\x05\x42\x03\xe0\x41\x03H\x03\x88\x01\x01\x12\x85\x01\n\roperator_type\x18\x06 \x01(\x0e\x32i.google.ads.googleads.v25.enums.OperatingSystemVersionOperatorTypeEnum.OperatingSystemVersionOperatorTypeB\x03\xe0\x41\x03:l\xea\x41i\n7googleads.googleapis.com/OperatingSystemVersionConstant\x12.operatingSystemVersionConstants/{criterion_id}B\x05\n\x03_idB\x07\n\x05_nameB\x13\n\x11_os_major_versionB\x13\n\x11_os_minor_versionB\x95\x02\n&com.google.ads.googleads.v25.resourcesB#OperatingSystemVersionConstantProtoP\x01ZKgoogle.golang.org/genproto/googleapis/ads/googleads/v25/resources;resources\xa2\x02\x03GAA\xaa\x02\"Google.Ads.GoogleAds.V25.Resources\xca\x02\"Google\\Ads\\GoogleAds\\V25\\Resources\xea\x02&Google::Ads::GoogleAds::V25::Resourcesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Resources + OperatingSystemVersionConstant = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.OperatingSystemVersionConstant").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/resources/paid_organic_search_term_view_pb.rb b/lib/google/ads/google_ads/v25/resources/paid_organic_search_term_view_pb.rb new file mode 100644 index 000000000..2c4fab8e4 --- /dev/null +++ b/lib/google/ads/google_ads/v25/resources/paid_organic_search_term_view_pb.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/resources/paid_organic_search_term_view.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' + + +descriptor_data = "\nFgoogle/ads/googleads/v25/resources/paid_organic_search_term_view.proto\x12\"google.ads.googleads.v25.resources\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\xbd\x02\n\x19PaidOrganicSearchTermView\x12Q\n\rresource_name\x18\x01 \x01(\tB:\xe0\x41\x03\xfa\x41\x34\n2googleads.googleapis.com/PaidOrganicSearchTermView\x12\x1d\n\x0bsearch_term\x18\x03 \x01(\tB\x03\xe0\x41\x03H\x00\x88\x01\x01:\x9d\x01\xea\x41\x99\x01\n2googleads.googleapis.com/PaidOrganicSearchTermView\x12\x63\x63ustomers/{customer_id}/paidOrganicSearchTermViews/{campaign_id}~{ad_group_id}~{base64_search_term}B\x0e\n\x0c_search_termB\x90\x02\n&com.google.ads.googleads.v25.resourcesB\x1ePaidOrganicSearchTermViewProtoP\x01ZKgoogle.golang.org/genproto/googleapis/ads/googleads/v25/resources;resources\xa2\x02\x03GAA\xaa\x02\"Google.Ads.GoogleAds.V25.Resources\xca\x02\"Google\\Ads\\GoogleAds\\V25\\Resources\xea\x02&Google::Ads::GoogleAds::V25::Resourcesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Resources + PaidOrganicSearchTermView = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.PaidOrganicSearchTermView").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/resources/parental_status_view_pb.rb b/lib/google/ads/google_ads/v25/resources/parental_status_view_pb.rb new file mode 100644 index 000000000..ac5537c64 --- /dev/null +++ b/lib/google/ads/google_ads/v25/resources/parental_status_view_pb.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/resources/parental_status_view.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' + + +descriptor_data = "\n=google/ads/googleads/v25/resources/parental_status_view.proto\x12\"google.ads.googleads.v25.resources\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\xdc\x01\n\x12ParentalStatusView\x12J\n\rresource_name\x18\x01 \x01(\tB3\xe0\x41\x03\xfa\x41-\n+googleads.googleapis.com/ParentalStatusView:z\xea\x41w\n+googleads.googleapis.com/ParentalStatusView\x12Hcustomers/{customer_id}/parentalStatusViews/{ad_group_id}~{criterion_id}B\x89\x02\n&com.google.ads.googleads.v25.resourcesB\x17ParentalStatusViewProtoP\x01ZKgoogle.golang.org/genproto/googleapis/ads/googleads/v25/resources;resources\xa2\x02\x03GAA\xaa\x02\"Google.Ads.GoogleAds.V25.Resources\xca\x02\"Google\\Ads\\GoogleAds\\V25\\Resources\xea\x02&Google::Ads::GoogleAds::V25::Resourcesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Resources + ParentalStatusView = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.ParentalStatusView").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/resources/payments_account_pb.rb b/lib/google/ads/google_ads/v25/resources/payments_account_pb.rb new file mode 100644 index 000000000..af66df879 --- /dev/null +++ b/lib/google/ads/google_ads/v25/resources/payments_account_pb.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/resources/payments_account.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' + + +descriptor_data = "\n9google/ads/googleads/v25/resources/payments_account.proto\x12\"google.ads.googleads.v25.resources\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\xdb\x04\n\x0fPaymentsAccount\x12G\n\rresource_name\x18\x01 \x01(\tB0\xe0\x41\x03\xfa\x41*\n(googleads.googleapis.com/PaymentsAccount\x12%\n\x13payments_account_id\x18\x08 \x01(\tB\x03\xe0\x41\x03H\x00\x88\x01\x01\x12\x16\n\x04name\x18\t \x01(\tB\x03\xe0\x41\x03H\x01\x88\x01\x01\x12\x1f\n\rcurrency_code\x18\n \x01(\tB\x03\xe0\x41\x03H\x02\x88\x01\x01\x12%\n\x13payments_profile_id\x18\x0b \x01(\tB\x03\xe0\x41\x03H\x03\x88\x01\x01\x12/\n\x1dsecondary_payments_profile_id\x18\x0c \x01(\tB\x03\xe0\x41\x03H\x04\x88\x01\x01\x12O\n\x17paying_manager_customer\x18\r \x01(\tB)\xe0\x41\x03\xfa\x41#\n!googleads.googleapis.com/CustomerH\x05\x88\x01\x01:m\xea\x41j\n(googleads.googleapis.com/PaymentsAccount\x12>customers/{customer_id}/paymentsAccounts/{payments_account_id}B\x16\n\x14_payments_account_idB\x07\n\x05_nameB\x10\n\x0e_currency_codeB\x16\n\x14_payments_profile_idB \n\x1e_secondary_payments_profile_idB\x1a\n\x18_paying_manager_customerB\x86\x02\n&com.google.ads.googleads.v25.resourcesB\x14PaymentsAccountProtoP\x01ZKgoogle.golang.org/genproto/googleapis/ads/googleads/v25/resources;resources\xa2\x02\x03GAA\xaa\x02\"Google.Ads.GoogleAds.V25.Resources\xca\x02\"Google\\Ads\\GoogleAds\\V25\\Resources\xea\x02&Google::Ads::GoogleAds::V25::Resourcesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Resources + PaymentsAccount = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.PaymentsAccount").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/resources/per_store_view_pb.rb b/lib/google/ads/google_ads/v25/resources/per_store_view_pb.rb new file mode 100644 index 000000000..920840996 --- /dev/null +++ b/lib/google/ads/google_ads/v25/resources/per_store_view_pb.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/resources/per_store_view.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' + + +descriptor_data = "\n7google/ads/googleads/v25/resources/per_store_view.proto\x12\"google.ads.googleads.v25.resources\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\x8d\x03\n\x0cPerStoreView\x12\x44\n\rresource_name\x18\x01 \x01(\tB-\xe0\x41\x03\xfa\x41\'\n%googleads.googleapis.com/PerStoreView\x12\x15\n\x08place_id\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x15\n\x08\x61\x64\x64ress1\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x15\n\x08\x61\x64\x64ress2\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12\x1a\n\rbusiness_name\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12\x11\n\x04\x63ity\x18\x06 \x01(\tB\x03\xe0\x41\x03\x12\x19\n\x0c\x63ountry_code\x18\x07 \x01(\tB\x03\xe0\x41\x03\x12\x19\n\x0cphone_number\x18\x08 \x01(\tB\x03\xe0\x41\x03\x12\x18\n\x0bpostal_code\x18\t \x01(\tB\x03\xe0\x41\x03\x12\x15\n\x08province\x18\n \x01(\tB\x03\xe0\x41\x03:\\\xea\x41Y\n%googleads.googleapis.com/PerStoreView\x12\x30\x63ustomers/{customer_id}/perStoreViews/{place_id}B\x83\x02\n&com.google.ads.googleads.v25.resourcesB\x11PerStoreViewProtoP\x01ZKgoogle.golang.org/genproto/googleapis/ads/googleads/v25/resources;resources\xa2\x02\x03GAA\xaa\x02\"Google.Ads.GoogleAds.V25.Resources\xca\x02\"Google\\Ads\\GoogleAds\\V25\\Resources\xea\x02&Google::Ads::GoogleAds::V25::Resourcesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Resources + PerStoreView = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.PerStoreView").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/resources/performance_max_placement_view_pb.rb b/lib/google/ads/google_ads/v25/resources/performance_max_placement_view_pb.rb new file mode 100644 index 000000000..06000d0c9 --- /dev/null +++ b/lib/google/ads/google_ads/v25/resources/performance_max_placement_view_pb.rb @@ -0,0 +1,27 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/resources/performance_max_placement_view.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/enums/placement_type_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' + + +descriptor_data = "\nGgoogle/ads/googleads/v25/resources/performance_max_placement_view.proto\x12\"google.ads.googleads.v25.resources\x1a\x33google/ads/googleads/v25/enums/placement_type.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\x9b\x04\n\x1bPerformanceMaxPlacementView\x12S\n\rresource_name\x18\x01 \x01(\tB<\xe0\x41\x03\xfa\x41\x36\n4googleads.googleapis.com/PerformanceMaxPlacementView\x12\x1b\n\tplacement\x18\x02 \x01(\tB\x03\xe0\x41\x03H\x00\x88\x01\x01\x12\x1e\n\x0c\x64isplay_name\x18\x03 \x01(\tB\x03\xe0\x41\x03H\x01\x88\x01\x01\x12\x1c\n\ntarget_url\x18\x04 \x01(\tB\x03\xe0\x41\x03H\x02\x88\x01\x01\x12\\\n\x0eplacement_type\x18\x05 \x01(\x0e\x32?.google.ads.googleads.v25.enums.PlacementTypeEnum.PlacementTypeB\x03\xe0\x41\x03:\xbf\x01\xea\x41\xbb\x01\n4googleads.googleapis.com/PerformanceMaxPlacementView\x12Hcustomers/{customer_id}/performanceMaxPlacementViews/{base_64_placement}*\x1cperformanceMaxPlacementViews2\x1bperformanceMaxPlacementViewB\x0c\n\n_placementB\x0f\n\r_display_nameB\r\n\x0b_target_urlB\x92\x02\n&com.google.ads.googleads.v25.resourcesB PerformanceMaxPlacementViewProtoP\x01ZKgoogle.golang.org/genproto/googleapis/ads/googleads/v25/resources;resources\xa2\x02\x03GAA\xaa\x02\"Google.Ads.GoogleAds.V25.Resources\xca\x02\"Google\\Ads\\GoogleAds\\V25\\Resources\xea\x02&Google::Ads::GoogleAds::V25::Resourcesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Resources + PerformanceMaxPlacementView = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.PerformanceMaxPlacementView").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/resources/product_category_constant_pb.rb b/lib/google/ads/google_ads/v25/resources/product_category_constant_pb.rb new file mode 100644 index 000000000..f04f171f6 --- /dev/null +++ b/lib/google/ads/google_ads/v25/resources/product_category_constant_pb.rb @@ -0,0 +1,29 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/resources/product_category_constant.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/enums/product_category_level_pb' +require 'google/ads/google_ads/v25/enums/product_category_state_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' + + +descriptor_data = "\nBgoogle/ads/googleads/v25/resources/product_category_constant.proto\x12\"google.ads.googleads.v25.resources\x1a;google/ads/googleads/v25/enums/product_category_level.proto\x1a;google/ads/googleads/v25/enums/product_category_state.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\xd2\x06\n\x17ProductCategoryConstant\x12O\n\rresource_name\x18\x01 \x01(\tB8\xe0\x41\x03\xfa\x41\x32\n0googleads.googleapis.com/ProductCategoryConstant\x12\x18\n\x0b\x63\x61tegory_id\x18\x02 \x01(\x03\x42\x03\xe0\x41\x03\x12g\n product_category_constant_parent\x18\x03 \x01(\tB8\xe0\x41\x03\xfa\x41\x32\n0googleads.googleapis.com/ProductCategoryConstantH\x00\x88\x01\x01\x12\x61\n\x05level\x18\x04 \x01(\x0e\x32M.google.ads.googleads.v25.enums.ProductCategoryLevelEnum.ProductCategoryLevelB\x03\xe0\x41\x03\x12\x61\n\x05state\x18\x05 \x01(\x0e\x32M.google.ads.googleads.v25.enums.ProductCategoryStateEnum.ProductCategoryStateB\x03\xe0\x41\x03\x12s\n\rlocalizations\x18\x06 \x03(\x0b\x32W.google.ads.googleads.v25.resources.ProductCategoryConstant.ProductCategoryLocalizationB\x03\xe0\x41\x03\x1ag\n\x1bProductCategoryLocalization\x12\x18\n\x0bregion_code\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x1a\n\rlanguage_code\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x12\n\x05value\x18\x03 \x01(\tB\x03\xe0\x41\x03:\x99\x01\xea\x41\x95\x01\n0googleads.googleapis.com/ProductCategoryConstant\x12.productCategoryConstants/{level}~{category_id}*\x18productCategoryConstants2\x17productCategoryConstantB#\n!_product_category_constant_parentB\x8e\x02\n&com.google.ads.googleads.v25.resourcesB\x1cProductCategoryConstantProtoP\x01ZKgoogle.golang.org/genproto/googleapis/ads/googleads/v25/resources;resources\xa2\x02\x03GAA\xaa\x02\"Google.Ads.GoogleAds.V25.Resources\xca\x02\"Google\\Ads\\GoogleAds\\V25\\Resources\xea\x02&Google::Ads::GoogleAds::V25::Resourcesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Resources + ProductCategoryConstant = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.ProductCategoryConstant").msgclass + ProductCategoryConstant::ProductCategoryLocalization = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.ProductCategoryConstant.ProductCategoryLocalization").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/resources/product_group_view_pb.rb b/lib/google/ads/google_ads/v25/resources/product_group_view_pb.rb new file mode 100644 index 000000000..1763700e7 --- /dev/null +++ b/lib/google/ads/google_ads/v25/resources/product_group_view_pb.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/resources/product_group_view.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' + + +descriptor_data = "\n;google/ads/googleads/v25/resources/product_group_view.proto\x12\"google.ads.googleads.v25.resources\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\xd3\x01\n\x10ProductGroupView\x12H\n\rresource_name\x18\x01 \x01(\tB1\xe0\x41\x03\xfa\x41+\n)googleads.googleapis.com/ProductGroupView:u\xea\x41r\n)googleads.googleapis.com/ProductGroupView\x12\x45\x63ustomers/{customer_id}/productGroupViews/{adgroup_id}~{criterion_id}B\x87\x02\n&com.google.ads.googleads.v25.resourcesB\x15ProductGroupViewProtoP\x01ZKgoogle.golang.org/genproto/googleapis/ads/googleads/v25/resources;resources\xa2\x02\x03GAA\xaa\x02\"Google.Ads.GoogleAds.V25.Resources\xca\x02\"Google\\Ads\\GoogleAds\\V25\\Resources\xea\x02&Google::Ads::GoogleAds::V25::Resourcesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Resources + ProductGroupView = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.ProductGroupView").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/resources/product_link_invitation_pb.rb b/lib/google/ads/google_ads/v25/resources/product_link_invitation_pb.rb new file mode 100644 index 000000000..3cd725e97 --- /dev/null +++ b/lib/google/ads/google_ads/v25/resources/product_link_invitation_pb.rb @@ -0,0 +1,32 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/resources/product_link_invitation.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/enums/linked_product_type_pb' +require 'google/ads/google_ads/v25/enums/product_link_invitation_status_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' + + +descriptor_data = "\n@google/ads/googleads/v25/resources/product_link_invitation.proto\x12\"google.ads.googleads.v25.resources\x1a\x38google/ads/googleads/v25/enums/linked_product_type.proto\x1a\x43google/ads/googleads/v25/enums/product_link_invitation_status.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\xd1\x07\n\x15ProductLinkInvitation\x12M\n\rresource_name\x18\x01 \x01(\tB6\xe0\x41\x05\xfa\x41\x30\n.googleads.googleapis.com/ProductLinkInvitation\x12\'\n\x1aproduct_link_invitation_id\x18\x02 \x01(\x03\x42\x03\xe0\x41\x03\x12p\n\x06status\x18\x03 \x01(\x0e\x32[.google.ads.googleads.v25.enums.ProductLinkInvitationStatusEnum.ProductLinkInvitationStatusB\x03\xe0\x41\x03\x12Z\n\x04type\x18\x06 \x01(\x0e\x32G.google.ads.googleads.v25.enums.LinkedProductTypeEnum.LinkedProductTypeB\x03\xe0\x41\x03\x12\x64\n\x0chotel_center\x18\x04 \x01(\x0b\x32G.google.ads.googleads.v25.resources.HotelCenterLinkInvitationIdentifierB\x03\xe0\x41\x03H\x00\x12j\n\x0fmerchant_center\x18\x05 \x01(\x0b\x32J.google.ads.googleads.v25.resources.MerchantCenterLinkInvitationIdentifierB\x03\xe0\x41\x03H\x00\x12r\n\x13\x61\x64vertising_partner\x18\x07 \x01(\x0b\x32N.google.ads.googleads.v25.resources.AdvertisingPartnerLinkInvitationIdentifierB\x03\xe0\x41\x03H\x00\x12}\n\x1e\x61\x64vertising_partner_properties\x18\x08 \x01(\x0b\x32N.google.ads.googleads.v25.resources.AdvertisingPartnerLinkInvitationPropertiesB\x03\xe0\x41\x03H\x01:|\xea\x41y\n.googleads.googleapis.com/ProductLinkInvitation\x12Gcustomers/{customer_id}/productLinkInvitations/{customer_invitation_id}B\x11\n\x0finvited_accountB\x1c\n\x1ainvited_account_properties\"C\n#HotelCenterLinkInvitationIdentifier\x12\x1c\n\x0fhotel_center_id\x18\x01 \x01(\x03\x42\x03\xe0\x41\x03\"I\n&MerchantCenterLinkInvitationIdentifier\x12\x1f\n\x12merchant_center_id\x18\x01 \x01(\x03\x42\x03\xe0\x41\x03\"{\n*AdvertisingPartnerLinkInvitationIdentifier\x12@\n\x08\x63ustomer\x18\x01 \x01(\tB)\xe0\x41\x05\xfa\x41#\n!googleads.googleapis.com/CustomerH\x00\x88\x01\x01\x42\x0b\n\t_customer\"a\n*AdvertisingPartnerLinkInvitationProperties\x12 \n\x0e\x61llowed_domain\x18\x01 \x01(\tB\x03\xe0\x41\x05H\x00\x88\x01\x01\x42\x11\n\x0f_allowed_domainB\x8c\x02\n&com.google.ads.googleads.v25.resourcesB\x1aProductLinkInvitationProtoP\x01ZKgoogle.golang.org/genproto/googleapis/ads/googleads/v25/resources;resources\xa2\x02\x03GAA\xaa\x02\"Google.Ads.GoogleAds.V25.Resources\xca\x02\"Google\\Ads\\GoogleAds\\V25\\Resources\xea\x02&Google::Ads::GoogleAds::V25::Resourcesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Resources + ProductLinkInvitation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.ProductLinkInvitation").msgclass + HotelCenterLinkInvitationIdentifier = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.HotelCenterLinkInvitationIdentifier").msgclass + MerchantCenterLinkInvitationIdentifier = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.MerchantCenterLinkInvitationIdentifier").msgclass + AdvertisingPartnerLinkInvitationIdentifier = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.AdvertisingPartnerLinkInvitationIdentifier").msgclass + AdvertisingPartnerLinkInvitationProperties = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.AdvertisingPartnerLinkInvitationProperties").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/resources/product_link_pb.rb b/lib/google/ads/google_ads/v25/resources/product_link_pb.rb new file mode 100644 index 000000000..ececcbd58 --- /dev/null +++ b/lib/google/ads/google_ads/v25/resources/product_link_pb.rb @@ -0,0 +1,32 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/resources/product_link.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/enums/linked_product_type_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' + + +descriptor_data = "\n5google/ads/googleads/v25/resources/product_link.proto\x12\"google.ads.googleads.v25.resources\x1a\x38google/ads/googleads/v25/enums/linked_product_type.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\xd6\x06\n\x0bProductLink\x12\x43\n\rresource_name\x18\x01 \x01(\tB,\xe0\x41\x05\xfa\x41&\n$googleads.googleapis.com/ProductLink\x12!\n\x0fproduct_link_id\x18\x02 \x01(\x03\x42\x03\xe0\x41\x03H\x02\x88\x01\x01\x12Z\n\x04type\x18\x03 \x01(\x0e\x32G.google.ads.googleads.v25.enums.LinkedProductTypeEnum.LinkedProductTypeB\x03\xe0\x41\x03\x12V\n\x0c\x64\x61ta_partner\x18\x04 \x01(\x0b\x32\x39.google.ads.googleads.v25.resources.DataPartnerIdentifierB\x03\xe0\x41\x05H\x00\x12R\n\ngoogle_ads\x18\x05 \x01(\x0b\x32\x37.google.ads.googleads.v25.resources.GoogleAdsIdentifierB\x03\xe0\x41\x05H\x00\x12\\\n\x0fmerchant_center\x18\x0c \x01(\x0b\x32<.google.ads.googleads.v25.resources.MerchantCenterIdentifierB\x03\xe0\x41\x05H\x00\x12\x64\n\x13\x61\x64vertising_partner\x18\r \x01(\x0b\x32@.google.ads.googleads.v25.resources.AdvertisingPartnerIdentifierB\x03\xe0\x41\x03H\x00\x12o\n\x1e\x61\x64vertising_partner_properties\x18\x0f \x01(\x0b\x32@.google.ads.googleads.v25.resources.AdvertisingPartnerPropertiesB\x03\xe0\x41\x03H\x01:a\xea\x41^\n$googleads.googleapis.com/ProductLink\x12\x36\x63ustomers/{customer_id}/productLinks/{product_link_id}B\x10\n\x0elinked_productB\x19\n\x17product_link_propertiesB\x12\n\x10_product_link_id\"N\n\x15\x44\x61taPartnerIdentifier\x12!\n\x0f\x64\x61ta_partner_id\x18\x01 \x01(\x03\x42\x03\xe0\x41\x05H\x00\x88\x01\x01\x42\x12\n\x10_data_partner_id\"d\n\x13GoogleAdsIdentifier\x12@\n\x08\x63ustomer\x18\x01 \x01(\tB)\xe0\x41\x05\xfa\x41#\n!googleads.googleapis.com/CustomerH\x00\x88\x01\x01\x42\x0b\n\t_customer\"W\n\x18MerchantCenterIdentifier\x12$\n\x12merchant_center_id\x18\x01 \x01(\x03\x42\x03\xe0\x41\x05H\x00\x88\x01\x01\x42\x15\n\x13_merchant_center_id\"m\n\x1c\x41\x64vertisingPartnerIdentifier\x12@\n\x08\x63ustomer\x18\x01 \x01(\tB)\xe0\x41\x03\xfa\x41#\n!googleads.googleapis.com/CustomerH\x00\x88\x01\x01\x42\x0b\n\t_customer\"S\n\x1c\x41\x64vertisingPartnerProperties\x12 \n\x0e\x61llowed_domain\x18\x01 \x01(\tB\x03\xe0\x41\x03H\x00\x88\x01\x01\x42\x11\n\x0f_allowed_domainB\x82\x02\n&com.google.ads.googleads.v25.resourcesB\x10ProductLinkProtoP\x01ZKgoogle.golang.org/genproto/googleapis/ads/googleads/v25/resources;resources\xa2\x02\x03GAA\xaa\x02\"Google.Ads.GoogleAds.V25.Resources\xca\x02\"Google\\Ads\\GoogleAds\\V25\\Resources\xea\x02&Google::Ads::GoogleAds::V25::Resourcesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Resources + ProductLink = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.ProductLink").msgclass + DataPartnerIdentifier = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.DataPartnerIdentifier").msgclass + GoogleAdsIdentifier = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.GoogleAdsIdentifier").msgclass + MerchantCenterIdentifier = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.MerchantCenterIdentifier").msgclass + AdvertisingPartnerIdentifier = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.AdvertisingPartnerIdentifier").msgclass + AdvertisingPartnerProperties = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.AdvertisingPartnerProperties").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/resources/qualifying_question_pb.rb b/lib/google/ads/google_ads/v25/resources/qualifying_question_pb.rb new file mode 100644 index 000000000..725fd8532 --- /dev/null +++ b/lib/google/ads/google_ads/v25/resources/qualifying_question_pb.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/resources/qualifying_question.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' + + +descriptor_data = "\n \x01(\x0b\x32Y.google.ads.googleads.v25.resources.Recommendation.ForecastingSetTargetRoasRecommendationB\x03\xe0\x41\x03H\x00\x12\x9d\x01\n/maximize_conversion_value_opt_in_recommendation\x18? \x01(\x0b\x32].google.ads.googleads.v25.resources.Recommendation.MaximizeConversionValueOptInRecommendationB\x03\xe0\x41\x03H\x00\x12\x94\x01\n*improve_google_tag_coverage_recommendation\x18@ \x01(\x0b\x32Y.google.ads.googleads.v25.resources.Recommendation.ImproveGoogleTagCoverageRecommendationB\x03\xe0\x41\x03H\x00\x12\x9c\x01\n/performance_max_final_url_opt_in_recommendation\x18\x41 \x01(\x0b\x32\\.google.ads.googleads.v25.resources.Recommendation.PerformanceMaxFinalUrlOptInRecommendationB\x03\xe0\x41\x03H\x00\x12\x94\x01\n*refresh_customer_match_list_recommendation\x18\x42 \x01(\x0b\x32Y.google.ads.googleads.v25.resources.Recommendation.RefreshCustomerMatchListRecommendationB\x03\xe0\x41\x03H\x00\x12\x8a\x01\n%custom_audience_opt_in_recommendation\x18\x43 \x01(\x0b\x32T.google.ads.googleads.v25.resources.Recommendation.CustomAudienceOptInRecommendationB\x03\xe0\x41\x03H\x00\x12}\n\x1elead_form_asset_recommendation\x18\x44 \x01(\x0b\x32N.google.ads.googleads.v25.resources.Recommendation.LeadFormAssetRecommendationB\x03\xe0\x41\x03H\x00\x12\x99\x01\n-improve_demand_gen_ad_strength_recommendation\x18\x45 \x01(\x0b\x32[.google.ads.googleads.v25.resources.Recommendation.ImproveDemandGenAdStrengthRecommendationB\x03\xe0\x41\x03H\x00\x1aM\n\x0cMerchantInfo\x12\x0f\n\x02id\x18\x01 \x01(\x03\x42\x03\xe0\x41\x03\x12\x11\n\x04name\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x19\n\x0cmulti_client\x18\x03 \x01(\x08\x42\x03\xe0\x41\x03\x1a\xe5\x01\n\x14RecommendationImpact\x12\x63\n\x0c\x62\x61se_metrics\x18\x01 \x01(\x0b\x32H.google.ads.googleads.v25.resources.Recommendation.RecommendationMetricsB\x03\xe0\x41\x03\x12h\n\x11potential_metrics\x18\x02 \x01(\x0b\x32H.google.ads.googleads.v25.resources.Recommendation.RecommendationMetricsB\x03\xe0\x41\x03\x1a\xb3\x02\n\x15RecommendationMetrics\x12\x1d\n\x0bimpressions\x18\x06 \x01(\x01\x42\x03\xe0\x41\x03H\x00\x88\x01\x01\x12\x18\n\x06\x63licks\x18\x07 \x01(\x01\x42\x03\xe0\x41\x03H\x01\x88\x01\x01\x12\x1d\n\x0b\x63ost_micros\x18\x08 \x01(\x03\x42\x03\xe0\x41\x03H\x02\x88\x01\x01\x12\x1d\n\x0b\x63onversions\x18\t \x01(\x01\x42\x03\xe0\x41\x03H\x03\x88\x01\x01\x12#\n\x11\x63onversions_value\x18\x0b \x01(\x01\x42\x03\xe0\x41\x03H\x04\x88\x01\x01\x12\x1d\n\x0bvideo_views\x18\n \x01(\x01\x42\x03\xe0\x41\x03H\x05\x88\x01\x01\x42\x0e\n\x0c_impressionsB\t\n\x07_clicksB\x0e\n\x0c_cost_microsB\x0e\n\x0c_conversionsB\x14\n\x12_conversions_valueB\x0e\n\x0c_video_views\x1a\xa0\x04\n\x1c\x43\x61mpaignBudgetRecommendation\x12.\n\x1c\x63urrent_budget_amount_micros\x18\x07 \x01(\x03\x42\x03\xe0\x41\x03H\x00\x88\x01\x01\x12\x32\n recommended_budget_amount_micros\x18\x08 \x01(\x03\x42\x03\xe0\x41\x03H\x01\x88\x01\x01\x12\x8f\x01\n\x0e\x62udget_options\x18\x03 \x03(\x0b\x32r.google.ads.googleads.v25.resources.Recommendation.CampaignBudgetRecommendation.CampaignBudgetRecommendationOptionB\x03\xe0\x41\x03\x1a\xc3\x01\n\"CampaignBudgetRecommendationOption\x12&\n\x14\x62udget_amount_micros\x18\x03 \x01(\x03\x42\x03\xe0\x41\x03H\x00\x88\x01\x01\x12\\\n\x06impact\x18\x02 \x01(\x0b\x32G.google.ads.googleads.v25.resources.Recommendation.RecommendationImpactB\x03\xe0\x41\x03\x42\x17\n\x15_budget_amount_microsB\x1f\n\x1d_current_budget_amount_microsB#\n!_recommended_budget_amount_micros\x1a\xe5\x02\n\x15KeywordRecommendation\x12\x42\n\x07keyword\x18\x01 \x01(\x0b\x32,.google.ads.googleads.v25.common.KeywordInfoB\x03\xe0\x41\x03\x12n\n\x0csearch_terms\x18\x04 \x03(\x0b\x32S.google.ads.googleads.v25.resources.Recommendation.KeywordRecommendation.SearchTermB\x03\xe0\x41\x03\x12,\n\x1arecommended_cpc_bid_micros\x18\x03 \x01(\x03\x42\x03\xe0\x41\x03H\x00\x88\x01\x01\x1aK\n\nSearchTerm\x12\x11\n\x04text\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12*\n\x1d\x65stimated_weekly_search_count\x18\x02 \x01(\x03\x42\x03\xe0\x41\x03\x42\x1d\n\x1b_recommended_cpc_bid_micros\x1a\xb9\x01\n\x14TextAdRecommendation\x12\x37\n\x02\x61\x64\x18\x01 \x01(\x0b\x32&.google.ads.googleads.v25.resources.AdB\x03\xe0\x41\x03\x12\x1f\n\rcreation_date\x18\x04 \x01(\tB\x03\xe0\x41\x03H\x00\x88\x01\x01\x12!\n\x0f\x61uto_apply_date\x18\x05 \x01(\tB\x03\xe0\x41\x03H\x01\x88\x01\x01\x42\x10\n\x0e_creation_dateB\x12\n\x10_auto_apply_date\x1a\x9b\x05\n\x1cTargetCpaOptInRecommendation\x12\x88\x01\n\x07options\x18\x01 \x03(\x0b\x32r.google.ads.googleads.v25.resources.Recommendation.TargetCpaOptInRecommendation.TargetCpaOptInRecommendationOptionB\x03\xe0\x41\x03\x12/\n\x1drecommended_target_cpa_micros\x18\x03 \x01(\x03\x42\x03\xe0\x41\x03H\x00\x88\x01\x01\x1a\x9c\x03\n\"TargetCpaOptInRecommendationOption\x12x\n\x04goal\x18\x01 \x01(\x0e\x32\x65.google.ads.googleads.v25.enums.TargetCpaOptInRecommendationGoalEnum.TargetCpaOptInRecommendationGoalB\x03\xe0\x41\x03\x12#\n\x11target_cpa_micros\x18\x05 \x01(\x03\x42\x03\xe0\x41\x03H\x00\x88\x01\x01\x12\x38\n&required_campaign_budget_amount_micros\x18\x06 \x01(\x03\x42\x03\xe0\x41\x03H\x01\x88\x01\x01\x12\\\n\x06impact\x18\x04 \x01(\x0b\x32G.google.ads.googleads.v25.resources.Recommendation.RecommendationImpactB\x03\xe0\x41\x03\x42\x14\n\x12_target_cpa_microsB)\n\'_required_campaign_budget_amount_microsB \n\x1e_recommended_target_cpa_micros\x1a\x81\x01\n&MaximizeConversionsOptInRecommendation\x12\x32\n recommended_budget_amount_micros\x18\x02 \x01(\x03\x42\x03\xe0\x41\x03H\x00\x88\x01\x01\x42#\n!_recommended_budget_amount_micros\x1a \n\x1e\x45nhancedCpcOptInRecommendation\x1a#\n!SearchPartnersOptInRecommendation\x1a|\n!MaximizeClicksOptInRecommendation\x12\x32\n recommended_budget_amount_micros\x18\x02 \x01(\x03\x42\x03\xe0\x41\x03H\x00\x88\x01\x01\x42#\n!_recommended_budget_amount_micros\x1a\"\n OptimizeAdRotationRecommendation\x1a\xd6\x01\n\x1a\x43\x61lloutAssetRecommendation\x12[\n#recommended_campaign_callout_assets\x18\x01 \x03(\x0b\x32).google.ads.googleads.v25.resources.AssetB\x03\xe0\x41\x03\x12[\n#recommended_customer_callout_assets\x18\x02 \x03(\x0b\x32).google.ads.googleads.v25.resources.AssetB\x03\xe0\x41\x03\x1a\xd9\x01\n\x1bSitelinkAssetRecommendation\x12\\\n$recommended_campaign_sitelink_assets\x18\x01 \x03(\x0b\x32).google.ads.googleads.v25.resources.AssetB\x03\xe0\x41\x03\x12\\\n$recommended_customer_sitelink_assets\x18\x02 \x03(\x0b\x32).google.ads.googleads.v25.resources.AssetB\x03\xe0\x41\x03\x1a\x19\n\x17\x43\x61llAssetRecommendation\x1a\xd0\x01\n\x1eKeywordMatchTypeRecommendation\x12\x42\n\x07keyword\x18\x01 \x01(\x0b\x32,.google.ads.googleads.v25.common.KeywordInfoB\x03\xe0\x41\x03\x12j\n\x16recommended_match_type\x18\x02 \x01(\x0e\x32\x45.google.ads.googleads.v25.enums.KeywordMatchTypeEnum.KeywordMatchTypeB\x03\xe0\x41\x03\x1a\xda\x01\n\x1eMoveUnusedBudgetRecommendation\x12(\n\x16\x65xcess_campaign_budget\x18\x03 \x01(\tB\x03\xe0\x41\x03H\x00\x88\x01\x01\x12s\n\x15\x62udget_recommendation\x18\x02 \x01(\x0b\x32O.google.ads.googleads.v25.resources.Recommendation.CampaignBudgetRecommendationB\x03\xe0\x41\x03\x42\x19\n\x17_excess_campaign_budget\x1a\xcb\x01\n\x1dTargetRoasOptInRecommendation\x12)\n\x17recommended_target_roas\x18\x01 \x01(\x01\x42\x03\xe0\x41\x03H\x00\x88\x01\x01\x12\x38\n&required_campaign_budget_amount_micros\x18\x02 \x01(\x03\x42\x03\xe0\x41\x03H\x01\x88\x01\x01\x42\x1a\n\x18_recommended_target_roasB)\n\'_required_campaign_budget_amount_micros\x1a\xb1\x01\n%ResponsiveSearchAdAssetRecommendation\x12?\n\ncurrent_ad\x18\x03 \x01(\x0b\x32&.google.ads.googleads.v25.resources.AdB\x03\xe0\x41\x03\x12G\n\x12recommended_assets\x18\x02 \x01(\x0b\x32&.google.ads.googleads.v25.resources.AdB\x03\xe0\x41\x03\x1a\xb9\x01\n1ResponsiveSearchAdImproveAdStrengthRecommendation\x12?\n\ncurrent_ad\x18\x01 \x01(\x0b\x32&.google.ads.googleads.v25.resources.AdB\x03\xe0\x41\x03\x12\x43\n\x0erecommended_ad\x18\x02 \x01(\x0b\x32&.google.ads.googleads.v25.resources.AdB\x03\xe0\x41\x03\x1a[\n ResponsiveSearchAdRecommendation\x12\x37\n\x02\x61\x64\x18\x01 \x01(\x0b\x32&.google.ads.googleads.v25.resources.AdB\x03\xe0\x41\x03\x1a\x94\x02\n\"UseBroadMatchKeywordRecommendation\x12\x42\n\x07keyword\x18\x01 \x03(\x0b\x32,.google.ads.googleads.v25.common.KeywordInfoB\x03\xe0\x41\x03\x12%\n\x18suggested_keywords_count\x18\x02 \x01(\x03\x42\x03\xe0\x41\x03\x12$\n\x17\x63\x61mpaign_keywords_count\x18\x03 \x01(\x03\x42\x03\xe0\x41\x03\x12(\n\x1b\x63\x61mpaign_uses_shared_budget\x18\x04 \x01(\x08\x42\x03\xe0\x41\x03\x12\x33\n&required_campaign_budget_amount_micros\x18\x05 \x01(\x03\x42\x03\xe0\x41\x03\x1aw\n:UpgradeSmartShoppingCampaignToPerformanceMaxRecommendation\x12\x18\n\x0bmerchant_id\x18\x01 \x01(\x03\x42\x03\xe0\x41\x03\x12\x1f\n\x12sales_country_code\x18\x02 \x01(\tB\x03\xe0\x41\x03\x1a\xc5\x01\n%RaiseTargetCpaBidTooLowRecommendation\x12/\n\x1drecommended_target_multiplier\x18\x01 \x01(\x01\x42\x03\xe0\x41\x03H\x00\x88\x01\x01\x12+\n\x19\x61verage_target_cpa_micros\x18\x02 \x01(\x03\x42\x03\xe0\x41\x03H\x01\x88\x01\x01\x42 \n\x1e_recommended_target_multiplierB\x1c\n\x1a_average_target_cpa_micros\x1a%\n#DisplayExpansionOptInRecommendation\x1a\x34\n2UpgradeLocalCampaignToPerformanceMaxRecommendation\x1a\xaf\x01\n&ForecastingSetTargetRoasRecommendation\x12$\n\x17recommended_target_roas\x18\x01 \x01(\x01\x42\x03\xe0\x41\x03\x12_\n\x0f\x63\x61mpaign_budget\x18\x02 \x01(\x0b\x32\x41.google.ads.googleads.v25.resources.Recommendation.CampaignBudgetB\x03\xe0\x41\x03\x1a\xd5\x01\n$ShoppingOfferAttributeRecommendation\x12V\n\x08merchant\x18\x01 \x01(\x0b\x32?.google.ads.googleads.v25.resources.Recommendation.MerchantInfoB\x03\xe0\x41\x03\x12\x17\n\nfeed_label\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x19\n\x0coffers_count\x18\x03 \x01(\x03\x42\x03\xe0\x41\x03\x12!\n\x14\x64\x65moted_offers_count\x18\x04 \x01(\x03\x42\x03\xe0\x41\x03\x1a\xe5\x01\n,ShoppingFixDisapprovedProductsRecommendation\x12V\n\x08merchant\x18\x01 \x01(\x0b\x32?.google.ads.googleads.v25.resources.Recommendation.MerchantInfoB\x03\xe0\x41\x03\x12\x17\n\nfeed_label\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x1b\n\x0eproducts_count\x18\x03 \x01(\x03\x42\x03\xe0\x41\x03\x12\'\n\x1a\x64isapproved_products_count\x18\x04 \x01(\x03\x42\x03\xe0\x41\x03\x1a\xbe\x01\n%ShoppingTargetAllOffersRecommendation\x12V\n\x08merchant\x18\x01 \x01(\x0b\x32?.google.ads.googleads.v25.resources.Recommendation.MerchantInfoB\x03\xe0\x41\x03\x12$\n\x17untargeted_offers_count\x18\x02 \x01(\x03\x42\x03\xe0\x41\x03\x12\x17\n\nfeed_label\x18\x03 \x01(\tB\x03\xe0\x41\x03\x1a\x8b\x02\n+ShoppingAddProductsToCampaignRecommendation\x12V\n\x08merchant\x18\x01 \x01(\x0b\x32?.google.ads.googleads.v25.resources.Recommendation.MerchantInfoB\x03\xe0\x41\x03\x12\x17\n\nfeed_label\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12k\n\x06reason\x18\x03 \x01(\x0e\x32V.google.ads.googleads.v25.enums.ShoppingAddProductsToCampaignRecommendationEnum.ReasonB\x03\xe0\x41\x03\x1a\xa8\x01\n5ShoppingMerchantCenterAccountSuspensionRecommendation\x12V\n\x08merchant\x18\x01 \x01(\x0b\x32?.google.ads.googleads.v25.resources.Recommendation.MerchantInfoB\x03\xe0\x41\x03\x12\x17\n\nfeed_label\x18\x02 \x01(\tB\x03\xe0\x41\x03\x1a\xbd\x01\nJShoppingMigrateRegularShoppingCampaignOffersToPerformanceMaxRecommendation\x12V\n\x08merchant\x18\x01 \x01(\x0b\x32?.google.ads.googleads.v25.resources.Recommendation.MerchantInfoB\x03\xe0\x41\x03\x12\x17\n\nfeed_label\x18\x02 \x01(\tB\x03\xe0\x41\x03\x1a\x9b\x01\n\x14TargetAdjustmentInfo\x12\x1c\n\nshared_set\x18\x01 \x01(\tB\x03\xe0\x41\x03H\x00\x88\x01\x01\x12*\n\x1drecommended_target_multiplier\x18\x02 \x01(\x01\x42\x03\xe0\x41\x03\x12*\n\x1d\x63urrent_average_target_micros\x18\x03 \x01(\x03\x42\x03\xe0\x41\x03\x42\r\n\x0b_shared_set\x1a\x83\x02\n\x1cRaiseTargetCpaRecommendation\x12g\n\x11target_adjustment\x18\x01 \x01(\x0b\x32G.google.ads.googleads.v25.resources.Recommendation.TargetAdjustmentInfoB\x03\xe0\x41\x03\x12\x65\n\x10\x61pp_bidding_goal\x18\x02 \x01(\x0e\x32\x41.google.ads.googleads.v25.enums.AppBiddingGoalEnum.AppBiddingGoalB\x03\xe0\x41\x03H\x00\x88\x01\x01\x42\x13\n\x11_app_bidding_goal\x1a\x88\x01\n\x1dLowerTargetRoasRecommendation\x12g\n\x11target_adjustment\x18\x01 \x01(\x0b\x32G.google.ads.googleads.v25.resources.Recommendation.TargetAdjustmentInfoB\x03\xe0\x41\x03\x1a*\n(DynamicImageExtensionOptInRecommendation\x1a}\n\x0e\x43\x61mpaignBudget\x12\"\n\x15\x63urrent_amount_micros\x18\x01 \x01(\x03\x42\x03\xe0\x41\x03\x12*\n\x1drecommended_new_amount_micros\x18\x02 \x01(\x03\x42\x03\xe0\x41\x03\x12\x1b\n\x0enew_start_date\x18\x03 \x01(\tB\x03\xe0\x41\x03\x1a#\n!PerformanceMaxOptInRecommendation\x1a\x9e\x01\n-ImprovePerformanceMaxAdStrengthRecommendation\x12\x18\n\x0b\x61sset_group\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12S\n\x0b\x61\x64_strength\x18\x02 \x01(\x0e\x32\x39.google.ads.googleads.v25.enums.AdStrengthEnum.AdStrengthB\x03\xe0\x41\x03\x1aX\n=MigrateDynamicSearchAdsCampaignToPerformanceMaxRecommendation\x12\x17\n\napply_link\x18\x01 \x01(\tB\x03\xe0\x41\x03\x1a\xb4\x01\n%ForecastingSetTargetCpaRecommendation\x12*\n\x1drecommended_target_cpa_micros\x18\x01 \x01(\x03\x42\x03\xe0\x41\x03\x12_\n\x0f\x63\x61mpaign_budget\x18\x02 \x01(\x0b\x32\x41.google.ads.googleads.v25.resources.Recommendation.CampaignBudgetB\x03\xe0\x41\x03\x1a,\n*MaximizeConversionValueOptInRecommendation\x1a(\n&ImproveGoogleTagCoverageRecommendation\x1a+\n)PerformanceMaxFinalUrlOptInRecommendation\x1a\xec\x02\n&RefreshCustomerMatchListRecommendation\x12\x19\n\x0cuser_list_id\x18\x01 \x01(\x03\x42\x03\xe0\x41\x03\x12\x1b\n\x0euser_list_name\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12$\n\x17\x64\x61ys_since_last_refresh\x18\x03 \x01(\x03\x42\x03\xe0\x41\x03\x12\x61\n\x14top_spending_account\x18\x04 \x03(\x0b\x32>.google.ads.googleads.v25.resources.Recommendation.AccountInfoB\x03\xe0\x41\x03\x12%\n\x18targeting_accounts_count\x18\x05 \x01(\x03\x42\x03\xe0\x41\x03\x12Z\n\rowner_account\x18\x06 \x01(\x0b\x32>.google.ads.googleads.v25.resources.Recommendation.AccountInfoB\x03\xe0\x41\x03\x1a\x46\n\x0b\x41\x63\x63ountInfo\x12\x18\n\x0b\x63ustomer_id\x18\x01 \x01(\x03\x42\x03\xe0\x41\x03\x12\x1d\n\x10\x64\x65scriptive_name\x18\x02 \x01(\tB\x03\xe0\x41\x03\x1ah\n!CustomAudienceOptInRecommendation\x12\x43\n\x08keywords\x18\x01 \x03(\x0b\x32,.google.ads.googleads.v25.common.KeywordInfoB\x03\xe0\x41\x03\x1a\x1d\n\x1bLeadFormAssetRecommendation\x1a\xbc\x01\n(ImproveDemandGenAdStrengthRecommendation\x12\x0f\n\x02\x61\x64\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12S\n\x0b\x61\x64_strength\x18\x02 \x01(\x0e\x32\x39.google.ads.googleads.v25.enums.AdStrengthEnum.AdStrengthB\x03\xe0\x41\x03\x12*\n\x1d\x64\x65mand_gen_asset_action_items\x18\x03 \x03(\tB\x03\xe0\x41\x03:i\xea\x41\x66\n\'googleads.googleapis.com/Recommendation\x12;customers/{customer_id}/recommendations/{recommendation_id}B\x10\n\x0erecommendationB\x12\n\x10_campaign_budgetB\x0b\n\t_campaignB\x0b\n\t_ad_groupB\x0c\n\n_dismissedB\x85\x02\n&com.google.ads.googleads.v25.resourcesB\x13RecommendationProtoP\x01ZKgoogle.golang.org/genproto/googleapis/ads/googleads/v25/resources;resources\xa2\x02\x03GAA\xaa\x02\"Google.Ads.GoogleAds.V25.Resources\xca\x02\"Google\\Ads\\GoogleAds\\V25\\Resources\xea\x02&Google::Ads::GoogleAds::V25::Resourcesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Resources + Recommendation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.Recommendation").msgclass + Recommendation::MerchantInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.Recommendation.MerchantInfo").msgclass + Recommendation::RecommendationImpact = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.Recommendation.RecommendationImpact").msgclass + Recommendation::RecommendationMetrics = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.Recommendation.RecommendationMetrics").msgclass + Recommendation::CampaignBudgetRecommendation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.Recommendation.CampaignBudgetRecommendation").msgclass + Recommendation::CampaignBudgetRecommendation::CampaignBudgetRecommendationOption = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.Recommendation.CampaignBudgetRecommendation.CampaignBudgetRecommendationOption").msgclass + Recommendation::KeywordRecommendation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.Recommendation.KeywordRecommendation").msgclass + Recommendation::KeywordRecommendation::SearchTerm = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.Recommendation.KeywordRecommendation.SearchTerm").msgclass + Recommendation::TextAdRecommendation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.Recommendation.TextAdRecommendation").msgclass + Recommendation::TargetCpaOptInRecommendation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.Recommendation.TargetCpaOptInRecommendation").msgclass + Recommendation::TargetCpaOptInRecommendation::TargetCpaOptInRecommendationOption = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.Recommendation.TargetCpaOptInRecommendation.TargetCpaOptInRecommendationOption").msgclass + Recommendation::MaximizeConversionsOptInRecommendation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.Recommendation.MaximizeConversionsOptInRecommendation").msgclass + Recommendation::EnhancedCpcOptInRecommendation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.Recommendation.EnhancedCpcOptInRecommendation").msgclass + Recommendation::SearchPartnersOptInRecommendation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.Recommendation.SearchPartnersOptInRecommendation").msgclass + Recommendation::MaximizeClicksOptInRecommendation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.Recommendation.MaximizeClicksOptInRecommendation").msgclass + Recommendation::OptimizeAdRotationRecommendation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.Recommendation.OptimizeAdRotationRecommendation").msgclass + Recommendation::CalloutAssetRecommendation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.Recommendation.CalloutAssetRecommendation").msgclass + Recommendation::SitelinkAssetRecommendation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.Recommendation.SitelinkAssetRecommendation").msgclass + Recommendation::CallAssetRecommendation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.Recommendation.CallAssetRecommendation").msgclass + Recommendation::KeywordMatchTypeRecommendation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.Recommendation.KeywordMatchTypeRecommendation").msgclass + Recommendation::MoveUnusedBudgetRecommendation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.Recommendation.MoveUnusedBudgetRecommendation").msgclass + Recommendation::TargetRoasOptInRecommendation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.Recommendation.TargetRoasOptInRecommendation").msgclass + Recommendation::ResponsiveSearchAdAssetRecommendation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.Recommendation.ResponsiveSearchAdAssetRecommendation").msgclass + Recommendation::ResponsiveSearchAdImproveAdStrengthRecommendation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.Recommendation.ResponsiveSearchAdImproveAdStrengthRecommendation").msgclass + Recommendation::ResponsiveSearchAdRecommendation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.Recommendation.ResponsiveSearchAdRecommendation").msgclass + Recommendation::UseBroadMatchKeywordRecommendation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.Recommendation.UseBroadMatchKeywordRecommendation").msgclass + Recommendation::UpgradeSmartShoppingCampaignToPerformanceMaxRecommendation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.Recommendation.UpgradeSmartShoppingCampaignToPerformanceMaxRecommendation").msgclass + Recommendation::RaiseTargetCpaBidTooLowRecommendation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.Recommendation.RaiseTargetCpaBidTooLowRecommendation").msgclass + Recommendation::DisplayExpansionOptInRecommendation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.Recommendation.DisplayExpansionOptInRecommendation").msgclass + Recommendation::UpgradeLocalCampaignToPerformanceMaxRecommendation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.Recommendation.UpgradeLocalCampaignToPerformanceMaxRecommendation").msgclass + Recommendation::ForecastingSetTargetRoasRecommendation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.Recommendation.ForecastingSetTargetRoasRecommendation").msgclass + Recommendation::ShoppingOfferAttributeRecommendation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.Recommendation.ShoppingOfferAttributeRecommendation").msgclass + Recommendation::ShoppingFixDisapprovedProductsRecommendation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.Recommendation.ShoppingFixDisapprovedProductsRecommendation").msgclass + Recommendation::ShoppingTargetAllOffersRecommendation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.Recommendation.ShoppingTargetAllOffersRecommendation").msgclass + Recommendation::ShoppingAddProductsToCampaignRecommendation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.Recommendation.ShoppingAddProductsToCampaignRecommendation").msgclass + Recommendation::ShoppingMerchantCenterAccountSuspensionRecommendation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.Recommendation.ShoppingMerchantCenterAccountSuspensionRecommendation").msgclass + Recommendation::ShoppingMigrateRegularShoppingCampaignOffersToPerformanceMaxRecommendation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.Recommendation.ShoppingMigrateRegularShoppingCampaignOffersToPerformanceMaxRecommendation").msgclass + Recommendation::TargetAdjustmentInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.Recommendation.TargetAdjustmentInfo").msgclass + Recommendation::RaiseTargetCpaRecommendation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.Recommendation.RaiseTargetCpaRecommendation").msgclass + Recommendation::LowerTargetRoasRecommendation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.Recommendation.LowerTargetRoasRecommendation").msgclass + Recommendation::DynamicImageExtensionOptInRecommendation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.Recommendation.DynamicImageExtensionOptInRecommendation").msgclass + Recommendation::CampaignBudget = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.Recommendation.CampaignBudget").msgclass + Recommendation::PerformanceMaxOptInRecommendation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.Recommendation.PerformanceMaxOptInRecommendation").msgclass + Recommendation::ImprovePerformanceMaxAdStrengthRecommendation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.Recommendation.ImprovePerformanceMaxAdStrengthRecommendation").msgclass + Recommendation::MigrateDynamicSearchAdsCampaignToPerformanceMaxRecommendation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.Recommendation.MigrateDynamicSearchAdsCampaignToPerformanceMaxRecommendation").msgclass + Recommendation::ForecastingSetTargetCpaRecommendation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.Recommendation.ForecastingSetTargetCpaRecommendation").msgclass + Recommendation::MaximizeConversionValueOptInRecommendation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.Recommendation.MaximizeConversionValueOptInRecommendation").msgclass + Recommendation::ImproveGoogleTagCoverageRecommendation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.Recommendation.ImproveGoogleTagCoverageRecommendation").msgclass + Recommendation::PerformanceMaxFinalUrlOptInRecommendation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.Recommendation.PerformanceMaxFinalUrlOptInRecommendation").msgclass + Recommendation::RefreshCustomerMatchListRecommendation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.Recommendation.RefreshCustomerMatchListRecommendation").msgclass + Recommendation::AccountInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.Recommendation.AccountInfo").msgclass + Recommendation::CustomAudienceOptInRecommendation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.Recommendation.CustomAudienceOptInRecommendation").msgclass + Recommendation::LeadFormAssetRecommendation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.Recommendation.LeadFormAssetRecommendation").msgclass + Recommendation::ImproveDemandGenAdStrengthRecommendation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.Recommendation.ImproveDemandGenAdStrengthRecommendation").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/resources/recommendation_subscription_pb.rb b/lib/google/ads/google_ads/v25/resources/recommendation_subscription_pb.rb new file mode 100644 index 000000000..cc957b0f1 --- /dev/null +++ b/lib/google/ads/google_ads/v25/resources/recommendation_subscription_pb.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/resources/recommendation_subscription.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/enums/recommendation_subscription_status_pb' +require 'google/ads/google_ads/v25/enums/recommendation_type_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' + + +descriptor_data = "\nDgoogle/ads/googleads/v25/resources/recommendation_subscription.proto\x12\"google.ads.googleads.v25.resources\x1aGgoogle/ads/googleads/v25/enums/recommendation_subscription_status.proto\x1a\x38google/ads/googleads/v25/enums/recommendation_type.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\xd6\x04\n\x1aRecommendationSubscription\x12R\n\rresource_name\x18\x01 \x01(\tB;\xe0\x41\x05\xfa\x41\x35\n3googleads.googleapis.com/RecommendationSubscription\x12_\n\x04type\x18\x02 \x01(\x0e\x32I.google.ads.googleads.v25.enums.RecommendationTypeEnum.RecommendationTypeB\x06\xe0\x41\x02\xe0\x41\x05\x12\"\n\x10\x63reate_date_time\x18\x03 \x01(\tB\x03\xe0\x41\x03H\x00\x88\x01\x01\x12\"\n\x10modify_date_time\x18\x04 \x01(\tB\x03\xe0\x41\x03H\x01\x88\x01\x01\x12\x7f\n\x06status\x18\x05 \x01(\x0e\x32\x65.google.ads.googleads.v25.enums.RecommendationSubscriptionStatusEnum.RecommendationSubscriptionStatusB\x03\xe0\x41\x02H\x02\x88\x01\x01:\x84\x01\xea\x41\x80\x01\n3googleads.googleapis.com/RecommendationSubscription\x12Icustomers/{customer_id}/recommendationSubscriptions/{recommendation_type}B\x13\n\x11_create_date_timeB\x13\n\x11_modify_date_timeB\t\n\x07_statusB\x91\x02\n&com.google.ads.googleads.v25.resourcesB\x1fRecommendationSubscriptionProtoP\x01ZKgoogle.golang.org/genproto/googleapis/ads/googleads/v25/resources;resources\xa2\x02\x03GAA\xaa\x02\"Google.Ads.GoogleAds.V25.Resources\xca\x02\"Google\\Ads\\GoogleAds\\V25\\Resources\xea\x02&Google::Ads::GoogleAds::V25::Resourcesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Resources + RecommendationSubscription = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.RecommendationSubscription").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/resources/remarketing_action_pb.rb b/lib/google/ads/google_ads/v25/resources/remarketing_action_pb.rb new file mode 100644 index 000000000..03acf1aae --- /dev/null +++ b/lib/google/ads/google_ads/v25/resources/remarketing_action_pb.rb @@ -0,0 +1,27 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/resources/remarketing_action.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/common/tag_snippet_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' + + +descriptor_data = "\n;google/ads/googleads/v25/resources/remarketing_action.proto\x12\"google.ads.googleads.v25.resources\x1a\x31google/ads/googleads/v25/common/tag_snippet.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\xd4\x02\n\x11RemarketingAction\x12I\n\rresource_name\x18\x01 \x01(\tB2\xe0\x41\x05\xfa\x41,\n*googleads.googleapis.com/RemarketingAction\x12\x14\n\x02id\x18\x05 \x01(\x03\x42\x03\xe0\x41\x03H\x00\x88\x01\x01\x12\x11\n\x04name\x18\x06 \x01(\tH\x01\x88\x01\x01\x12\x46\n\x0ctag_snippets\x18\x04 \x03(\x0b\x32+.google.ads.googleads.v25.common.TagSnippetB\x03\xe0\x41\x03:s\xea\x41p\n*googleads.googleapis.com/RemarketingAction\x12\x42\x63ustomers/{customer_id}/remarketingActions/{remarketing_action_id}B\x05\n\x03_idB\x07\n\x05_nameB\x88\x02\n&com.google.ads.googleads.v25.resourcesB\x16RemarketingActionProtoP\x01ZKgoogle.golang.org/genproto/googleapis/ads/googleads/v25/resources;resources\xa2\x02\x03GAA\xaa\x02\"Google.Ads.GoogleAds.V25.Resources\xca\x02\"Google\\Ads\\GoogleAds\\V25\\Resources\xea\x02&Google::Ads::GoogleAds::V25::Resourcesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Resources + RemarketingAction = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.RemarketingAction").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/resources/search_term_view_pb.rb b/lib/google/ads/google_ads/v25/resources/search_term_view_pb.rb new file mode 100644 index 000000000..91cfc3ae0 --- /dev/null +++ b/lib/google/ads/google_ads/v25/resources/search_term_view_pb.rb @@ -0,0 +1,27 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/resources/search_term_view.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/enums/search_term_targeting_status_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' + + +descriptor_data = "\n9google/ads/googleads/v25/resources/search_term_view.proto\x12\"google.ads.googleads.v25.resources\x1a\x41google/ads/googleads/v25/enums/search_term_targeting_status.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\xbe\x03\n\x0eSearchTermView\x12\x46\n\rresource_name\x18\x01 \x01(\tB/\xe0\x41\x03\xfa\x41)\n\'googleads.googleapis.com/SearchTermView\x12\x1d\n\x0bsearch_term\x18\x05 \x01(\tB\x03\xe0\x41\x03H\x00\x88\x01\x01\x12?\n\x08\x61\x64_group\x18\x06 \x01(\tB(\xe0\x41\x03\xfa\x41\"\n googleads.googleapis.com/AdGroupH\x01\x88\x01\x01\x12l\n\x06status\x18\x04 \x01(\x0e\x32W.google.ads.googleads.v25.enums.SearchTermTargetingStatusEnum.SearchTermTargetingStatusB\x03\xe0\x41\x03:y\xea\x41v\n\'googleads.googleapis.com/SearchTermView\x12Kcustomers/{customer_id}/searchTermViews/{campaign_id}~{ad_group_id}~{query}B\x0e\n\x0c_search_termB\x0b\n\t_ad_groupB\x85\x02\n&com.google.ads.googleads.v25.resourcesB\x13SearchTermViewProtoP\x01ZKgoogle.golang.org/genproto/googleapis/ads/googleads/v25/resources;resources\xa2\x02\x03GAA\xaa\x02\"Google.Ads.GoogleAds.V25.Resources\xca\x02\"Google\\Ads\\GoogleAds\\V25\\Resources\xea\x02&Google::Ads::GoogleAds::V25::Resourcesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Resources + SearchTermView = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.SearchTermView").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/resources/shared_criterion_pb.rb b/lib/google/ads/google_ads/v25/resources/shared_criterion_pb.rb new file mode 100644 index 000000000..a2e4ca72c --- /dev/null +++ b/lib/google/ads/google_ads/v25/resources/shared_criterion_pb.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/resources/shared_criterion.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/common/criteria_pb' +require 'google/ads/google_ads/v25/enums/criterion_type_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' + + +descriptor_data = "\n9google/ads/googleads/v25/resources/shared_criterion.proto\x12\"google.ads.googleads.v25.resources\x1a.google/ads/googleads/v25/common/criteria.proto\x1a\x33google/ads/googleads/v25/enums/criterion_type.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\x8e\n\n\x0fSharedCriterion\x12G\n\rresource_name\x18\x01 \x01(\tB0\xe0\x41\x05\xfa\x41*\n(googleads.googleapis.com/SharedCriterion\x12\x43\n\nshared_set\x18\n \x01(\tB*\xe0\x41\x05\xfa\x41$\n\"googleads.googleapis.com/SharedSetH\x01\x88\x01\x01\x12\x1e\n\x0c\x63riterion_id\x18\x0b \x01(\x03\x42\x03\xe0\x41\x03H\x02\x88\x01\x01\x12R\n\x04type\x18\x04 \x01(\x0e\x32?.google.ads.googleads.v25.enums.CriterionTypeEnum.CriterionTypeB\x03\xe0\x41\x03\x12\x1a\n\x08negative\x18\x0f \x01(\x08\x42\x03\xe0\x41\x05H\x03\x88\x01\x01\x12\x44\n\x07keyword\x18\x03 \x01(\x0b\x32,.google.ads.googleads.v25.common.KeywordInfoB\x03\xe0\x41\x05H\x00\x12O\n\ryoutube_video\x18\x05 \x01(\x0b\x32\x31.google.ads.googleads.v25.common.YouTubeVideoInfoB\x03\xe0\x41\x05H\x00\x12S\n\x0fyoutube_channel\x18\x06 \x01(\x0b\x32\x33.google.ads.googleads.v25.common.YouTubeChannelInfoB\x03\xe0\x41\x05H\x00\x12H\n\tplacement\x18\x07 \x01(\x0b\x32..google.ads.googleads.v25.common.PlacementInfoB\x03\xe0\x41\x05H\x00\x12Z\n\x13mobile_app_category\x18\x08 \x01(\x0b\x32\x36.google.ads.googleads.v25.common.MobileAppCategoryInfoB\x03\xe0\x41\x05H\x00\x12Y\n\x12mobile_application\x18\t \x01(\x0b\x32\x36.google.ads.googleads.v25.common.MobileApplicationInfoB\x03\xe0\x41\x05H\x00\x12@\n\x05\x62rand\x18\x0c \x01(\x0b\x32*.google.ads.googleads.v25.common.BrandInfoB\x03\xe0\x41\x05H\x00\x12\x44\n\x07webpage\x18\r \x01(\x0b\x32,.google.ads.googleads.v25.common.WebpageInfoB\x03\xe0\x41\x05H\x00\x12j\n\x1cvertical_ads_item_group_rule\x18\x0e \x01(\x0b\x32=.google.ads.googleads.v25.common.VerticalAdsItemGroupRuleInfoB\x03\xe0\x41\x05H\x00\x12L\n\rretail_filter\x18\xb5\x01 \x01(\x0b\x32-.google.ads.googleads.v25.common.RetailFilterB\x03\xe0\x41\x05H\x00:t\xea\x41q\n(googleads.googleapis.com/SharedCriterion\x12\x45\x63ustomers/{customer_id}/sharedCriteria/{shared_set_id}~{criterion_id}B\x0b\n\tcriterionB\r\n\x0b_shared_setB\x0f\n\r_criterion_idB\x0b\n\t_negativeB\x86\x02\n&com.google.ads.googleads.v25.resourcesB\x14SharedCriterionProtoP\x01ZKgoogle.golang.org/genproto/googleapis/ads/googleads/v25/resources;resources\xa2\x02\x03GAA\xaa\x02\"Google.Ads.GoogleAds.V25.Resources\xca\x02\"Google\\Ads\\GoogleAds\\V25\\Resources\xea\x02&Google::Ads::GoogleAds::V25::Resourcesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Resources + SharedCriterion = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.SharedCriterion").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/resources/shared_set_pb.rb b/lib/google/ads/google_ads/v25/resources/shared_set_pb.rb new file mode 100644 index 000000000..b6883400e --- /dev/null +++ b/lib/google/ads/google_ads/v25/resources/shared_set_pb.rb @@ -0,0 +1,29 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/resources/shared_set.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/enums/shared_set_status_pb' +require 'google/ads/google_ads/v25/enums/shared_set_type_pb' +require 'google/ads/google_ads/v25/enums/vertical_ads_item_vertical_type_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' + + +descriptor_data = "\n3google/ads/googleads/v25/resources/shared_set.proto\x12\"google.ads.googleads.v25.resources\x1a\x36google/ads/googleads/v25/enums/shared_set_status.proto\x1a\x34google/ads/googleads/v25/enums/shared_set_type.proto\x1a\x44google/ads/googleads/v25/enums/vertical_ads_item_vertical_type.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\xaf\x05\n\tSharedSet\x12\x41\n\rresource_name\x18\x01 \x01(\tB*\xe0\x41\x05\xfa\x41$\n\"googleads.googleapis.com/SharedSet\x12\x14\n\x02id\x18\x08 \x01(\x03\x42\x03\xe0\x41\x03H\x00\x88\x01\x01\x12R\n\x04type\x18\x03 \x01(\x0e\x32?.google.ads.googleads.v25.enums.SharedSetTypeEnum.SharedSetTypeB\x03\xe0\x41\x05\x12\x11\n\x04name\x18\t \x01(\tH\x01\x88\x01\x01\x12X\n\x06status\x18\x05 \x01(\x0e\x32\x43.google.ads.googleads.v25.enums.SharedSetStatusEnum.SharedSetStatusB\x03\xe0\x41\x03\x12\x1e\n\x0cmember_count\x18\n \x01(\x03\x42\x03\xe0\x41\x03H\x02\x88\x01\x01\x12!\n\x0freference_count\x18\x0b \x01(\x03\x42\x03\xe0\x41\x03H\x03\x88\x01\x01\x12\x8e\x01\n\x1fvertical_ads_item_vertical_type\x18\x0c \x01(\x0e\x32[.google.ads.googleads.v25.enums.VerticalAdsItemVerticalTypeEnum.VerticalAdsItemVerticalTypeB\x03\xe0\x41\x05H\x04\x88\x01\x01:[\xea\x41X\n\"googleads.googleapis.com/SharedSet\x12\x32\x63ustomers/{customer_id}/sharedSets/{shared_set_id}B\x05\n\x03_idB\x07\n\x05_nameB\x0f\n\r_member_countB\x12\n\x10_reference_countB\"\n _vertical_ads_item_vertical_typeB\x80\x02\n&com.google.ads.googleads.v25.resourcesB\x0eSharedSetProtoP\x01ZKgoogle.golang.org/genproto/googleapis/ads/googleads/v25/resources;resources\xa2\x02\x03GAA\xaa\x02\"Google.Ads.GoogleAds.V25.Resources\xca\x02\"Google\\Ads\\GoogleAds\\V25\\Resources\xea\x02&Google::Ads::GoogleAds::V25::Resourcesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Resources + SharedSet = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.SharedSet").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/resources/shopping_performance_view_pb.rb b/lib/google/ads/google_ads/v25/resources/shopping_performance_view_pb.rb new file mode 100644 index 000000000..0dd05bef5 --- /dev/null +++ b/lib/google/ads/google_ads/v25/resources/shopping_performance_view_pb.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/resources/shopping_performance_view.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' + + +descriptor_data = "\nBgoogle/ads/googleads/v25/resources/shopping_performance_view.proto\x12\"google.ads.googleads.v25.resources\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\xd2\x01\n\x17ShoppingPerformanceView\x12O\n\rresource_name\x18\x01 \x01(\tB8\xe0\x41\x03\xfa\x41\x32\n0googleads.googleapis.com/ShoppingPerformanceView:f\xea\x41\x63\n0googleads.googleapis.com/ShoppingPerformanceView\x12/customers/{customer_id}/shoppingPerformanceViewB\x8e\x02\n&com.google.ads.googleads.v25.resourcesB\x1cShoppingPerformanceViewProtoP\x01ZKgoogle.golang.org/genproto/googleapis/ads/googleads/v25/resources;resources\xa2\x02\x03GAA\xaa\x02\"Google.Ads.GoogleAds.V25.Resources\xca\x02\"Google\\Ads\\GoogleAds\\V25\\Resources\xea\x02&Google::Ads::GoogleAds::V25::Resourcesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Resources + ShoppingPerformanceView = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.ShoppingPerformanceView").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/resources/shopping_product_pb.rb b/lib/google/ads/google_ads/v25/resources/shopping_product_pb.rb new file mode 100644 index 000000000..a909aa6d1 --- /dev/null +++ b/lib/google/ads/google_ads/v25/resources/shopping_product_pb.rb @@ -0,0 +1,33 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/resources/shopping_product.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/enums/product_availability_pb' +require 'google/ads/google_ads/v25/enums/product_channel_pb' +require 'google/ads/google_ads/v25/enums/product_channel_exclusivity_pb' +require 'google/ads/google_ads/v25/enums/product_condition_pb' +require 'google/ads/google_ads/v25/enums/product_issue_severity_pb' +require 'google/ads/google_ads/v25/enums/product_status_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' + + +descriptor_data = "\n9google/ads/googleads/v25/resources/shopping_product.proto\x12\"google.ads.googleads.v25.resources\x1a\x39google/ads/googleads/v25/enums/product_availability.proto\x1a\x34google/ads/googleads/v25/enums/product_channel.proto\x1a@google/ads/googleads/v25/enums/product_channel_exclusivity.proto\x1a\x36google/ads/googleads/v25/enums/product_condition.proto\x1a;google/ads/googleads/v25/enums/product_issue_severity.proto\x1a\x33google/ads/googleads/v25/enums/product_status.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\xfa\x17\n\x0fShoppingProduct\x12G\n\rresource_name\x18\x01 \x01(\tB0\xe0\x41\x03\xfa\x41*\n(googleads.googleapis.com/ShoppingProduct\x12\x1f\n\x12merchant_center_id\x18\x02 \x01(\x03\x42\x03\xe0\x41\x03\x12W\n\x07\x63hannel\x18\x03 \x01(\x0e\x32\x41.google.ads.googleads.v25.enums.ProductChannelEnum.ProductChannelB\x03\xe0\x41\x03\x12\x1a\n\rlanguage_code\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12\x17\n\nfeed_label\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12\x14\n\x07item_id\x18\x06 \x01(\tB\x03\xe0\x41\x03\x12)\n\x17multi_client_account_id\x18\x07 \x01(\x03\x42\x03\xe0\x41\x03H\x00\x88\x01\x01\x12\x17\n\x05title\x18\x08 \x01(\tB\x03\xe0\x41\x03H\x01\x88\x01\x01\x12\x17\n\x05\x62rand\x18\t \x01(\tB\x03\xe0\x41\x03H\x02\x88\x01\x01\x12#\n\x11product_image_uri\x18$ \x01(\tB\x03\xe0\x41\x03H\x03\x88\x01\x01\x12\x1e\n\x0cprice_micros\x18\n \x01(\x03\x42\x03\xe0\x41\x03H\x04\x88\x01\x01\x12\x1f\n\rcurrency_code\x18\x0b \x01(\tB\x03\xe0\x41\x03H\x05\x88\x01\x01\x12~\n\x13\x63hannel_exclusivity\x18\x0c \x01(\x0e\x32W.google.ads.googleads.v25.enums.ProductChannelExclusivityEnum.ProductChannelExclusivityB\x03\xe0\x41\x03H\x06\x88\x01\x01\x12\x62\n\tcondition\x18\r \x01(\x0e\x32\x45.google.ads.googleads.v25.enums.ProductConditionEnum.ProductConditionB\x03\xe0\x41\x03H\x07\x88\x01\x01\x12k\n\x0c\x61vailability\x18\x0e \x01(\x0e\x32K.google.ads.googleads.v25.enums.ProductAvailabilityEnum.ProductAvailabilityB\x03\xe0\x41\x03H\x08\x88\x01\x01\x12\x1d\n\x10target_countries\x18\x0f \x03(\tB\x03\xe0\x41\x03\x12#\n\x11\x63ustom_attribute0\x18\x10 \x01(\tB\x03\xe0\x41\x03H\t\x88\x01\x01\x12#\n\x11\x63ustom_attribute1\x18\x11 \x01(\tB\x03\xe0\x41\x03H\n\x88\x01\x01\x12#\n\x11\x63ustom_attribute2\x18\x12 \x01(\tB\x03\xe0\x41\x03H\x0b\x88\x01\x01\x12#\n\x11\x63ustom_attribute3\x18\x13 \x01(\tB\x03\xe0\x41\x03H\x0c\x88\x01\x01\x12#\n\x11\x63ustom_attribute4\x18\x14 \x01(\tB\x03\xe0\x41\x03H\r\x88\x01\x01\x12V\n\x0f\x63\x61tegory_level1\x18\x15 \x01(\tB8\xe0\x41\x03\xfa\x41\x32\n0googleads.googleapis.com/ProductCategoryConstantH\x0e\x88\x01\x01\x12V\n\x0f\x63\x61tegory_level2\x18\x16 \x01(\tB8\xe0\x41\x03\xfa\x41\x32\n0googleads.googleapis.com/ProductCategoryConstantH\x0f\x88\x01\x01\x12V\n\x0f\x63\x61tegory_level3\x18\x17 \x01(\tB8\xe0\x41\x03\xfa\x41\x32\n0googleads.googleapis.com/ProductCategoryConstantH\x10\x88\x01\x01\x12V\n\x0f\x63\x61tegory_level4\x18\x18 \x01(\tB8\xe0\x41\x03\xfa\x41\x32\n0googleads.googleapis.com/ProductCategoryConstantH\x11\x88\x01\x01\x12V\n\x0f\x63\x61tegory_level5\x18\x19 \x01(\tB8\xe0\x41\x03\xfa\x41\x32\n0googleads.googleapis.com/ProductCategoryConstantH\x12\x88\x01\x01\x12%\n\x13product_type_level1\x18\x1a \x01(\tB\x03\xe0\x41\x03H\x13\x88\x01\x01\x12%\n\x13product_type_level2\x18\x1b \x01(\tB\x03\xe0\x41\x03H\x14\x88\x01\x01\x12%\n\x13product_type_level3\x18\x1c \x01(\tB\x03\xe0\x41\x03H\x15\x88\x01\x01\x12%\n\x13product_type_level4\x18\x1d \x01(\tB\x03\xe0\x41\x03H\x16\x88\x01\x01\x12%\n\x13product_type_level5\x18\x1e \x01(\tB\x03\xe0\x41\x03H\x17\x88\x01\x01\x12*\n\x18\x65\x66\x66\x65\x63tive_max_cpc_micros\x18\x1f \x01(\x03\x42\x03\xe0\x41\x03H\x18\x88\x01\x01\x12T\n\x06status\x18 \x01(\x0e\x32?.google.ads.googleads.v25.enums.ProductStatusEnum.ProductStatusB\x03\xe0\x41\x03\x12U\n\x06issues\x18! \x03(\x0b\x32@.google.ads.googleads.v25.resources.ShoppingProduct.ProductIssueB\x03\xe0\x41\x03\x12@\n\x08\x63\x61mpaign\x18\" \x01(\tB)\xe0\x41\x03\xfa\x41#\n!googleads.googleapis.com/CampaignH\x19\x88\x01\x01\x12?\n\x08\x61\x64_group\x18# \x01(\tB(\xe0\x41\x03\xfa\x41\"\n googleads.googleapis.com/AdGroupH\x1a\x88\x01\x01\x1a\xb0\x02\n\x0cProductIssue\x12\x17\n\nerror_code\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12h\n\x0c\x61\x64s_severity\x18\x02 \x01(\x0e\x32M.google.ads.googleads.v25.enums.ProductIssueSeverityEnum.ProductIssueSeverityB\x03\xe0\x41\x03\x12 \n\x0e\x61ttribute_name\x18\x03 \x01(\tB\x03\xe0\x41\x03H\x00\x88\x01\x01\x12\x18\n\x0b\x64\x65scription\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12\x13\n\x06\x64\x65tail\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12\x1a\n\rdocumentation\x18\x06 \x01(\tB\x03\xe0\x41\x03\x12\x1d\n\x10\x61\x66\x66\x65\x63ted_regions\x18\x07 \x03(\tB\x03\xe0\x41\x03\x42\x11\n\x0f_attribute_name:\xc1\x01\xea\x41\xbd\x01\n(googleads.googleapis.com/ShoppingProduct\x12ncustomers/{customer_id}/shoppingProducts/{merchant_center_id}~{channel}~{language_code}~{feed_label}~{item_id}*\x10shoppingProducts2\x0fshoppingProductB\x1a\n\x18_multi_client_account_idB\x08\n\x06_titleB\x08\n\x06_brandB\x14\n\x12_product_image_uriB\x0f\n\r_price_microsB\x10\n\x0e_currency_codeB\x16\n\x14_channel_exclusivityB\x0c\n\n_conditionB\x0f\n\r_availabilityB\x14\n\x12_custom_attribute0B\x14\n\x12_custom_attribute1B\x14\n\x12_custom_attribute2B\x14\n\x12_custom_attribute3B\x14\n\x12_custom_attribute4B\x12\n\x10_category_level1B\x12\n\x10_category_level2B\x12\n\x10_category_level3B\x12\n\x10_category_level4B\x12\n\x10_category_level5B\x16\n\x14_product_type_level1B\x16\n\x14_product_type_level2B\x16\n\x14_product_type_level3B\x16\n\x14_product_type_level4B\x16\n\x14_product_type_level5B\x1b\n\x19_effective_max_cpc_microsB\x0b\n\t_campaignB\x0b\n\t_ad_groupB\x86\x02\n&com.google.ads.googleads.v25.resourcesB\x14ShoppingProductProtoP\x01ZKgoogle.golang.org/genproto/googleapis/ads/googleads/v25/resources;resources\xa2\x02\x03GAA\xaa\x02\"Google.Ads.GoogleAds.V25.Resources\xca\x02\"Google\\Ads\\GoogleAds\\V25\\Resources\xea\x02&Google::Ads::GoogleAds::V25::Resourcesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Resources + ShoppingProduct = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.ShoppingProduct").msgclass + ShoppingProduct::ProductIssue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.ShoppingProduct.ProductIssue").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/resources/smart_campaign_search_term_view_pb.rb b/lib/google/ads/google_ads/v25/resources/smart_campaign_search_term_view_pb.rb new file mode 100644 index 000000000..19f89c807 --- /dev/null +++ b/lib/google/ads/google_ads/v25/resources/smart_campaign_search_term_view_pb.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/resources/smart_campaign_search_term_view.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' + + +descriptor_data = "\nHgoogle/ads/googleads/v25/resources/smart_campaign_search_term_view.proto\x12\"google.ads.googleads.v25.resources\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\xd2\x02\n\x1bSmartCampaignSearchTermView\x12S\n\rresource_name\x18\x01 \x01(\tB<\xe0\x41\x03\xfa\x41\x36\n4googleads.googleapis.com/SmartCampaignSearchTermView\x12\x18\n\x0bsearch_term\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12;\n\x08\x63\x61mpaign\x18\x03 \x01(\tB)\xe0\x41\x03\xfa\x41#\n!googleads.googleapis.com/Campaign:\x86\x01\xea\x41\x82\x01\n4googleads.googleapis.com/SmartCampaignSearchTermView\x12Jcustomers/{customer_id}/smartCampaignSearchTermViews/{campaign_id}~{query}B\x92\x02\n&com.google.ads.googleads.v25.resourcesB SmartCampaignSearchTermViewProtoP\x01ZKgoogle.golang.org/genproto/googleapis/ads/googleads/v25/resources;resources\xa2\x02\x03GAA\xaa\x02\"Google.Ads.GoogleAds.V25.Resources\xca\x02\"Google\\Ads\\GoogleAds\\V25\\Resources\xea\x02&Google::Ads::GoogleAds::V25::Resourcesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Resources + SmartCampaignSearchTermView = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.SmartCampaignSearchTermView").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/resources/smart_campaign_setting_pb.rb b/lib/google/ads/google_ads/v25/resources/smart_campaign_setting_pb.rb new file mode 100644 index 000000000..261af4942 --- /dev/null +++ b/lib/google/ads/google_ads/v25/resources/smart_campaign_setting_pb.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/resources/smart_campaign_setting.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' + + +descriptor_data = "\n?google/ads/googleads/v25/resources/smart_campaign_setting.proto\x12\"google.ads.googleads.v25.resources\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\xd8\x06\n\x14SmartCampaignSetting\x12L\n\rresource_name\x18\x01 \x01(\tB5\xe0\x41\x05\xfa\x41/\n-googleads.googleapis.com/SmartCampaignSetting\x12;\n\x08\x63\x61mpaign\x18\x02 \x01(\tB)\xe0\x41\x03\xfa\x41#\n!googleads.googleapis.com/Campaign\x12Z\n\x0cphone_number\x18\x03 \x01(\x0b\x32\x44.google.ads.googleads.v25.resources.SmartCampaignSetting.PhoneNumber\x12!\n\x19\x61\x64vertising_language_code\x18\x07 \x01(\t\x12\x13\n\tfinal_url\x18\x08 \x01(\tH\x00\x12\x8b\x01\n%ad_optimized_business_profile_setting\x18\t \x01(\x0b\x32Z.google.ads.googleads.v25.resources.SmartCampaignSetting.AdOptimizedBusinessProfileSettingH\x00\x12\x17\n\rbusiness_name\x18\x05 \x01(\tH\x01\x12#\n\x19\x62usiness_profile_location\x18\n \x01(\tH\x01\x1a\x65\n\x0bPhoneNumber\x12\x19\n\x0cphone_number\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x19\n\x0c\x63ountry_code\x18\x02 \x01(\tH\x01\x88\x01\x01\x42\x0f\n\r_phone_numberB\x0f\n\r_country_code\x1aY\n!AdOptimizedBusinessProfileSetting\x12\x1e\n\x11include_lead_form\x18\x01 \x01(\x08H\x00\x88\x01\x01\x42\x14\n\x12_include_lead_form:o\xea\x41l\n-googleads.googleapis.com/SmartCampaignSetting\x12;customers/{customer_id}/smartCampaignSettings/{campaign_id}B\x0e\n\x0clanding_pageB\x12\n\x10\x62usiness_settingB\x8b\x02\n&com.google.ads.googleads.v25.resourcesB\x19SmartCampaignSettingProtoP\x01ZKgoogle.golang.org/genproto/googleapis/ads/googleads/v25/resources;resources\xa2\x02\x03GAA\xaa\x02\"Google.Ads.GoogleAds.V25.Resources\xca\x02\"Google\\Ads\\GoogleAds\\V25\\Resources\xea\x02&Google::Ads::GoogleAds::V25::Resourcesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Resources + SmartCampaignSetting = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.SmartCampaignSetting").msgclass + SmartCampaignSetting::PhoneNumber = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.SmartCampaignSetting.PhoneNumber").msgclass + SmartCampaignSetting::AdOptimizedBusinessProfileSetting = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.SmartCampaignSetting.AdOptimizedBusinessProfileSetting").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/resources/targeting_expansion_view_pb.rb b/lib/google/ads/google_ads/v25/resources/targeting_expansion_view_pb.rb new file mode 100644 index 000000000..d54313568 --- /dev/null +++ b/lib/google/ads/google_ads/v25/resources/targeting_expansion_view_pb.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/resources/targeting_expansion_view.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' + + +descriptor_data = "\nAgoogle/ads/googleads/v25/resources/targeting_expansion_view.proto\x12\"google.ads.googleads.v25.resources\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\xab\x02\n\x16TargetingExpansionView\x12N\n\rresource_name\x18\x01 \x01(\tB7\xe0\x41\x03\xfa\x41\x31\n/googleads.googleapis.com/TargetingExpansionView:\xc0\x01\xea\x41\xbc\x01\n/googleads.googleapis.com/TargetingExpansionView\x12Xcustomers/{customer_id}/targetingExpansionViews/{campaign_id}~{targeting_expansion_type}*\x17targetingExpansionViews2\x16targetingExpansionViewB\x8d\x02\n&com.google.ads.googleads.v25.resourcesB\x1bTargetingExpansionViewProtoP\x01ZKgoogle.golang.org/genproto/googleapis/ads/googleads/v25/resources;resources\xa2\x02\x03GAA\xaa\x02\"Google.Ads.GoogleAds.V25.Resources\xca\x02\"Google\\Ads\\GoogleAds\\V25\\Resources\xea\x02&Google::Ads::GoogleAds::V25::Resourcesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Resources + TargetingExpansionView = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.TargetingExpansionView").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/resources/third_party_app_analytics_link_pb.rb b/lib/google/ads/google_ads/v25/resources/third_party_app_analytics_link_pb.rb new file mode 100644 index 000000000..96206e225 --- /dev/null +++ b/lib/google/ads/google_ads/v25/resources/third_party_app_analytics_link_pb.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/resources/third_party_app_analytics_link.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' + + +descriptor_data = "\nGgoogle/ads/googleads/v25/resources/third_party_app_analytics_link.proto\x12\"google.ads.googleads.v25.resources\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\xae\x02\n\x1aThirdPartyAppAnalyticsLink\x12R\n\rresource_name\x18\x01 \x01(\tB;\xe0\x41\x05\xfa\x41\x35\n3googleads.googleapis.com/ThirdPartyAppAnalyticsLink\x12#\n\x11shareable_link_id\x18\x03 \x01(\tB\x03\xe0\x41\x03H\x00\x88\x01\x01:\x80\x01\xea\x41}\n3googleads.googleapis.com/ThirdPartyAppAnalyticsLink\x12\x46\x63ustomers/{customer_id}/thirdPartyAppAnalyticsLinks/{customer_link_id}B\x14\n\x12_shareable_link_idB\x91\x02\n&com.google.ads.googleads.v25.resourcesB\x1fThirdPartyAppAnalyticsLinkProtoP\x01ZKgoogle.golang.org/genproto/googleapis/ads/googleads/v25/resources;resources\xa2\x02\x03GAA\xaa\x02\"Google.Ads.GoogleAds.V25.Resources\xca\x02\"Google\\Ads\\GoogleAds\\V25\\Resources\xea\x02&Google::Ads::GoogleAds::V25::Resourcesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Resources + ThirdPartyAppAnalyticsLink = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.ThirdPartyAppAnalyticsLink").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/resources/topic_constant_pb.rb b/lib/google/ads/google_ads/v25/resources/topic_constant_pb.rb new file mode 100644 index 000000000..33cf00d1b --- /dev/null +++ b/lib/google/ads/google_ads/v25/resources/topic_constant_pb.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/resources/topic_constant.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' + + +descriptor_data = "\n7google/ads/googleads/v25/resources/topic_constant.proto\x12\"google.ads.googleads.v25.resources\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\xbc\x02\n\rTopicConstant\x12\x45\n\rresource_name\x18\x01 \x01(\tB.\xe0\x41\x03\xfa\x41(\n&googleads.googleapis.com/TopicConstant\x12\x14\n\x02id\x18\x05 \x01(\x03\x42\x03\xe0\x41\x03H\x00\x88\x01\x01\x12R\n\x15topic_constant_parent\x18\x06 \x01(\tB.\xe0\x41\x03\xfa\x41(\n&googleads.googleapis.com/TopicConstantH\x01\x88\x01\x01\x12\x11\n\x04path\x18\x07 \x03(\tB\x03\xe0\x41\x03:F\xea\x41\x43\n&googleads.googleapis.com/TopicConstant\x12\x19topicConstants/{topic_id}B\x05\n\x03_idB\x18\n\x16_topic_constant_parentB\x84\x02\n&com.google.ads.googleads.v25.resourcesB\x12TopicConstantProtoP\x01ZKgoogle.golang.org/genproto/googleapis/ads/googleads/v25/resources;resources\xa2\x02\x03GAA\xaa\x02\"Google.Ads.GoogleAds.V25.Resources\xca\x02\"Google\\Ads\\GoogleAds\\V25\\Resources\xea\x02&Google::Ads::GoogleAds::V25::Resourcesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Resources + TopicConstant = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.TopicConstant").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/resources/topic_view_pb.rb b/lib/google/ads/google_ads/v25/resources/topic_view_pb.rb new file mode 100644 index 000000000..0724f18c0 --- /dev/null +++ b/lib/google/ads/google_ads/v25/resources/topic_view_pb.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/resources/topic_view.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' + + +descriptor_data = "\n3google/ads/googleads/v25/resources/topic_view.proto\x12\"google.ads.googleads.v25.resources\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\xb8\x01\n\tTopicView\x12\x41\n\rresource_name\x18\x01 \x01(\tB*\xe0\x41\x03\xfa\x41$\n\"googleads.googleapis.com/TopicView:h\xea\x41\x65\n\"googleads.googleapis.com/TopicView\x12?customers/{customer_id}/topicViews/{ad_group_id}~{criterion_id}B\x80\x02\n&com.google.ads.googleads.v25.resourcesB\x0eTopicViewProtoP\x01ZKgoogle.golang.org/genproto/googleapis/ads/googleads/v25/resources;resources\xa2\x02\x03GAA\xaa\x02\"Google.Ads.GoogleAds.V25.Resources\xca\x02\"Google\\Ads\\GoogleAds\\V25\\Resources\xea\x02&Google::Ads::GoogleAds::V25::Resourcesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Resources + TopicView = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.TopicView").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/resources/travel_activity_group_view_pb.rb b/lib/google/ads/google_ads/v25/resources/travel_activity_group_view_pb.rb new file mode 100644 index 000000000..cb68dbe86 --- /dev/null +++ b/lib/google/ads/google_ads/v25/resources/travel_activity_group_view_pb.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/resources/travel_activity_group_view.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' + + +descriptor_data = "\nCgoogle/ads/googleads/v25/resources/travel_activity_group_view.proto\x12\"google.ads.googleads.v25.resources\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\xf2\x01\n\x17TravelActivityGroupView\x12O\n\rresource_name\x18\x01 \x01(\tB8\xe0\x41\x03\xfa\x41\x32\n0googleads.googleapis.com/TravelActivityGroupView:\x85\x01\xea\x41\x81\x01\n0googleads.googleapis.com/TravelActivityGroupView\x12Mcustomers/{customer_id}/travelActivityGroupViews/{ad_group_id}~{criterion_id}B\x8e\x02\n&com.google.ads.googleads.v25.resourcesB\x1cTravelActivityGroupViewProtoP\x01ZKgoogle.golang.org/genproto/googleapis/ads/googleads/v25/resources;resources\xa2\x02\x03GAA\xaa\x02\"Google.Ads.GoogleAds.V25.Resources\xca\x02\"Google\\Ads\\GoogleAds\\V25\\Resources\xea\x02&Google::Ads::GoogleAds::V25::Resourcesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Resources + TravelActivityGroupView = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.TravelActivityGroupView").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/resources/travel_activity_performance_view_pb.rb b/lib/google/ads/google_ads/v25/resources/travel_activity_performance_view_pb.rb new file mode 100644 index 000000000..92de99f91 --- /dev/null +++ b/lib/google/ads/google_ads/v25/resources/travel_activity_performance_view_pb.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/resources/travel_activity_performance_view.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' + + +descriptor_data = "\nIgoogle/ads/googleads/v25/resources/travel_activity_performance_view.proto\x12\"google.ads.googleads.v25.resources\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\xeb\x01\n\x1dTravelActivityPerformanceView\x12U\n\rresource_name\x18\x01 \x01(\tB>\xe0\x41\x03\xfa\x41\x38\n6googleads.googleapis.com/TravelActivityPerformanceView:s\xea\x41p\n6googleads.googleapis.com/TravelActivityPerformanceView\x12\x36\x63ustomers/{customer_id}/travelActivityPerformanceViewsB\x94\x02\n&com.google.ads.googleads.v25.resourcesB\"TravelActivityPerformanceViewProtoP\x01ZKgoogle.golang.org/genproto/googleapis/ads/googleads/v25/resources;resources\xa2\x02\x03GAA\xaa\x02\"Google.Ads.GoogleAds.V25.Resources\xca\x02\"Google\\Ads\\GoogleAds\\V25\\Resources\xea\x02&Google::Ads::GoogleAds::V25::Resourcesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Resources + TravelActivityPerformanceView = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.TravelActivityPerformanceView").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/resources/user_interest_pb.rb b/lib/google/ads/google_ads/v25/resources/user_interest_pb.rb new file mode 100644 index 000000000..45c535ab2 --- /dev/null +++ b/lib/google/ads/google_ads/v25/resources/user_interest_pb.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/resources/user_interest.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/common/criterion_category_availability_pb' +require 'google/ads/google_ads/v25/enums/user_interest_taxonomy_type_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' + + +descriptor_data = "\n6google/ads/googleads/v25/resources/user_interest.proto\x12\"google.ads.googleads.v25.resources\x1a\x45google/ads/googleads/v25/common/criterion_category_availability.proto\x1a@google/ads/googleads/v25/enums/user_interest_taxonomy_type.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\x86\x05\n\x0cUserInterest\x12\x44\n\rresource_name\x18\x01 \x01(\tB-\xe0\x41\x03\xfa\x41\'\n%googleads.googleapis.com/UserInterest\x12q\n\rtaxonomy_type\x18\x02 \x01(\x0e\x32U.google.ads.googleads.v25.enums.UserInterestTaxonomyTypeEnum.UserInterestTaxonomyTypeB\x03\xe0\x41\x03\x12\"\n\x10user_interest_id\x18\x08 \x01(\x03\x42\x03\xe0\x41\x03H\x00\x88\x01\x01\x12\x16\n\x04name\x18\t \x01(\tB\x03\xe0\x41\x03H\x01\x88\x01\x01\x12P\n\x14user_interest_parent\x18\n \x01(\tB-\xe0\x41\x03\xfa\x41\'\n%googleads.googleapis.com/UserInterestH\x02\x88\x01\x01\x12!\n\x0flaunched_to_all\x18\x0b \x01(\x08\x42\x03\xe0\x41\x03H\x03\x88\x01\x01\x12[\n\x0e\x61vailabilities\x18\x07 \x03(\x0b\x32>.google.ads.googleads.v25.common.CriterionCategoryAvailabilityB\x03\xe0\x41\x03:d\xea\x41\x61\n%googleads.googleapis.com/UserInterest\x12\x38\x63ustomers/{customer_id}/userInterests/{user_interest_id}B\x13\n\x11_user_interest_idB\x07\n\x05_nameB\x17\n\x15_user_interest_parentB\x12\n\x10_launched_to_allB\x83\x02\n&com.google.ads.googleads.v25.resourcesB\x11UserInterestProtoP\x01ZKgoogle.golang.org/genproto/googleapis/ads/googleads/v25/resources;resources\xa2\x02\x03GAA\xaa\x02\"Google.Ads.GoogleAds.V25.Resources\xca\x02\"Google\\Ads\\GoogleAds\\V25\\Resources\xea\x02&Google::Ads::GoogleAds::V25::Resourcesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Resources + UserInterest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.UserInterest").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/resources/user_list_customer_type_pb.rb b/lib/google/ads/google_ads/v25/resources/user_list_customer_type_pb.rb new file mode 100644 index 000000000..e2d8d53e7 --- /dev/null +++ b/lib/google/ads/google_ads/v25/resources/user_list_customer_type_pb.rb @@ -0,0 +1,27 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/resources/user_list_customer_type.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/enums/user_list_customer_type_category_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' + + +descriptor_data = "\n@google/ads/googleads/v25/resources/user_list_customer_type.proto\x12\"google.ads.googleads.v25.resources\x1a\x45google/ads/googleads/v25/enums/user_list_customer_type_category.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\xab\x03\n\x14UserListCustomerType\x12L\n\rresource_name\x18\x01 \x01(\tB5\xe0\x41\x05\xfa\x41/\n-googleads.googleapis.com/UserListCustomerType\x12<\n\tuser_list\x18\x02 \x01(\tB)\xe0\x41\x05\xfa\x41#\n!googleads.googleapis.com/UserList\x12\x82\x01\n\x16\x63ustomer_type_category\x18\x03 \x01(\x0e\x32].google.ads.googleads.v25.enums.UserListCustomerTypeCategoryEnum.UserListCustomerTypeCategoryB\x03\xe0\x41\x05:\x81\x01\xea\x41~\n-googleads.googleapis.com/UserListCustomerType\x12Mcustomers/{customer_id}/userListCustomerTypes/{user_list_id}~{semantic_label}B\x8b\x02\n&com.google.ads.googleads.v25.resourcesB\x19UserListCustomerTypeProtoP\x01ZKgoogle.golang.org/genproto/googleapis/ads/googleads/v25/resources;resources\xa2\x02\x03GAA\xaa\x02\"Google.Ads.GoogleAds.V25.Resources\xca\x02\"Google\\Ads\\GoogleAds\\V25\\Resources\xea\x02&Google::Ads::GoogleAds::V25::Resourcesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Resources + UserListCustomerType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.resources.UserListCustomerType").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/resources/user_list_pb.rb b/lib/google/ads/google_ads/v25/resources/user_list_pb.rb new file mode 100644 index 000000000..2ce06aa02 --- /dev/null +++ b/lib/google/ads/google_ads/v25/resources/user_list_pb.rb @@ -0,0 +1,33 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/resources/user_list.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/common/user_lists_pb' +require 'google/ads/google_ads/v25/enums/access_reason_pb' +require 'google/ads/google_ads/v25/enums/user_list_access_status_pb' +require 'google/ads/google_ads/v25/enums/user_list_closing_reason_pb' +require 'google/ads/google_ads/v25/enums/user_list_membership_status_pb' +require 'google/ads/google_ads/v25/enums/user_list_size_range_pb' +require 'google/ads/google_ads/v25/enums/user_list_type_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' + + +descriptor_data = "\n2google/ads/googleads/v25/resources/user_list.proto\x12\"google.ads.googleads.v25.resources\x1a\x30google/ads/googleads/v25/common/user_lists.proto\x1a\x32google/ads/googleads/v25/enums/access_reason.proto\x1a grpc_error + # raise Google::Ads::GoogleAds::Error.new grpc_error.message + end + + ## + # Configuration class for the AccountBudgetProposalService API. + # + # This class represents the configuration for AccountBudgetProposalService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Ads::GoogleAds::V25::Services::AccountBudgetProposalService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # mutate_account_budget_proposal to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Ads::GoogleAds::V25::Services::AccountBudgetProposalService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.mutate_account_budget_proposal.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Ads::GoogleAds::V25::Services::AccountBudgetProposalService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.mutate_account_budget_proposal.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Ads::GoogleAds::V25::Services::AccountBudgetProposalService::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "googleads.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, + ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the AccountBudgetProposalService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `mutate_account_budget_proposal` + # @return [::Gapic::Config::Method] + # + attr_reader :mutate_account_budget_proposal + + # @private + def initialize parent_rpcs = nil + mutate_account_budget_proposal_config = parent_rpcs.mutate_account_budget_proposal if parent_rpcs.respond_to? :mutate_account_budget_proposal + @mutate_account_budget_proposal = ::Gapic::Config::Method.new mutate_account_budget_proposal_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/account_budget_proposal_service/credentials.rb b/lib/google/ads/google_ads/v25/services/account_budget_proposal_service/credentials.rb new file mode 100644 index 000000000..83c7af966 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/account_budget_proposal_service/credentials.rb @@ -0,0 +1,38 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Ads + module GoogleAds + module V25 + module Services + module AccountBudgetProposalService + # Credentials for the AccountBudgetProposalService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/adwords" + ] + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/account_budget_proposal_service/paths.rb b/lib/google/ads/google_ads/v25/services/account_budget_proposal_service/paths.rb new file mode 100644 index 000000000..c47c66133 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/account_budget_proposal_service/paths.rb @@ -0,0 +1,86 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Ads + module GoogleAds + module V25 + module Services + module AccountBudgetProposalService + # Path helper methods for the AccountBudgetProposalService API. + module Paths + ## + # Create a fully-qualified AccountBudget resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/accountBudgets/{account_budget_id}` + # + # @param customer_id [String] + # @param account_budget_id [String] + # + # @return [::String] + def account_budget_path customer_id:, account_budget_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/accountBudgets/#{account_budget_id}" + end + + ## + # Create a fully-qualified AccountBudgetProposal resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/accountBudgetProposals/{account_budget_proposal_id}` + # + # @param customer_id [String] + # @param account_budget_proposal_id [String] + # + # @return [::String] + def account_budget_proposal_path customer_id:, account_budget_proposal_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/accountBudgetProposals/#{account_budget_proposal_id}" + end + + ## + # Create a fully-qualified BillingSetup resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/billingSetups/{billing_setup_id}` + # + # @param customer_id [String] + # @param billing_setup_id [String] + # + # @return [::String] + def billing_setup_path customer_id:, billing_setup_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/billingSetups/#{billing_setup_id}" + end + + extend self + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/account_budget_proposal_service_pb.rb b/lib/google/ads/google_ads/v25/services/account_budget_proposal_service_pb.rb new file mode 100644 index 000000000..4535f7b86 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/account_budget_proposal_service_pb.rb @@ -0,0 +1,33 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/services/account_budget_proposal_service.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/resources/account_budget_proposal_pb' +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/field_mask_pb' + + +descriptor_data = "\nGgoogle/ads/googleads/v25/services/account_budget_proposal_service.proto\x12!google.ads.googleads.v25.services\x1a@google/ads/googleads/v25/resources/account_budget_proposal.proto\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\"\xb0\x01\n\"MutateAccountBudgetProposalRequest\x12\x18\n\x0b\x63ustomer_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12Y\n\toperation\x18\x02 \x01(\x0b\x32\x41.google.ads.googleads.v25.services.AccountBudgetProposalOperationB\x03\xe0\x41\x02\x12\x15\n\rvalidate_only\x18\x03 \x01(\x08\"\xf2\x01\n\x1e\x41\x63\x63ountBudgetProposalOperation\x12/\n\x0bupdate_mask\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\x12K\n\x06\x63reate\x18\x02 \x01(\x0b\x32\x39.google.ads.googleads.v25.resources.AccountBudgetProposalH\x00\x12\x45\n\x06remove\x18\x01 \x01(\tB3\xfa\x41\x30\n.googleads.googleapis.com/AccountBudgetProposalH\x00\x42\x0b\n\toperation\"{\n#MutateAccountBudgetProposalResponse\x12T\n\x06result\x18\x02 \x01(\x0b\x32\x44.google.ads.googleads.v25.services.MutateAccountBudgetProposalResult\"o\n!MutateAccountBudgetProposalResult\x12J\n\rresource_name\x18\x01 \x01(\tB3\xfa\x41\x30\n.googleads.googleapis.com/AccountBudgetProposal2\xf5\x02\n\x1c\x41\x63\x63ountBudgetProposalService\x12\x8d\x02\n\x1bMutateAccountBudgetProposal\x12\x45.google.ads.googleads.v25.services.MutateAccountBudgetProposalRequest\x1a\x46.google.ads.googleads.v25.services.MutateAccountBudgetProposalResponse\"_\xda\x41\x15\x63ustomer_id,operation\x82\xd3\xe4\x93\x02\x41\" grpc_error + # raise Google::Ads::GoogleAds::Error.new grpc_error.message + end + + ## + # Creates or removes an account link. + # From V5, create is not supported through + # AccountLinkService.MutateAccountLink. Use + # AccountLinkService.CreateAccountLink instead. + # + # List of thrown errors: + # [AccountLinkError]() + # [AuthenticationError]() + # [AuthorizationError]() + # [FieldMaskError]() + # [HeaderError]() + # [InternalError]() + # [MutateError]() + # [QuotaError]() + # [RequestError]() + # + # @overload mutate_account_link(request, options = nil) + # Pass arguments to `mutate_account_link` via a request object, either of type + # {::Google::Ads::GoogleAds::V25::Services::MutateAccountLinkRequest} or an equivalent Hash. + # + # @param request [::Google::Ads::GoogleAds::V25::Services::MutateAccountLinkRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload mutate_account_link(customer_id: nil, operation: nil, partial_failure: nil, validate_only: nil) + # Pass arguments to `mutate_account_link` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param customer_id [::String] + # Required. The ID of the customer being modified. + # @param operation [::Google::Ads::GoogleAds::V25::Services::AccountLinkOperation, ::Hash] + # Required. The operation to perform on the link. + # @param partial_failure [::Boolean] + # 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. + # @param validate_only [::Boolean] + # If true, the request is validated but not executed. Only errors are + # returned, not results. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Ads::GoogleAds::V25::Services::MutateAccountLinkResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Ads::GoogleAds::V25::Services::MutateAccountLinkResponse] + # + # @raise [Google::Ads::GoogleAds::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/ads/google_ads/v25/services" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Ads::GoogleAds::V25::Services::AccountLinkService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Ads::GoogleAds::V25::Services::MutateAccountLinkRequest.new + # + # # Call the mutate_account_link method. + # result = client.mutate_account_link request + # + # # The returned object is of type Google::Ads::GoogleAds::V25::Services::MutateAccountLinkResponse. + # p result + # + def mutate_account_link request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::GoogleAds::V25::Services::MutateAccountLinkRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.mutate_account_link.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Ads::GoogleAds::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.customer_id + header_params["customer_id"] = request.customer_id + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.mutate_account_link.timeout, + metadata: metadata, + retry_policy: @config.rpcs.mutate_account_link.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @account_link_service_stub.call_rpc :mutate_account_link, request, + options: options do |response, operation| + yield response, operation if block_given? + end + # rescue GRPC::BadStatus => grpc_error + # raise Google::Ads::GoogleAds::Error.new grpc_error.message + end + + ## + # Configuration class for the AccountLinkService API. + # + # This class represents the configuration for AccountLinkService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Ads::GoogleAds::V25::Services::AccountLinkService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # create_account_link to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Ads::GoogleAds::V25::Services::AccountLinkService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.create_account_link.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Ads::GoogleAds::V25::Services::AccountLinkService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.create_account_link.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Ads::GoogleAds::V25::Services::AccountLinkService::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "googleads.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, + ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the AccountLinkService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `create_account_link` + # @return [::Gapic::Config::Method] + # + attr_reader :create_account_link + ## + # RPC-specific configuration for `mutate_account_link` + # @return [::Gapic::Config::Method] + # + attr_reader :mutate_account_link + + # @private + def initialize parent_rpcs = nil + create_account_link_config = parent_rpcs.create_account_link if parent_rpcs.respond_to? :create_account_link + @create_account_link = ::Gapic::Config::Method.new create_account_link_config + mutate_account_link_config = parent_rpcs.mutate_account_link if parent_rpcs.respond_to? :mutate_account_link + @mutate_account_link = ::Gapic::Config::Method.new mutate_account_link_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/account_link_service/credentials.rb b/lib/google/ads/google_ads/v25/services/account_link_service/credentials.rb new file mode 100644 index 000000000..3069ca503 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/account_link_service/credentials.rb @@ -0,0 +1,38 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Ads + module GoogleAds + module V25 + module Services + module AccountLinkService + # Credentials for the AccountLinkService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/adwords" + ] + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/account_link_service/paths.rb b/lib/google/ads/google_ads/v25/services/account_link_service/paths.rb new file mode 100644 index 000000000..e366a3b0e --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/account_link_service/paths.rb @@ -0,0 +1,52 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Ads + module GoogleAds + module V25 + module Services + module AccountLinkService + # Path helper methods for the AccountLinkService API. + module Paths + ## + # Create a fully-qualified AccountLink resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/accountLinks/{account_link_id}` + # + # @param customer_id [String] + # @param account_link_id [String] + # + # @return [::String] + def account_link_path customer_id:, account_link_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/accountLinks/#{account_link_id}" + end + + extend self + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/account_link_service_pb.rb b/lib/google/ads/google_ads/v25/services/account_link_service_pb.rb new file mode 100644 index 000000000..285899e80 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/account_link_service_pb.rb @@ -0,0 +1,36 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/services/account_link_service.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/resources/account_link_pb' +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/field_mask_pb' +require 'google/rpc/status_pb' + + +descriptor_data = "\n] + # Required. The list of operations to perform on ad group ad labels. + # @param partial_failure [::Boolean] + # 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. + # @param validate_only [::Boolean] + # If true, the request is validated but not executed. Only errors are + # returned, not results. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Ads::GoogleAds::V25::Services::MutateAdGroupAdLabelsResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Ads::GoogleAds::V25::Services::MutateAdGroupAdLabelsResponse] + # + # @raise [Google::Ads::GoogleAds::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/ads/google_ads/v25/services" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Ads::GoogleAds::V25::Services::AdGroupAdLabelService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Ads::GoogleAds::V25::Services::MutateAdGroupAdLabelsRequest.new + # + # # Call the mutate_ad_group_ad_labels method. + # result = client.mutate_ad_group_ad_labels request + # + # # The returned object is of type Google::Ads::GoogleAds::V25::Services::MutateAdGroupAdLabelsResponse. + # p result + # + def mutate_ad_group_ad_labels request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::GoogleAds::V25::Services::MutateAdGroupAdLabelsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.mutate_ad_group_ad_labels.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Ads::GoogleAds::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.customer_id + header_params["customer_id"] = request.customer_id + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.mutate_ad_group_ad_labels.timeout, + metadata: metadata, + retry_policy: @config.rpcs.mutate_ad_group_ad_labels.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @ad_group_ad_label_service_stub.call_rpc :mutate_ad_group_ad_labels, request, + options: options do |response, operation| + yield response, operation if block_given? + end + # rescue GRPC::BadStatus => grpc_error + # raise Google::Ads::GoogleAds::Error.new grpc_error.message + end + + ## + # Configuration class for the AdGroupAdLabelService API. + # + # This class represents the configuration for AdGroupAdLabelService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Ads::GoogleAds::V25::Services::AdGroupAdLabelService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # mutate_ad_group_ad_labels to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Ads::GoogleAds::V25::Services::AdGroupAdLabelService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.mutate_ad_group_ad_labels.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Ads::GoogleAds::V25::Services::AdGroupAdLabelService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.mutate_ad_group_ad_labels.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Ads::GoogleAds::V25::Services::AdGroupAdLabelService::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "googleads.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, + ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the AdGroupAdLabelService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `mutate_ad_group_ad_labels` + # @return [::Gapic::Config::Method] + # + attr_reader :mutate_ad_group_ad_labels + + # @private + def initialize parent_rpcs = nil + mutate_ad_group_ad_labels_config = parent_rpcs.mutate_ad_group_ad_labels if parent_rpcs.respond_to? :mutate_ad_group_ad_labels + @mutate_ad_group_ad_labels = ::Gapic::Config::Method.new mutate_ad_group_ad_labels_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/ad_group_ad_label_service/credentials.rb b/lib/google/ads/google_ads/v25/services/ad_group_ad_label_service/credentials.rb new file mode 100644 index 000000000..e457f225f --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/ad_group_ad_label_service/credentials.rb @@ -0,0 +1,38 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Ads + module GoogleAds + module V25 + module Services + module AdGroupAdLabelService + # Credentials for the AdGroupAdLabelService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/adwords" + ] + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/ad_group_ad_label_service/paths.rb b/lib/google/ads/google_ads/v25/services/ad_group_ad_label_service/paths.rb new file mode 100644 index 000000000..3ee14724c --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/ad_group_ad_label_service/paths.rb @@ -0,0 +1,92 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Ads + module GoogleAds + module V25 + module Services + module AdGroupAdLabelService + # Path helper methods for the AdGroupAdLabelService API. + module Paths + ## + # Create a fully-qualified AdGroupAd resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/adGroupAds/{ad_group_id}~{ad_id}` + # + # @param customer_id [String] + # @param ad_group_id [String] + # @param ad_id [String] + # + # @return [::String] + def ad_group_ad_path customer_id:, ad_group_id:, ad_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + raise ::ArgumentError, "ad_group_id cannot contain /" if ad_group_id.to_s.include? "/" + + "customers/#{customer_id}/adGroupAds/#{ad_group_id}~#{ad_id}" + end + + ## + # Create a fully-qualified AdGroupAdLabel resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/adGroupAdLabels/{ad_group_id}~{ad_id}~{label_id}` + # + # @param customer_id [String] + # @param ad_group_id [String] + # @param ad_id [String] + # @param label_id [String] + # + # @return [::String] + def ad_group_ad_label_path customer_id:, ad_group_id:, ad_id:, label_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + raise ::ArgumentError, "ad_group_id cannot contain /" if ad_group_id.to_s.include? "/" + raise ::ArgumentError, "ad_id cannot contain /" if ad_id.to_s.include? "/" + + "customers/#{customer_id}/adGroupAdLabels/#{ad_group_id}~#{ad_id}~#{label_id}" + end + + ## + # Create a fully-qualified Label resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/labels/{label_id}` + # + # @param customer_id [String] + # @param label_id [String] + # + # @return [::String] + def label_path customer_id:, label_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/labels/#{label_id}" + end + + extend self + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/ad_group_ad_label_service_pb.rb b/lib/google/ads/google_ads/v25/services/ad_group_ad_label_service_pb.rb new file mode 100644 index 000000000..9dd9d1d31 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/ad_group_ad_label_service_pb.rb @@ -0,0 +1,33 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/services/ad_group_ad_label_service.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/resources/ad_group_ad_label_pb' +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/rpc/status_pb' + + +descriptor_data = "\nAgoogle/ads/googleads/v25/services/ad_group_ad_label_service.proto\x12!google.ads.googleads.v25.services\x1a:google/ads/googleads/v25/resources/ad_group_ad_label.proto\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x17google/rpc/status.proto\"\xbd\x01\n\x1cMutateAdGroupAdLabelsRequest\x12\x18\n\x0b\x63ustomer_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12S\n\noperations\x18\x02 \x03(\x0b\x32:.google.ads.googleads.v25.services.AdGroupAdLabelOperationB\x03\xe0\x41\x02\x12\x17\n\x0fpartial_failure\x18\x03 \x01(\x08\x12\x15\n\rvalidate_only\x18\x04 \x01(\x08\"\xac\x01\n\x17\x41\x64GroupAdLabelOperation\x12\x44\n\x06\x63reate\x18\x01 \x01(\x0b\x32\x32.google.ads.googleads.v25.resources.AdGroupAdLabelH\x00\x12>\n\x06remove\x18\x02 \x01(\tB,\xfa\x41)\n\'googleads.googleapis.com/AdGroupAdLabelH\x00\x42\x0b\n\toperation\"\xa2\x01\n\x1dMutateAdGroupAdLabelsResponse\x12\x31\n\x15partial_failure_error\x18\x03 \x01(\x0b\x32\x12.google.rpc.Status\x12N\n\x07results\x18\x02 \x03(\x0b\x32=.google.ads.googleads.v25.services.MutateAdGroupAdLabelResult\"a\n\x1aMutateAdGroupAdLabelResult\x12\x43\n\rresource_name\x18\x01 \x01(\tB,\xfa\x41)\n\'googleads.googleapis.com/AdGroupAdLabel2\xd6\x02\n\x15\x41\x64GroupAdLabelService\x12\xf5\x01\n\x15MutateAdGroupAdLabels\x12?.google.ads.googleads.v25.services.MutateAdGroupAdLabelsRequest\x1a@.google.ads.googleads.v25.services.MutateAdGroupAdLabelsResponse\"Y\xda\x41\x16\x63ustomer_id,operations\x82\xd3\xe4\x93\x02:\"5/v25/customers/{customer_id=*}/adGroupAdLabels:mutate:\x01*\x1a\x45\xca\x41\x18googleads.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/adwordsB\x86\x02\n%com.google.ads.googleads.v25.servicesB\x1a\x41\x64GroupAdLabelServiceProtoP\x01ZIgoogle.golang.org/genproto/googleapis/ads/googleads/v25/services;services\xa2\x02\x03GAA\xaa\x02!Google.Ads.GoogleAds.V25.Services\xca\x02!Google\\Ads\\GoogleAds\\V25\\Services\xea\x02%Google::Ads::GoogleAds::V25::Servicesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Services + MutateAdGroupAdLabelsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.MutateAdGroupAdLabelsRequest").msgclass + AdGroupAdLabelOperation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.AdGroupAdLabelOperation").msgclass + MutateAdGroupAdLabelsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.MutateAdGroupAdLabelsResponse").msgclass + MutateAdGroupAdLabelResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.MutateAdGroupAdLabelResult").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/ad_group_ad_label_service_services_pb.rb b/lib/google/ads/google_ads/v25/services/ad_group_ad_label_service_services_pb.rb new file mode 100644 index 000000000..68d0590f4 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/ad_group_ad_label_service_services_pb.rb @@ -0,0 +1,62 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/ads/googleads/v25/services/ad_group_ad_label_service.proto for package 'Google.Ads.GoogleAds.V25.Services' +# Original file comments: +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +require 'grpc' +require 'google/ads/google_ads/v25/services/ad_group_ad_label_service_pb' + +module Google + module Ads + module GoogleAds + module V25 + module Services + module AdGroupAdLabelService + # Proto file describing the Ad Group Ad Label service. + # + # Service to manage labels on ad group ads. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.ads.googleads.v25.services.AdGroupAdLabelService' + + # Creates and removes ad group ad labels. + # Operation statuses are returned. + # + # List of thrown errors: + # [AuthenticationError]() + # [AuthorizationError]() + # [DatabaseError]() + # [HeaderError]() + # [InternalError]() + # [LabelError]() + # [MutateError]() + # [NewResourceCreationError]() + # [QuotaError]() + # [RequestError]() + rpc :MutateAdGroupAdLabels, ::Google::Ads::GoogleAds::V25::Services::MutateAdGroupAdLabelsRequest, ::Google::Ads::GoogleAds::V25::Services::MutateAdGroupAdLabelsResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/ad_group_ad_service.rb b/lib/google/ads/google_ads/v25/services/ad_group_ad_service.rb new file mode 100644 index 000000000..d349c18fa --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/ad_group_ad_service.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/ads/google_ads/version" + +require "google/ads/google_ads/v25/services/ad_group_ad_service/credentials" +require "google/ads/google_ads/v25/services/ad_group_ad_service/paths" +require "google/ads/google_ads/v25/services/ad_group_ad_service/client" + +module Google + module Ads + module GoogleAds + module V25 + module Services + ## + # Service to manage ads in an ad group. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/ads/google_ads/v25/services/ad_group_ad_service" + # client = ::Google::Ads::GoogleAds::V25::Services::AdGroupAdService::Client.new + # + module AdGroupAdService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "ad_group_ad_service", "helpers.rb" +require "google/ads/google_ads/v25/services/ad_group_ad_service/helpers" if ::File.file? helper_path diff --git a/lib/google/ads/google_ads/v25/services/ad_group_ad_service/client.rb b/lib/google/ads/google_ads/v25/services/ad_group_ad_service/client.rb new file mode 100644 index 000000000..aebf7c0d7 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/ad_group_ad_service/client.rb @@ -0,0 +1,643 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# require "google/ads/google_ads/error" +require "google/ads/google_ads/v25/services/ad_group_ad_service_pb" + +module Google + module Ads + module GoogleAds + module V25 + module Services + module AdGroupAdService + ## + # Client for the AdGroupAdService service. + # + # Service to manage ads in an ad group. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "googleads.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :ad_group_ad_service_stub + + ## + # Configure the AdGroupAdService Client class. + # + # See {::Google::Ads::GoogleAds::V25::Services::AdGroupAdService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all AdGroupAdService clients + # ::Google::Ads::GoogleAds::V25::Services::AdGroupAdService::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + default_config = Client::Configuration.new + + default_config.timeout = 14_400.0 + default_config.retry_policy = { + initial_delay: 5.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the AdGroupAdService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Ads::GoogleAds::V25::Services::AdGroupAdService::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @ad_group_ad_service_stub.universe_domain + end + + ## + # Create a new AdGroupAdService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Ads::GoogleAds::V25::Services::AdGroupAdService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Ads::GoogleAds::V25::Services::AdGroupAdService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the AdGroupAdService client. + # @yieldparam config [Client::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/ads/google_ads/v25/services/ad_group_ad_service_services_pb" + + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @ad_group_ad_service_stub = ::Gapic::ServiceStub.new( + ::Google::Ads::GoogleAds::V25::Services::AdGroupAdService::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool, + logger: @config.logger + ) + + @ad_group_ad_service_stub.stub_logger&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @ad_group_ad_service_stub.logger + end + + # Service calls + + ## + # Creates, updates, or removes ads. Operation statuses are returned. + # + # List of thrown errors: + # [AdCustomizerError]() + # [AdError]() + # [AdGroupAdError]() + # [AdSharingError]() + # [AdxError]() + # [AssetError]() + # [AssetLinkError]() + # [AuthenticationError]() + # [AuthorizationError]() + # [CollectionSizeError]() + # [ContextError]() + # [DatabaseError]() + # [DateError]() + # [DistinctError]() + # [FeedAttributeReferenceError]() + # [FieldError]() + # [FieldMaskError]() + # [FunctionError]() + # [FunctionParsingError]() + # [HeaderError]() + # [IdError]() + # [ImageError]() + # [InternalError]() + # [ListOperationError]() + # [MediaBundleError]() + # [MediaFileError]() + # [MutateError]() + # [NewResourceCreationError]() + # [NotEmptyError]() + # [NullError]() + # [OperationAccessDeniedError]() + # [OperatorError]() + # [PolicyFindingError]() + # [PolicyValidationParameterError]() + # [PolicyViolationError]() + # [QuotaError]() + # [RangeError]() + # [RequestError]() + # [ResourceCountLimitExceededError]() + # [SizeLimitError]() + # [StringFormatError]() + # [StringLengthError]() + # [UrlFieldError]() + # + # @overload mutate_ad_group_ads(request, options = nil) + # Pass arguments to `mutate_ad_group_ads` via a request object, either of type + # {::Google::Ads::GoogleAds::V25::Services::MutateAdGroupAdsRequest} or an equivalent Hash. + # + # @param request [::Google::Ads::GoogleAds::V25::Services::MutateAdGroupAdsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload mutate_ad_group_ads(customer_id: nil, operations: nil, partial_failure: nil, validate_only: nil, response_content_type: nil) + # Pass arguments to `mutate_ad_group_ads` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param customer_id [::String] + # Required. The ID of the customer whose ads are being modified. + # @param operations [::Array<::Google::Ads::GoogleAds::V25::Services::AdGroupAdOperation, ::Hash>] + # Required. The list of operations to perform on individual ads. + # @param partial_failure [::Boolean] + # 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. + # @param validate_only [::Boolean] + # If true, the request is validated but not executed. Only errors are + # returned, not results. + # @param response_content_type [::Google::Ads::GoogleAds::V25::Enums::ResponseContentTypeEnum::ResponseContentType] + # The response content type setting. Determines whether the mutable resource + # or just the resource name should be returned post mutation. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Ads::GoogleAds::V25::Services::MutateAdGroupAdsResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Ads::GoogleAds::V25::Services::MutateAdGroupAdsResponse] + # + # @raise [Google::Ads::GoogleAds::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/ads/google_ads/v25/services" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Ads::GoogleAds::V25::Services::AdGroupAdService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Ads::GoogleAds::V25::Services::MutateAdGroupAdsRequest.new + # + # # Call the mutate_ad_group_ads method. + # result = client.mutate_ad_group_ads request + # + # # The returned object is of type Google::Ads::GoogleAds::V25::Services::MutateAdGroupAdsResponse. + # p result + # + def mutate_ad_group_ads request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::GoogleAds::V25::Services::MutateAdGroupAdsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.mutate_ad_group_ads.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Ads::GoogleAds::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.customer_id + header_params["customer_id"] = request.customer_id + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.mutate_ad_group_ads.timeout, + metadata: metadata, + retry_policy: @config.rpcs.mutate_ad_group_ads.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @ad_group_ad_service_stub.call_rpc :mutate_ad_group_ads, request, + options: options do |response, operation| + yield response, operation if block_given? + end + # rescue GRPC::BadStatus => grpc_error + # raise Google::Ads::GoogleAds::Error.new grpc_error.message + end + + ## + # Remove automatically created assets from an ad. + # + # List of thrown errors: + # [AdError]() + # [AuthenticationError]() + # [AuthorizationError]() + # [AutomaticallyCreatedAssetRemovalError]() + # [HeaderError]() + # [InternalError]() + # [MutateError]() + # [QuotaError]() + # [RequestError]() + # + # @overload remove_automatically_created_assets(request, options = nil) + # Pass arguments to `remove_automatically_created_assets` via a request object, either of type + # {::Google::Ads::GoogleAds::V25::Services::RemoveAutomaticallyCreatedAssetsRequest} or an equivalent Hash. + # + # @param request [::Google::Ads::GoogleAds::V25::Services::RemoveAutomaticallyCreatedAssetsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload remove_automatically_created_assets(ad_group_ad: nil, assets_with_field_type: nil) + # Pass arguments to `remove_automatically_created_assets` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param ad_group_ad [::String] + # Required. The resource name of the AdGroupAd from which to remove + # automatically created assets. + # @param assets_with_field_type [::Array<::Google::Ads::GoogleAds::V25::Services::AssetsWithFieldType, ::Hash>] + # Required. List of assets with field type to be removed from the AdGroupAd. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [Google::Ads::GoogleAds::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/ads/google_ads/v25/services" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Ads::GoogleAds::V25::Services::AdGroupAdService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Ads::GoogleAds::V25::Services::RemoveAutomaticallyCreatedAssetsRequest.new + # + # # Call the remove_automatically_created_assets method. + # result = client.remove_automatically_created_assets request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def remove_automatically_created_assets request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::GoogleAds::V25::Services::RemoveAutomaticallyCreatedAssetsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.remove_automatically_created_assets.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Ads::GoogleAds::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.ad_group_ad + header_params["ad_group_ad"] = request.ad_group_ad + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.remove_automatically_created_assets.timeout, + metadata: metadata, + retry_policy: @config.rpcs.remove_automatically_created_assets.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @ad_group_ad_service_stub.call_rpc :remove_automatically_created_assets, request, + options: options do |response, operation| + yield response, operation if block_given? + end + # rescue GRPC::BadStatus => grpc_error + # raise Google::Ads::GoogleAds::Error.new grpc_error.message + end + + ## + # Configuration class for the AdGroupAdService API. + # + # This class represents the configuration for AdGroupAdService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Ads::GoogleAds::V25::Services::AdGroupAdService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # mutate_ad_group_ads to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Ads::GoogleAds::V25::Services::AdGroupAdService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.mutate_ad_group_ads.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Ads::GoogleAds::V25::Services::AdGroupAdService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.mutate_ad_group_ads.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Ads::GoogleAds::V25::Services::AdGroupAdService::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "googleads.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, + ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the AdGroupAdService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `mutate_ad_group_ads` + # @return [::Gapic::Config::Method] + # + attr_reader :mutate_ad_group_ads + ## + # RPC-specific configuration for `remove_automatically_created_assets` + # @return [::Gapic::Config::Method] + # + attr_reader :remove_automatically_created_assets + + # @private + def initialize parent_rpcs = nil + mutate_ad_group_ads_config = parent_rpcs.mutate_ad_group_ads if parent_rpcs.respond_to? :mutate_ad_group_ads + @mutate_ad_group_ads = ::Gapic::Config::Method.new mutate_ad_group_ads_config + remove_automatically_created_assets_config = parent_rpcs.remove_automatically_created_assets if parent_rpcs.respond_to? :remove_automatically_created_assets + @remove_automatically_created_assets = ::Gapic::Config::Method.new remove_automatically_created_assets_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/ad_group_ad_service/credentials.rb b/lib/google/ads/google_ads/v25/services/ad_group_ad_service/credentials.rb new file mode 100644 index 000000000..b4ceccdbd --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/ad_group_ad_service/credentials.rb @@ -0,0 +1,38 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Ads + module GoogleAds + module V25 + module Services + module AdGroupAdService + # Credentials for the AdGroupAdService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/adwords" + ] + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/ad_group_ad_service/paths.rb b/lib/google/ads/google_ads/v25/services/ad_group_ad_service/paths.rb new file mode 100644 index 000000000..7e69cd978 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/ad_group_ad_service/paths.rb @@ -0,0 +1,126 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Ads + module GoogleAds + module V25 + module Services + module AdGroupAdService + # Path helper methods for the AdGroupAdService API. + module Paths + ## + # Create a fully-qualified Ad resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/ads/{ad_id}` + # + # @param customer_id [String] + # @param ad_id [String] + # + # @return [::String] + def ad_path customer_id:, ad_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/ads/#{ad_id}" + end + + ## + # Create a fully-qualified AdGroup resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/adGroups/{ad_group_id}` + # + # @param customer_id [String] + # @param ad_group_id [String] + # + # @return [::String] + def ad_group_path customer_id:, ad_group_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/adGroups/#{ad_group_id}" + end + + ## + # Create a fully-qualified AdGroupAd resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/adGroupAds/{ad_group_id}~{ad_id}` + # + # @param customer_id [String] + # @param ad_group_id [String] + # @param ad_id [String] + # + # @return [::String] + def ad_group_ad_path customer_id:, ad_group_id:, ad_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + raise ::ArgumentError, "ad_group_id cannot contain /" if ad_group_id.to_s.include? "/" + + "customers/#{customer_id}/adGroupAds/#{ad_group_id}~#{ad_id}" + end + + ## + # Create a fully-qualified AdGroupAdLabel resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/adGroupAdLabels/{ad_group_id}~{ad_id}~{label_id}` + # + # @param customer_id [String] + # @param ad_group_id [String] + # @param ad_id [String] + # @param label_id [String] + # + # @return [::String] + def ad_group_ad_label_path customer_id:, ad_group_id:, ad_id:, label_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + raise ::ArgumentError, "ad_group_id cannot contain /" if ad_group_id.to_s.include? "/" + raise ::ArgumentError, "ad_id cannot contain /" if ad_id.to_s.include? "/" + + "customers/#{customer_id}/adGroupAdLabels/#{ad_group_id}~#{ad_id}~#{label_id}" + end + + ## + # Create a fully-qualified Asset resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/assets/{asset_id}` + # + # @param customer_id [String] + # @param asset_id [String] + # + # @return [::String] + def asset_path customer_id:, asset_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/assets/#{asset_id}" + end + + extend self + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/ad_group_ad_service_pb.rb b/lib/google/ads/google_ads/v25/services/ad_group_ad_service_pb.rb new file mode 100644 index 000000000..b5b80dc9e --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/ad_group_ad_service_pb.rb @@ -0,0 +1,40 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/services/ad_group_ad_service.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/common/policy_pb' +require 'google/ads/google_ads/v25/enums/asset_field_type_pb' +require 'google/ads/google_ads/v25/enums/response_content_type_pb' +require 'google/ads/google_ads/v25/resources/ad_group_ad_pb' +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/empty_pb' +require 'google/protobuf/field_mask_pb' +require 'google/rpc/status_pb' + + +descriptor_data = "\n;google/ads/googleads/v25/services/ad_group_ad_service.proto\x12!google.ads.googleads.v25.services\x1a,google/ads/googleads/v25/common/policy.proto\x1a\x35google/ads/googleads/v25/enums/asset_field_type.proto\x1a:google/ads/googleads/v25/enums/response_content_type.proto\x1a\x34google/ads/googleads/v25/resources/ad_group_ad.proto\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x17google/rpc/status.proto\"\x9f\x02\n\x17MutateAdGroupAdsRequest\x12\x18\n\x0b\x63ustomer_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12N\n\noperations\x18\x02 \x03(\x0b\x32\x35.google.ads.googleads.v25.services.AdGroupAdOperationB\x03\xe0\x41\x02\x12\x17\n\x0fpartial_failure\x18\x03 \x01(\x08\x12\x15\n\rvalidate_only\x18\x04 \x01(\x08\x12j\n\x15response_content_type\x18\x05 \x01(\x0e\x32K.google.ads.googleads.v25.enums.ResponseContentTypeEnum.ResponseContentType\"\xf0\x02\n\x12\x41\x64GroupAdOperation\x12/\n\x0bupdate_mask\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\x12_\n\x1bpolicy_validation_parameter\x18\x05 \x01(\x0b\x32:.google.ads.googleads.v25.common.PolicyValidationParameter\x12?\n\x06\x63reate\x18\x01 \x01(\x0b\x32-.google.ads.googleads.v25.resources.AdGroupAdH\x00\x12?\n\x06update\x18\x02 \x01(\x0b\x32-.google.ads.googleads.v25.resources.AdGroupAdH\x00\x12\x39\n\x06remove\x18\x03 \x01(\tB\'\xfa\x41$\n\"googleads.googleapis.com/AdGroupAdH\x00\x42\x0b\n\toperation\"\x98\x01\n\x18MutateAdGroupAdsResponse\x12\x31\n\x15partial_failure_error\x18\x03 \x01(\x0b\x32\x12.google.rpc.Status\x12I\n\x07results\x18\x02 \x03(\x0b\x32\x38.google.ads.googleads.v25.services.MutateAdGroupAdResult\"\x9b\x01\n\x15MutateAdGroupAdResult\x12>\n\rresource_name\x18\x01 \x01(\tB\'\xfa\x41$\n\"googleads.googleapis.com/AdGroupAd\x12\x42\n\x0b\x61\x64_group_ad\x18\x02 \x01(\x0b\x32-.google.ads.googleads.v25.resources.AdGroupAd\"\xc7\x01\n\'RemoveAutomaticallyCreatedAssetsRequest\x12?\n\x0b\x61\x64_group_ad\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"googleads.googleapis.com/AdGroupAd\x12[\n\x16\x61ssets_with_field_type\x18\x02 \x03(\x0b\x32\x36.google.ads.googleads.v25.services.AssetsWithFieldTypeB\x03\xe0\x41\x02\"\xae\x01\n\x13\x41ssetsWithFieldType\x12\x35\n\x05\x61sset\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1egoogleads.googleapis.com/Asset\x12`\n\x10\x61sset_field_type\x18\x02 \x01(\x0e\x32\x41.google.ads.googleads.v25.enums.AssetFieldTypeEnum.AssetFieldTypeB\x03\xe0\x41\x02\x32\xc4\x04\n\x10\x41\x64GroupAdService\x12\xe1\x01\n\x10MutateAdGroupAds\x12:.google.ads.googleads.v25.services.MutateAdGroupAdsRequest\x1a;.google.ads.googleads.v25.services.MutateAdGroupAdsResponse\"T\xda\x41\x16\x63ustomer_id,operations\x82\xd3\xe4\x93\x02\x35\"0/v25/customers/{customer_id=*}/adGroupAds:mutate:\x01*\x12\x84\x02\n RemoveAutomaticallyCreatedAssets\x12J.google.ads.googleads.v25.services.RemoveAutomaticallyCreatedAssetsRequest\x1a\x16.google.protobuf.Empty\"|\xda\x41\"ad_group_ad,assets_with_field_type\x82\xd3\xe4\x93\x02Q\"L/v25/{ad_group_ad=customers/*/adGroupAds/*}:removeAutomaticallyCreatedAssets:\x01*\x1a\x45\xca\x41\x18googleads.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/adwordsB\x81\x02\n%com.google.ads.googleads.v25.servicesB\x15\x41\x64GroupAdServiceProtoP\x01ZIgoogle.golang.org/genproto/googleapis/ads/googleads/v25/services;services\xa2\x02\x03GAA\xaa\x02!Google.Ads.GoogleAds.V25.Services\xca\x02!Google\\Ads\\GoogleAds\\V25\\Services\xea\x02%Google::Ads::GoogleAds::V25::Servicesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Services + MutateAdGroupAdsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.MutateAdGroupAdsRequest").msgclass + AdGroupAdOperation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.AdGroupAdOperation").msgclass + MutateAdGroupAdsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.MutateAdGroupAdsResponse").msgclass + MutateAdGroupAdResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.MutateAdGroupAdResult").msgclass + RemoveAutomaticallyCreatedAssetsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.RemoveAutomaticallyCreatedAssetsRequest").msgclass + AssetsWithFieldType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.AssetsWithFieldType").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/ad_group_ad_service_services_pb.rb b/lib/google/ads/google_ads/v25/services/ad_group_ad_service_services_pb.rb new file mode 100644 index 000000000..1ddc2099c --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/ad_group_ad_service_services_pb.rb @@ -0,0 +1,107 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/ads/googleads/v25/services/ad_group_ad_service.proto for package 'Google.Ads.GoogleAds.V25.Services' +# Original file comments: +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +require 'grpc' +require 'google/ads/google_ads/v25/services/ad_group_ad_service_pb' + +module Google + module Ads + module GoogleAds + module V25 + module Services + module AdGroupAdService + # Proto file describing the Ad Group Ad service. + # + # Service to manage ads in an ad group. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.ads.googleads.v25.services.AdGroupAdService' + + # Creates, updates, or removes ads. Operation statuses are returned. + # + # List of thrown errors: + # [AdCustomizerError]() + # [AdError]() + # [AdGroupAdError]() + # [AdSharingError]() + # [AdxError]() + # [AssetError]() + # [AssetLinkError]() + # [AuthenticationError]() + # [AuthorizationError]() + # [CollectionSizeError]() + # [ContextError]() + # [DatabaseError]() + # [DateError]() + # [DistinctError]() + # [FeedAttributeReferenceError]() + # [FieldError]() + # [FieldMaskError]() + # [FunctionError]() + # [FunctionParsingError]() + # [HeaderError]() + # [IdError]() + # [ImageError]() + # [InternalError]() + # [ListOperationError]() + # [MediaBundleError]() + # [MediaFileError]() + # [MutateError]() + # [NewResourceCreationError]() + # [NotEmptyError]() + # [NullError]() + # [OperationAccessDeniedError]() + # [OperatorError]() + # [PolicyFindingError]() + # [PolicyValidationParameterError]() + # [PolicyViolationError]() + # [QuotaError]() + # [RangeError]() + # [RequestError]() + # [ResourceCountLimitExceededError]() + # [SizeLimitError]() + # [StringFormatError]() + # [StringLengthError]() + # [UrlFieldError]() + rpc :MutateAdGroupAds, ::Google::Ads::GoogleAds::V25::Services::MutateAdGroupAdsRequest, ::Google::Ads::GoogleAds::V25::Services::MutateAdGroupAdsResponse + # Remove automatically created assets from an ad. + # + # List of thrown errors: + # [AdError]() + # [AuthenticationError]() + # [AuthorizationError]() + # [AutomaticallyCreatedAssetRemovalError]() + # [HeaderError]() + # [InternalError]() + # [MutateError]() + # [QuotaError]() + # [RequestError]() + rpc :RemoveAutomaticallyCreatedAssets, ::Google::Ads::GoogleAds::V25::Services::RemoveAutomaticallyCreatedAssetsRequest, ::Google::Protobuf::Empty + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/ad_group_asset_service.rb b/lib/google/ads/google_ads/v25/services/ad_group_asset_service.rb new file mode 100644 index 000000000..6ebf1a3e5 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/ad_group_asset_service.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/ads/google_ads/version" + +require "google/ads/google_ads/v25/services/ad_group_asset_service/credentials" +require "google/ads/google_ads/v25/services/ad_group_asset_service/paths" +require "google/ads/google_ads/v25/services/ad_group_asset_service/client" + +module Google + module Ads + module GoogleAds + module V25 + module Services + ## + # Service to manage ad group assets. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/ads/google_ads/v25/services/ad_group_asset_service" + # client = ::Google::Ads::GoogleAds::V25::Services::AdGroupAssetService::Client.new + # + module AdGroupAssetService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "ad_group_asset_service", "helpers.rb" +require "google/ads/google_ads/v25/services/ad_group_asset_service/helpers" if ::File.file? helper_path diff --git a/lib/google/ads/google_ads/v25/services/ad_group_asset_service/client.rb b/lib/google/ads/google_ads/v25/services/ad_group_asset_service/client.rb new file mode 100644 index 000000000..da7e3c634 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/ad_group_asset_service/client.rb @@ -0,0 +1,505 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# require "google/ads/google_ads/error" +require "google/ads/google_ads/v25/services/ad_group_asset_service_pb" + +module Google + module Ads + module GoogleAds + module V25 + module Services + module AdGroupAssetService + ## + # Client for the AdGroupAssetService service. + # + # Service to manage ad group assets. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "googleads.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :ad_group_asset_service_stub + + ## + # Configure the AdGroupAssetService Client class. + # + # See {::Google::Ads::GoogleAds::V25::Services::AdGroupAssetService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all AdGroupAssetService clients + # ::Google::Ads::GoogleAds::V25::Services::AdGroupAssetService::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + default_config = Client::Configuration.new + + default_config.timeout = 14_400.0 + default_config.retry_policy = { + initial_delay: 5.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the AdGroupAssetService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Ads::GoogleAds::V25::Services::AdGroupAssetService::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @ad_group_asset_service_stub.universe_domain + end + + ## + # Create a new AdGroupAssetService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Ads::GoogleAds::V25::Services::AdGroupAssetService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Ads::GoogleAds::V25::Services::AdGroupAssetService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the AdGroupAssetService client. + # @yieldparam config [Client::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/ads/google_ads/v25/services/ad_group_asset_service_services_pb" + + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @ad_group_asset_service_stub = ::Gapic::ServiceStub.new( + ::Google::Ads::GoogleAds::V25::Services::AdGroupAssetService::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool, + logger: @config.logger + ) + + @ad_group_asset_service_stub.stub_logger&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @ad_group_asset_service_stub.logger + end + + # Service calls + + ## + # Creates, updates, or removes ad group assets. Operation statuses are + # returned. + # + # List of thrown errors: + # [AssetLinkError]() + # [AuthenticationError]() + # [AuthorizationError]() + # [ContextError]() + # [FieldError]() + # [HeaderError]() + # [InternalError]() + # [MutateError]() + # [NotAllowlistedError]() + # [QuotaError]() + # [RequestError]() + # + # @overload mutate_ad_group_assets(request, options = nil) + # Pass arguments to `mutate_ad_group_assets` via a request object, either of type + # {::Google::Ads::GoogleAds::V25::Services::MutateAdGroupAssetsRequest} or an equivalent Hash. + # + # @param request [::Google::Ads::GoogleAds::V25::Services::MutateAdGroupAssetsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload mutate_ad_group_assets(customer_id: nil, operations: nil, partial_failure: nil, validate_only: nil, response_content_type: nil) + # Pass arguments to `mutate_ad_group_assets` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param customer_id [::String] + # Required. The ID of the customer whose ad group assets are being modified. + # @param operations [::Array<::Google::Ads::GoogleAds::V25::Services::AdGroupAssetOperation, ::Hash>] + # Required. The list of operations to perform on individual ad group assets. + # @param partial_failure [::Boolean] + # 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. + # @param validate_only [::Boolean] + # If true, the request is validated but not executed. Only errors are + # returned, not results. + # @param response_content_type [::Google::Ads::GoogleAds::V25::Enums::ResponseContentTypeEnum::ResponseContentType] + # The response content type setting. Determines whether the mutable resource + # or just the resource name should be returned post mutation. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Ads::GoogleAds::V25::Services::MutateAdGroupAssetsResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Ads::GoogleAds::V25::Services::MutateAdGroupAssetsResponse] + # + # @raise [Google::Ads::GoogleAds::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/ads/google_ads/v25/services" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Ads::GoogleAds::V25::Services::AdGroupAssetService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Ads::GoogleAds::V25::Services::MutateAdGroupAssetsRequest.new + # + # # Call the mutate_ad_group_assets method. + # result = client.mutate_ad_group_assets request + # + # # The returned object is of type Google::Ads::GoogleAds::V25::Services::MutateAdGroupAssetsResponse. + # p result + # + def mutate_ad_group_assets request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::GoogleAds::V25::Services::MutateAdGroupAssetsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.mutate_ad_group_assets.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Ads::GoogleAds::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.customer_id + header_params["customer_id"] = request.customer_id + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.mutate_ad_group_assets.timeout, + metadata: metadata, + retry_policy: @config.rpcs.mutate_ad_group_assets.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @ad_group_asset_service_stub.call_rpc :mutate_ad_group_assets, request, + options: options do |response, operation| + yield response, operation if block_given? + end + # rescue GRPC::BadStatus => grpc_error + # raise Google::Ads::GoogleAds::Error.new grpc_error.message + end + + ## + # Configuration class for the AdGroupAssetService API. + # + # This class represents the configuration for AdGroupAssetService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Ads::GoogleAds::V25::Services::AdGroupAssetService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # mutate_ad_group_assets to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Ads::GoogleAds::V25::Services::AdGroupAssetService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.mutate_ad_group_assets.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Ads::GoogleAds::V25::Services::AdGroupAssetService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.mutate_ad_group_assets.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Ads::GoogleAds::V25::Services::AdGroupAssetService::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "googleads.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, + ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the AdGroupAssetService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `mutate_ad_group_assets` + # @return [::Gapic::Config::Method] + # + attr_reader :mutate_ad_group_assets + + # @private + def initialize parent_rpcs = nil + mutate_ad_group_assets_config = parent_rpcs.mutate_ad_group_assets if parent_rpcs.respond_to? :mutate_ad_group_assets + @mutate_ad_group_assets = ::Gapic::Config::Method.new mutate_ad_group_assets_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/ad_group_asset_service/credentials.rb b/lib/google/ads/google_ads/v25/services/ad_group_asset_service/credentials.rb new file mode 100644 index 000000000..bbfb5a1cf --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/ad_group_asset_service/credentials.rb @@ -0,0 +1,38 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Ads + module GoogleAds + module V25 + module Services + module AdGroupAssetService + # Credentials for the AdGroupAssetService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/adwords" + ] + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/ad_group_asset_service/paths.rb b/lib/google/ads/google_ads/v25/services/ad_group_asset_service/paths.rb new file mode 100644 index 000000000..3278f2024 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/ad_group_asset_service/paths.rb @@ -0,0 +1,90 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Ads + module GoogleAds + module V25 + module Services + module AdGroupAssetService + # Path helper methods for the AdGroupAssetService API. + module Paths + ## + # Create a fully-qualified AdGroup resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/adGroups/{ad_group_id}` + # + # @param customer_id [String] + # @param ad_group_id [String] + # + # @return [::String] + def ad_group_path customer_id:, ad_group_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/adGroups/#{ad_group_id}" + end + + ## + # Create a fully-qualified AdGroupAsset resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/adGroupAssets/{ad_group_id}~{asset_id}~{field_type}` + # + # @param customer_id [String] + # @param ad_group_id [String] + # @param asset_id [String] + # @param field_type [String] + # + # @return [::String] + def ad_group_asset_path customer_id:, ad_group_id:, asset_id:, field_type: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + raise ::ArgumentError, "ad_group_id cannot contain /" if ad_group_id.to_s.include? "/" + raise ::ArgumentError, "asset_id cannot contain /" if asset_id.to_s.include? "/" + + "customers/#{customer_id}/adGroupAssets/#{ad_group_id}~#{asset_id}~#{field_type}" + end + + ## + # Create a fully-qualified Asset resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/assets/{asset_id}` + # + # @param customer_id [String] + # @param asset_id [String] + # + # @return [::String] + def asset_path customer_id:, asset_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/assets/#{asset_id}" + end + + extend self + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/ad_group_asset_service_pb.rb b/lib/google/ads/google_ads/v25/services/ad_group_asset_service_pb.rb new file mode 100644 index 000000000..e18e62616 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/ad_group_asset_service_pb.rb @@ -0,0 +1,35 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/services/ad_group_asset_service.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/enums/response_content_type_pb' +require 'google/ads/google_ads/v25/resources/ad_group_asset_pb' +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/field_mask_pb' +require 'google/rpc/status_pb' + + +descriptor_data = "\n>google/ads/googleads/v25/services/ad_group_asset_service.proto\x12!google.ads.googleads.v25.services\x1a:google/ads/googleads/v25/enums/response_content_type.proto\x1a\x37google/ads/googleads/v25/resources/ad_group_asset.proto\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\x1a\x17google/rpc/status.proto\"\xa5\x02\n\x1aMutateAdGroupAssetsRequest\x12\x18\n\x0b\x63ustomer_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12Q\n\noperations\x18\x02 \x03(\x0b\x32\x38.google.ads.googleads.v25.services.AdGroupAssetOperationB\x03\xe0\x41\x02\x12\x17\n\x0fpartial_failure\x18\x03 \x01(\x08\x12\x15\n\rvalidate_only\x18\x04 \x01(\x08\x12j\n\x15response_content_type\x18\x05 \x01(\x0e\x32K.google.ads.googleads.v25.enums.ResponseContentTypeEnum.ResponseContentType\"\x9b\x02\n\x15\x41\x64GroupAssetOperation\x12/\n\x0bupdate_mask\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\x12\x42\n\x06\x63reate\x18\x01 \x01(\x0b\x32\x30.google.ads.googleads.v25.resources.AdGroupAssetH\x00\x12\x42\n\x06update\x18\x03 \x01(\x0b\x32\x30.google.ads.googleads.v25.resources.AdGroupAssetH\x00\x12<\n\x06remove\x18\x02 \x01(\tB*\xfa\x41\'\n%googleads.googleapis.com/AdGroupAssetH\x00\x42\x0b\n\toperation\"\x9e\x01\n\x1bMutateAdGroupAssetsResponse\x12\x31\n\x15partial_failure_error\x18\x01 \x01(\x0b\x32\x12.google.rpc.Status\x12L\n\x07results\x18\x02 \x03(\x0b\x32;.google.ads.googleads.v25.services.MutateAdGroupAssetResult\"\xa7\x01\n\x18MutateAdGroupAssetResult\x12\x41\n\rresource_name\x18\x01 \x01(\tB*\xfa\x41\'\n%googleads.googleapis.com/AdGroupAsset\x12H\n\x0e\x61\x64_group_asset\x18\x02 \x01(\x0b\x32\x30.google.ads.googleads.v25.resources.AdGroupAsset2\xcc\x02\n\x13\x41\x64GroupAssetService\x12\xed\x01\n\x13MutateAdGroupAssets\x12=.google.ads.googleads.v25.services.MutateAdGroupAssetsRequest\x1a>.google.ads.googleads.v25.services.MutateAdGroupAssetsResponse\"W\xda\x41\x16\x63ustomer_id,operations\x82\xd3\xe4\x93\x02\x38\"3/v25/customers/{customer_id=*}/adGroupAssets:mutate:\x01*\x1a\x45\xca\x41\x18googleads.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/adwordsB\x84\x02\n%com.google.ads.googleads.v25.servicesB\x18\x41\x64GroupAssetServiceProtoP\x01ZIgoogle.golang.org/genproto/googleapis/ads/googleads/v25/services;services\xa2\x02\x03GAA\xaa\x02!Google.Ads.GoogleAds.V25.Services\xca\x02!Google\\Ads\\GoogleAds\\V25\\Services\xea\x02%Google::Ads::GoogleAds::V25::Servicesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Services + MutateAdGroupAssetsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.MutateAdGroupAssetsRequest").msgclass + AdGroupAssetOperation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.AdGroupAssetOperation").msgclass + MutateAdGroupAssetsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.MutateAdGroupAssetsResponse").msgclass + MutateAdGroupAssetResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.MutateAdGroupAssetResult").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/ad_group_asset_service_services_pb.rb b/lib/google/ads/google_ads/v25/services/ad_group_asset_service_services_pb.rb new file mode 100644 index 000000000..7b63f860e --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/ad_group_asset_service_services_pb.rb @@ -0,0 +1,63 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/ads/googleads/v25/services/ad_group_asset_service.proto for package 'Google.Ads.GoogleAds.V25.Services' +# Original file comments: +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +require 'grpc' +require 'google/ads/google_ads/v25/services/ad_group_asset_service_pb' + +module Google + module Ads + module GoogleAds + module V25 + module Services + module AdGroupAssetService + # Proto file describing the AdGroupAsset service. + # + # Service to manage ad group assets. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.ads.googleads.v25.services.AdGroupAssetService' + + # Creates, updates, or removes ad group assets. Operation statuses are + # returned. + # + # List of thrown errors: + # [AssetLinkError]() + # [AuthenticationError]() + # [AuthorizationError]() + # [ContextError]() + # [FieldError]() + # [HeaderError]() + # [InternalError]() + # [MutateError]() + # [NotAllowlistedError]() + # [QuotaError]() + # [RequestError]() + rpc :MutateAdGroupAssets, ::Google::Ads::GoogleAds::V25::Services::MutateAdGroupAssetsRequest, ::Google::Ads::GoogleAds::V25::Services::MutateAdGroupAssetsResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/ad_group_asset_set_service.rb b/lib/google/ads/google_ads/v25/services/ad_group_asset_set_service.rb new file mode 100644 index 000000000..9820892ff --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/ad_group_asset_set_service.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/ads/google_ads/version" + +require "google/ads/google_ads/v25/services/ad_group_asset_set_service/credentials" +require "google/ads/google_ads/v25/services/ad_group_asset_set_service/paths" +require "google/ads/google_ads/v25/services/ad_group_asset_set_service/client" + +module Google + module Ads + module GoogleAds + module V25 + module Services + ## + # Service to manage ad group asset set + # + # @example Load this service and instantiate a gRPC client + # + # require "google/ads/google_ads/v25/services/ad_group_asset_set_service" + # client = ::Google::Ads::GoogleAds::V25::Services::AdGroupAssetSetService::Client.new + # + module AdGroupAssetSetService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "ad_group_asset_set_service", "helpers.rb" +require "google/ads/google_ads/v25/services/ad_group_asset_set_service/helpers" if ::File.file? helper_path diff --git a/lib/google/ads/google_ads/v25/services/ad_group_asset_set_service/client.rb b/lib/google/ads/google_ads/v25/services/ad_group_asset_set_service/client.rb new file mode 100644 index 000000000..f1f7f50d9 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/ad_group_asset_set_service/client.rb @@ -0,0 +1,494 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# require "google/ads/google_ads/error" +require "google/ads/google_ads/v25/services/ad_group_asset_set_service_pb" + +module Google + module Ads + module GoogleAds + module V25 + module Services + module AdGroupAssetSetService + ## + # Client for the AdGroupAssetSetService service. + # + # Service to manage ad group asset set + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "googleads.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :ad_group_asset_set_service_stub + + ## + # Configure the AdGroupAssetSetService Client class. + # + # See {::Google::Ads::GoogleAds::V25::Services::AdGroupAssetSetService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all AdGroupAssetSetService clients + # ::Google::Ads::GoogleAds::V25::Services::AdGroupAssetSetService::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + default_config = Client::Configuration.new + + default_config.timeout = 14_400.0 + default_config.retry_policy = { + initial_delay: 5.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the AdGroupAssetSetService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Ads::GoogleAds::V25::Services::AdGroupAssetSetService::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @ad_group_asset_set_service_stub.universe_domain + end + + ## + # Create a new AdGroupAssetSetService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Ads::GoogleAds::V25::Services::AdGroupAssetSetService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Ads::GoogleAds::V25::Services::AdGroupAssetSetService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the AdGroupAssetSetService client. + # @yieldparam config [Client::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/ads/google_ads/v25/services/ad_group_asset_set_service_services_pb" + + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @ad_group_asset_set_service_stub = ::Gapic::ServiceStub.new( + ::Google::Ads::GoogleAds::V25::Services::AdGroupAssetSetService::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool, + logger: @config.logger + ) + + @ad_group_asset_set_service_stub.stub_logger&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @ad_group_asset_set_service_stub.logger + end + + # Service calls + + ## + # Creates, or removes ad group asset sets. Operation statuses are + # returned. + # + # @overload mutate_ad_group_asset_sets(request, options = nil) + # Pass arguments to `mutate_ad_group_asset_sets` via a request object, either of type + # {::Google::Ads::GoogleAds::V25::Services::MutateAdGroupAssetSetsRequest} or an equivalent Hash. + # + # @param request [::Google::Ads::GoogleAds::V25::Services::MutateAdGroupAssetSetsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload mutate_ad_group_asset_sets(customer_id: nil, operations: nil, partial_failure: nil, validate_only: nil, response_content_type: nil) + # Pass arguments to `mutate_ad_group_asset_sets` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param customer_id [::String] + # Required. The ID of the customer whose ad group asset sets are being + # modified. + # @param operations [::Array<::Google::Ads::GoogleAds::V25::Services::AdGroupAssetSetOperation, ::Hash>] + # Required. The list of operations to perform on individual ad group asset + # sets. + # @param partial_failure [::Boolean] + # 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. + # @param validate_only [::Boolean] + # If true, the request is validated but not executed. Only errors are + # returned, not results. + # @param response_content_type [::Google::Ads::GoogleAds::V25::Enums::ResponseContentTypeEnum::ResponseContentType] + # The response content type setting. Determines whether the mutable resource + # or just the resource name should be returned post mutation. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Ads::GoogleAds::V25::Services::MutateAdGroupAssetSetsResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Ads::GoogleAds::V25::Services::MutateAdGroupAssetSetsResponse] + # + # @raise [Google::Ads::GoogleAds::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/ads/google_ads/v25/services" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Ads::GoogleAds::V25::Services::AdGroupAssetSetService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Ads::GoogleAds::V25::Services::MutateAdGroupAssetSetsRequest.new + # + # # Call the mutate_ad_group_asset_sets method. + # result = client.mutate_ad_group_asset_sets request + # + # # The returned object is of type Google::Ads::GoogleAds::V25::Services::MutateAdGroupAssetSetsResponse. + # p result + # + def mutate_ad_group_asset_sets request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::GoogleAds::V25::Services::MutateAdGroupAssetSetsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.mutate_ad_group_asset_sets.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Ads::GoogleAds::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.customer_id + header_params["customer_id"] = request.customer_id + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.mutate_ad_group_asset_sets.timeout, + metadata: metadata, + retry_policy: @config.rpcs.mutate_ad_group_asset_sets.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @ad_group_asset_set_service_stub.call_rpc :mutate_ad_group_asset_sets, request, + options: options do |response, operation| + yield response, operation if block_given? + end + # rescue GRPC::BadStatus => grpc_error + # raise Google::Ads::GoogleAds::Error.new grpc_error.message + end + + ## + # Configuration class for the AdGroupAssetSetService API. + # + # This class represents the configuration for AdGroupAssetSetService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Ads::GoogleAds::V25::Services::AdGroupAssetSetService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # mutate_ad_group_asset_sets to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Ads::GoogleAds::V25::Services::AdGroupAssetSetService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.mutate_ad_group_asset_sets.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Ads::GoogleAds::V25::Services::AdGroupAssetSetService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.mutate_ad_group_asset_sets.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Ads::GoogleAds::V25::Services::AdGroupAssetSetService::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "googleads.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, + ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the AdGroupAssetSetService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `mutate_ad_group_asset_sets` + # @return [::Gapic::Config::Method] + # + attr_reader :mutate_ad_group_asset_sets + + # @private + def initialize parent_rpcs = nil + mutate_ad_group_asset_sets_config = parent_rpcs.mutate_ad_group_asset_sets if parent_rpcs.respond_to? :mutate_ad_group_asset_sets + @mutate_ad_group_asset_sets = ::Gapic::Config::Method.new mutate_ad_group_asset_sets_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/ad_group_asset_set_service/credentials.rb b/lib/google/ads/google_ads/v25/services/ad_group_asset_set_service/credentials.rb new file mode 100644 index 000000000..c68907b68 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/ad_group_asset_set_service/credentials.rb @@ -0,0 +1,38 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Ads + module GoogleAds + module V25 + module Services + module AdGroupAssetSetService + # Credentials for the AdGroupAssetSetService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/adwords" + ] + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/ad_group_asset_set_service/paths.rb b/lib/google/ads/google_ads/v25/services/ad_group_asset_set_service/paths.rb new file mode 100644 index 000000000..6a334bf90 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/ad_group_asset_set_service/paths.rb @@ -0,0 +1,88 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Ads + module GoogleAds + module V25 + module Services + module AdGroupAssetSetService + # Path helper methods for the AdGroupAssetSetService API. + module Paths + ## + # Create a fully-qualified AdGroup resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/adGroups/{ad_group_id}` + # + # @param customer_id [String] + # @param ad_group_id [String] + # + # @return [::String] + def ad_group_path customer_id:, ad_group_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/adGroups/#{ad_group_id}" + end + + ## + # Create a fully-qualified AdGroupAssetSet resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/adGroupAssetSets/{ad_group_id}~{asset_set_id}` + # + # @param customer_id [String] + # @param ad_group_id [String] + # @param asset_set_id [String] + # + # @return [::String] + def ad_group_asset_set_path customer_id:, ad_group_id:, asset_set_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + raise ::ArgumentError, "ad_group_id cannot contain /" if ad_group_id.to_s.include? "/" + + "customers/#{customer_id}/adGroupAssetSets/#{ad_group_id}~#{asset_set_id}" + end + + ## + # Create a fully-qualified AssetSet resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/assetSets/{asset_set_id}` + # + # @param customer_id [String] + # @param asset_set_id [String] + # + # @return [::String] + def asset_set_path customer_id:, asset_set_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/assetSets/#{asset_set_id}" + end + + extend self + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/ad_group_asset_set_service_pb.rb b/lib/google/ads/google_ads/v25/services/ad_group_asset_set_service_pb.rb new file mode 100644 index 000000000..303665e02 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/ad_group_asset_set_service_pb.rb @@ -0,0 +1,34 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/services/ad_group_asset_set_service.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/enums/response_content_type_pb' +require 'google/ads/google_ads/v25/resources/ad_group_asset_set_pb' +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/rpc/status_pb' + + +descriptor_data = "\nBgoogle/ads/googleads/v25/services/ad_group_asset_set_service.proto\x12!google.ads.googleads.v25.services\x1a:google/ads/googleads/v25/enums/response_content_type.proto\x1a;google/ads/googleads/v25/resources/ad_group_asset_set.proto\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x17google/rpc/status.proto\"\xab\x02\n\x1dMutateAdGroupAssetSetsRequest\x12\x18\n\x0b\x63ustomer_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12T\n\noperations\x18\x02 \x03(\x0b\x32;.google.ads.googleads.v25.services.AdGroupAssetSetOperationB\x03\xe0\x41\x02\x12\x17\n\x0fpartial_failure\x18\x03 \x01(\x08\x12\x15\n\rvalidate_only\x18\x04 \x01(\x08\x12j\n\x15response_content_type\x18\x05 \x01(\x0e\x32K.google.ads.googleads.v25.enums.ResponseContentTypeEnum.ResponseContentType\"\xaf\x01\n\x18\x41\x64GroupAssetSetOperation\x12\x45\n\x06\x63reate\x18\x01 \x01(\x0b\x32\x33.google.ads.googleads.v25.resources.AdGroupAssetSetH\x00\x12?\n\x06remove\x18\x02 \x01(\tB-\xfa\x41*\n(googleads.googleapis.com/AdGroupAssetSetH\x00\x42\x0b\n\toperation\"\xa4\x01\n\x1eMutateAdGroupAssetSetsResponse\x12O\n\x07results\x18\x01 \x03(\x0b\x32>.google.ads.googleads.v25.services.MutateAdGroupAssetSetResult\x12\x31\n\x15partial_failure_error\x18\x02 \x01(\x0b\x32\x12.google.rpc.Status\"\xb4\x01\n\x1bMutateAdGroupAssetSetResult\x12\x44\n\rresource_name\x18\x01 \x01(\tB-\xfa\x41*\n(googleads.googleapis.com/AdGroupAssetSet\x12O\n\x12\x61\x64_group_asset_set\x18\x02 \x01(\x0b\x32\x33.google.ads.googleads.v25.resources.AdGroupAssetSet2\xdb\x02\n\x16\x41\x64GroupAssetSetService\x12\xf9\x01\n\x16MutateAdGroupAssetSets\x12@.google.ads.googleads.v25.services.MutateAdGroupAssetSetsRequest\x1a\x41.google.ads.googleads.v25.services.MutateAdGroupAssetSetsResponse\"Z\xda\x41\x16\x63ustomer_id,operations\x82\xd3\xe4\x93\x02;\"6/v25/customers/{customer_id=*}/adGroupAssetSets:mutate:\x01*\x1a\x45\xca\x41\x18googleads.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/adwordsB\x87\x02\n%com.google.ads.googleads.v25.servicesB\x1b\x41\x64GroupAssetSetServiceProtoP\x01ZIgoogle.golang.org/genproto/googleapis/ads/googleads/v25/services;services\xa2\x02\x03GAA\xaa\x02!Google.Ads.GoogleAds.V25.Services\xca\x02!Google\\Ads\\GoogleAds\\V25\\Services\xea\x02%Google::Ads::GoogleAds::V25::Servicesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Services + MutateAdGroupAssetSetsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.MutateAdGroupAssetSetsRequest").msgclass + AdGroupAssetSetOperation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.AdGroupAssetSetOperation").msgclass + MutateAdGroupAssetSetsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.MutateAdGroupAssetSetsResponse").msgclass + MutateAdGroupAssetSetResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.MutateAdGroupAssetSetResult").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/ad_group_asset_set_service_services_pb.rb b/lib/google/ads/google_ads/v25/services/ad_group_asset_set_service_services_pb.rb new file mode 100644 index 000000000..8f040307f --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/ad_group_asset_set_service_services_pb.rb @@ -0,0 +1,50 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/ads/googleads/v25/services/ad_group_asset_set_service.proto for package 'Google.Ads.GoogleAds.V25.Services' +# Original file comments: +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +require 'grpc' +require 'google/ads/google_ads/v25/services/ad_group_asset_set_service_pb' + +module Google + module Ads + module GoogleAds + module V25 + module Services + module AdGroupAssetSetService + # Proto file describing the AdGroupAssetSet service. + # + # Service to manage ad group asset set + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.ads.googleads.v25.services.AdGroupAssetSetService' + + # Creates, or removes ad group asset sets. Operation statuses are + # returned. + rpc :MutateAdGroupAssetSets, ::Google::Ads::GoogleAds::V25::Services::MutateAdGroupAssetSetsRequest, ::Google::Ads::GoogleAds::V25::Services::MutateAdGroupAssetSetsResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/ad_group_bid_modifier_service.rb b/lib/google/ads/google_ads/v25/services/ad_group_bid_modifier_service.rb new file mode 100644 index 000000000..40fc1eaf6 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/ad_group_bid_modifier_service.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/ads/google_ads/version" + +require "google/ads/google_ads/v25/services/ad_group_bid_modifier_service/credentials" +require "google/ads/google_ads/v25/services/ad_group_bid_modifier_service/paths" +require "google/ads/google_ads/v25/services/ad_group_bid_modifier_service/client" + +module Google + module Ads + module GoogleAds + module V25 + module Services + ## + # Service to manage ad group bid modifiers. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/ads/google_ads/v25/services/ad_group_bid_modifier_service" + # client = ::Google::Ads::GoogleAds::V25::Services::AdGroupBidModifierService::Client.new + # + module AdGroupBidModifierService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "ad_group_bid_modifier_service", "helpers.rb" +require "google/ads/google_ads/v25/services/ad_group_bid_modifier_service/helpers" if ::File.file? helper_path diff --git a/lib/google/ads/google_ads/v25/services/ad_group_bid_modifier_service/client.rb b/lib/google/ads/google_ads/v25/services/ad_group_bid_modifier_service/client.rb new file mode 100644 index 000000000..2b99f9dd3 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/ad_group_bid_modifier_service/client.rb @@ -0,0 +1,519 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# require "google/ads/google_ads/error" +require "google/ads/google_ads/v25/services/ad_group_bid_modifier_service_pb" + +module Google + module Ads + module GoogleAds + module V25 + module Services + module AdGroupBidModifierService + ## + # Client for the AdGroupBidModifierService service. + # + # Service to manage ad group bid modifiers. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "googleads.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :ad_group_bid_modifier_service_stub + + ## + # Configure the AdGroupBidModifierService Client class. + # + # See {::Google::Ads::GoogleAds::V25::Services::AdGroupBidModifierService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all AdGroupBidModifierService clients + # ::Google::Ads::GoogleAds::V25::Services::AdGroupBidModifierService::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + default_config = Client::Configuration.new + + default_config.timeout = 14_400.0 + default_config.retry_policy = { + initial_delay: 5.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the AdGroupBidModifierService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Ads::GoogleAds::V25::Services::AdGroupBidModifierService::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @ad_group_bid_modifier_service_stub.universe_domain + end + + ## + # Create a new AdGroupBidModifierService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Ads::GoogleAds::V25::Services::AdGroupBidModifierService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Ads::GoogleAds::V25::Services::AdGroupBidModifierService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the AdGroupBidModifierService client. + # @yieldparam config [Client::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/ads/google_ads/v25/services/ad_group_bid_modifier_service_services_pb" + + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @ad_group_bid_modifier_service_stub = ::Gapic::ServiceStub.new( + ::Google::Ads::GoogleAds::V25::Services::AdGroupBidModifierService::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool, + logger: @config.logger + ) + + @ad_group_bid_modifier_service_stub.stub_logger&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @ad_group_bid_modifier_service_stub.logger + end + + # Service calls + + ## + # Creates, updates, or removes ad group bid modifiers. + # Operation statuses are returned. + # + # List of thrown errors: + # [AdGroupBidModifierError]() + # [AuthenticationError]() + # [AuthorizationError]() + # [ContextError]() + # [CriterionError]() + # [DatabaseError]() + # [DistinctError]() + # [FieldError]() + # [FieldMaskError]() + # [HeaderError]() + # [IdError]() + # [InternalError]() + # [MutateError]() + # [NewResourceCreationError]() + # [NotEmptyError]() + # [OperatorError]() + # [QuotaError]() + # [RangeError]() + # [RequestError]() + # [ResourceCountLimitExceededError]() + # [SizeLimitError]() + # [StringFormatError]() + # [StringLengthError]() + # + # @overload mutate_ad_group_bid_modifiers(request, options = nil) + # Pass arguments to `mutate_ad_group_bid_modifiers` via a request object, either of type + # {::Google::Ads::GoogleAds::V25::Services::MutateAdGroupBidModifiersRequest} or an equivalent Hash. + # + # @param request [::Google::Ads::GoogleAds::V25::Services::MutateAdGroupBidModifiersRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload mutate_ad_group_bid_modifiers(customer_id: nil, operations: nil, partial_failure: nil, validate_only: nil, response_content_type: nil) + # Pass arguments to `mutate_ad_group_bid_modifiers` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param customer_id [::String] + # Required. ID of the customer whose ad group bid modifiers are being + # modified. + # @param operations [::Array<::Google::Ads::GoogleAds::V25::Services::AdGroupBidModifierOperation, ::Hash>] + # Required. The list of operations to perform on individual ad group bid + # modifiers. + # @param partial_failure [::Boolean] + # 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. + # @param validate_only [::Boolean] + # If true, the request is validated but not executed. Only errors are + # returned, not results. + # @param response_content_type [::Google::Ads::GoogleAds::V25::Enums::ResponseContentTypeEnum::ResponseContentType] + # The response content type setting. Determines whether the mutable resource + # or just the resource name should be returned post mutation. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Ads::GoogleAds::V25::Services::MutateAdGroupBidModifiersResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Ads::GoogleAds::V25::Services::MutateAdGroupBidModifiersResponse] + # + # @raise [Google::Ads::GoogleAds::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/ads/google_ads/v25/services" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Ads::GoogleAds::V25::Services::AdGroupBidModifierService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Ads::GoogleAds::V25::Services::MutateAdGroupBidModifiersRequest.new + # + # # Call the mutate_ad_group_bid_modifiers method. + # result = client.mutate_ad_group_bid_modifiers request + # + # # The returned object is of type Google::Ads::GoogleAds::V25::Services::MutateAdGroupBidModifiersResponse. + # p result + # + def mutate_ad_group_bid_modifiers request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::GoogleAds::V25::Services::MutateAdGroupBidModifiersRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.mutate_ad_group_bid_modifiers.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Ads::GoogleAds::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.customer_id + header_params["customer_id"] = request.customer_id + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.mutate_ad_group_bid_modifiers.timeout, + metadata: metadata, + retry_policy: @config.rpcs.mutate_ad_group_bid_modifiers.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @ad_group_bid_modifier_service_stub.call_rpc :mutate_ad_group_bid_modifiers, request, + options: options do |response, operation| + yield response, operation if block_given? + end + # rescue GRPC::BadStatus => grpc_error + # raise Google::Ads::GoogleAds::Error.new grpc_error.message + end + + ## + # Configuration class for the AdGroupBidModifierService API. + # + # This class represents the configuration for AdGroupBidModifierService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Ads::GoogleAds::V25::Services::AdGroupBidModifierService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # mutate_ad_group_bid_modifiers to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Ads::GoogleAds::V25::Services::AdGroupBidModifierService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.mutate_ad_group_bid_modifiers.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Ads::GoogleAds::V25::Services::AdGroupBidModifierService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.mutate_ad_group_bid_modifiers.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Ads::GoogleAds::V25::Services::AdGroupBidModifierService::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "googleads.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, + ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the AdGroupBidModifierService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `mutate_ad_group_bid_modifiers` + # @return [::Gapic::Config::Method] + # + attr_reader :mutate_ad_group_bid_modifiers + + # @private + def initialize parent_rpcs = nil + mutate_ad_group_bid_modifiers_config = parent_rpcs.mutate_ad_group_bid_modifiers if parent_rpcs.respond_to? :mutate_ad_group_bid_modifiers + @mutate_ad_group_bid_modifiers = ::Gapic::Config::Method.new mutate_ad_group_bid_modifiers_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/ad_group_bid_modifier_service/credentials.rb b/lib/google/ads/google_ads/v25/services/ad_group_bid_modifier_service/credentials.rb new file mode 100644 index 000000000..205efe535 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/ad_group_bid_modifier_service/credentials.rb @@ -0,0 +1,38 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Ads + module GoogleAds + module V25 + module Services + module AdGroupBidModifierService + # Credentials for the AdGroupBidModifierService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/adwords" + ] + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/ad_group_bid_modifier_service/paths.rb b/lib/google/ads/google_ads/v25/services/ad_group_bid_modifier_service/paths.rb new file mode 100644 index 000000000..5869d8a34 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/ad_group_bid_modifier_service/paths.rb @@ -0,0 +1,71 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Ads + module GoogleAds + module V25 + module Services + module AdGroupBidModifierService + # Path helper methods for the AdGroupBidModifierService API. + module Paths + ## + # Create a fully-qualified AdGroup resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/adGroups/{ad_group_id}` + # + # @param customer_id [String] + # @param ad_group_id [String] + # + # @return [::String] + def ad_group_path customer_id:, ad_group_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/adGroups/#{ad_group_id}" + end + + ## + # Create a fully-qualified AdGroupBidModifier resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/adGroupBidModifiers/{ad_group_id}~{criterion_id}` + # + # @param customer_id [String] + # @param ad_group_id [String] + # @param criterion_id [String] + # + # @return [::String] + def ad_group_bid_modifier_path customer_id:, ad_group_id:, criterion_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + raise ::ArgumentError, "ad_group_id cannot contain /" if ad_group_id.to_s.include? "/" + + "customers/#{customer_id}/adGroupBidModifiers/#{ad_group_id}~#{criterion_id}" + end + + extend self + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/ad_group_bid_modifier_service_pb.rb b/lib/google/ads/google_ads/v25/services/ad_group_bid_modifier_service_pb.rb new file mode 100644 index 000000000..f963c3176 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/ad_group_bid_modifier_service_pb.rb @@ -0,0 +1,35 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/services/ad_group_bid_modifier_service.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/enums/response_content_type_pb' +require 'google/ads/google_ads/v25/resources/ad_group_bid_modifier_pb' +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/field_mask_pb' +require 'google/rpc/status_pb' + + +descriptor_data = "\nEgoogle/ads/googleads/v25/services/ad_group_bid_modifier_service.proto\x12!google.ads.googleads.v25.services\x1a:google/ads/googleads/v25/enums/response_content_type.proto\x1a>google/ads/googleads/v25/resources/ad_group_bid_modifier.proto\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\x1a\x17google/rpc/status.proto\"\xb1\x02\n MutateAdGroupBidModifiersRequest\x12\x18\n\x0b\x63ustomer_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12W\n\noperations\x18\x02 \x03(\x0b\x32>.google.ads.googleads.v25.services.AdGroupBidModifierOperationB\x03\xe0\x41\x02\x12\x17\n\x0fpartial_failure\x18\x03 \x01(\x08\x12\x15\n\rvalidate_only\x18\x04 \x01(\x08\x12j\n\x15response_content_type\x18\x05 \x01(\x0e\x32K.google.ads.googleads.v25.enums.ResponseContentTypeEnum.ResponseContentType\"\xb3\x02\n\x1b\x41\x64GroupBidModifierOperation\x12/\n\x0bupdate_mask\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\x12H\n\x06\x63reate\x18\x01 \x01(\x0b\x32\x36.google.ads.googleads.v25.resources.AdGroupBidModifierH\x00\x12H\n\x06update\x18\x02 \x01(\x0b\x32\x36.google.ads.googleads.v25.resources.AdGroupBidModifierH\x00\x12\x42\n\x06remove\x18\x03 \x01(\tB0\xfa\x41-\n+googleads.googleapis.com/AdGroupBidModifierH\x00\x42\x0b\n\toperation\"\xaa\x01\n!MutateAdGroupBidModifiersResponse\x12\x31\n\x15partial_failure_error\x18\x03 \x01(\x0b\x32\x12.google.rpc.Status\x12R\n\x07results\x18\x02 \x03(\x0b\x32\x41.google.ads.googleads.v25.services.MutateAdGroupBidModifierResult\"\xc0\x01\n\x1eMutateAdGroupBidModifierResult\x12G\n\rresource_name\x18\x01 \x01(\tB0\xfa\x41-\n+googleads.googleapis.com/AdGroupBidModifier\x12U\n\x15\x61\x64_group_bid_modifier\x18\x02 \x01(\x0b\x32\x36.google.ads.googleads.v25.resources.AdGroupBidModifier2\xea\x02\n\x19\x41\x64GroupBidModifierService\x12\x85\x02\n\x19MutateAdGroupBidModifiers\x12\x43.google.ads.googleads.v25.services.MutateAdGroupBidModifiersRequest\x1a\x44.google.ads.googleads.v25.services.MutateAdGroupBidModifiersResponse\"]\xda\x41\x16\x63ustomer_id,operations\x82\xd3\xe4\x93\x02>\"9/v25/customers/{customer_id=*}/adGroupBidModifiers:mutate:\x01*\x1a\x45\xca\x41\x18googleads.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/adwordsB\x8a\x02\n%com.google.ads.googleads.v25.servicesB\x1e\x41\x64GroupBidModifierServiceProtoP\x01ZIgoogle.golang.org/genproto/googleapis/ads/googleads/v25/services;services\xa2\x02\x03GAA\xaa\x02!Google.Ads.GoogleAds.V25.Services\xca\x02!Google\\Ads\\GoogleAds\\V25\\Services\xea\x02%Google::Ads::GoogleAds::V25::Servicesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Services + MutateAdGroupBidModifiersRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.MutateAdGroupBidModifiersRequest").msgclass + AdGroupBidModifierOperation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.AdGroupBidModifierOperation").msgclass + MutateAdGroupBidModifiersResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.MutateAdGroupBidModifiersResponse").msgclass + MutateAdGroupBidModifierResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.MutateAdGroupBidModifierResult").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/ad_group_bid_modifier_service_services_pb.rb b/lib/google/ads/google_ads/v25/services/ad_group_bid_modifier_service_services_pb.rb new file mode 100644 index 000000000..3548d4536 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/ad_group_bid_modifier_service_services_pb.rb @@ -0,0 +1,75 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/ads/googleads/v25/services/ad_group_bid_modifier_service.proto for package 'Google.Ads.GoogleAds.V25.Services' +# Original file comments: +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +require 'grpc' +require 'google/ads/google_ads/v25/services/ad_group_bid_modifier_service_pb' + +module Google + module Ads + module GoogleAds + module V25 + module Services + module AdGroupBidModifierService + # Proto file describing the Ad Group Bid Modifier service. + # + # Service to manage ad group bid modifiers. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.ads.googleads.v25.services.AdGroupBidModifierService' + + # Creates, updates, or removes ad group bid modifiers. + # Operation statuses are returned. + # + # List of thrown errors: + # [AdGroupBidModifierError]() + # [AuthenticationError]() + # [AuthorizationError]() + # [ContextError]() + # [CriterionError]() + # [DatabaseError]() + # [DistinctError]() + # [FieldError]() + # [FieldMaskError]() + # [HeaderError]() + # [IdError]() + # [InternalError]() + # [MutateError]() + # [NewResourceCreationError]() + # [NotEmptyError]() + # [OperatorError]() + # [QuotaError]() + # [RangeError]() + # [RequestError]() + # [ResourceCountLimitExceededError]() + # [SizeLimitError]() + # [StringFormatError]() + # [StringLengthError]() + rpc :MutateAdGroupBidModifiers, ::Google::Ads::GoogleAds::V25::Services::MutateAdGroupBidModifiersRequest, ::Google::Ads::GoogleAds::V25::Services::MutateAdGroupBidModifiersResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/ad_group_criterion_customizer_service.rb b/lib/google/ads/google_ads/v25/services/ad_group_criterion_customizer_service.rb new file mode 100644 index 000000000..e09fa016d --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/ad_group_criterion_customizer_service.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/ads/google_ads/version" + +require "google/ads/google_ads/v25/services/ad_group_criterion_customizer_service/credentials" +require "google/ads/google_ads/v25/services/ad_group_criterion_customizer_service/paths" +require "google/ads/google_ads/v25/services/ad_group_criterion_customizer_service/client" + +module Google + module Ads + module GoogleAds + module V25 + module Services + ## + # Service to manage ad group criterion customizer + # + # @example Load this service and instantiate a gRPC client + # + # require "google/ads/google_ads/v25/services/ad_group_criterion_customizer_service" + # client = ::Google::Ads::GoogleAds::V25::Services::AdGroupCriterionCustomizerService::Client.new + # + module AdGroupCriterionCustomizerService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "ad_group_criterion_customizer_service", "helpers.rb" +require "google/ads/google_ads/v25/services/ad_group_criterion_customizer_service/helpers" if ::File.file? helper_path diff --git a/lib/google/ads/google_ads/v25/services/ad_group_criterion_customizer_service/client.rb b/lib/google/ads/google_ads/v25/services/ad_group_criterion_customizer_service/client.rb new file mode 100644 index 000000000..220cbfa31 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/ad_group_criterion_customizer_service/client.rb @@ -0,0 +1,494 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# require "google/ads/google_ads/error" +require "google/ads/google_ads/v25/services/ad_group_criterion_customizer_service_pb" + +module Google + module Ads + module GoogleAds + module V25 + module Services + module AdGroupCriterionCustomizerService + ## + # Client for the AdGroupCriterionCustomizerService service. + # + # Service to manage ad group criterion customizer + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "googleads.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :ad_group_criterion_customizer_service_stub + + ## + # Configure the AdGroupCriterionCustomizerService Client class. + # + # See {::Google::Ads::GoogleAds::V25::Services::AdGroupCriterionCustomizerService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all AdGroupCriterionCustomizerService clients + # ::Google::Ads::GoogleAds::V25::Services::AdGroupCriterionCustomizerService::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + default_config = Client::Configuration.new + + default_config.timeout = 14_400.0 + default_config.retry_policy = { + initial_delay: 5.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the AdGroupCriterionCustomizerService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Ads::GoogleAds::V25::Services::AdGroupCriterionCustomizerService::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @ad_group_criterion_customizer_service_stub.universe_domain + end + + ## + # Create a new AdGroupCriterionCustomizerService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Ads::GoogleAds::V25::Services::AdGroupCriterionCustomizerService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Ads::GoogleAds::V25::Services::AdGroupCriterionCustomizerService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the AdGroupCriterionCustomizerService client. + # @yieldparam config [Client::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/ads/google_ads/v25/services/ad_group_criterion_customizer_service_services_pb" + + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @ad_group_criterion_customizer_service_stub = ::Gapic::ServiceStub.new( + ::Google::Ads::GoogleAds::V25::Services::AdGroupCriterionCustomizerService::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool, + logger: @config.logger + ) + + @ad_group_criterion_customizer_service_stub.stub_logger&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @ad_group_criterion_customizer_service_stub.logger + end + + # Service calls + + ## + # Creates, updates or removes ad group criterion customizers. Operation + # statuses are returned. + # + # @overload mutate_ad_group_criterion_customizers(request, options = nil) + # Pass arguments to `mutate_ad_group_criterion_customizers` via a request object, either of type + # {::Google::Ads::GoogleAds::V25::Services::MutateAdGroupCriterionCustomizersRequest} or an equivalent Hash. + # + # @param request [::Google::Ads::GoogleAds::V25::Services::MutateAdGroupCriterionCustomizersRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload mutate_ad_group_criterion_customizers(customer_id: nil, operations: nil, partial_failure: nil, validate_only: nil, response_content_type: nil) + # Pass arguments to `mutate_ad_group_criterion_customizers` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param customer_id [::String] + # Required. The ID of the customer whose ad group criterion customizers are + # being modified. + # @param operations [::Array<::Google::Ads::GoogleAds::V25::Services::AdGroupCriterionCustomizerOperation, ::Hash>] + # Required. The list of operations to perform on individual ad group + # criterion customizers. + # @param partial_failure [::Boolean] + # 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. + # @param validate_only [::Boolean] + # If true, the request is validated but not executed. Only errors are + # returned, not results. + # @param response_content_type [::Google::Ads::GoogleAds::V25::Enums::ResponseContentTypeEnum::ResponseContentType] + # The response content type setting. Determines whether the mutable resource + # or just the resource name should be returned post mutation. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Ads::GoogleAds::V25::Services::MutateAdGroupCriterionCustomizersResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Ads::GoogleAds::V25::Services::MutateAdGroupCriterionCustomizersResponse] + # + # @raise [Google::Ads::GoogleAds::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/ads/google_ads/v25/services" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Ads::GoogleAds::V25::Services::AdGroupCriterionCustomizerService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Ads::GoogleAds::V25::Services::MutateAdGroupCriterionCustomizersRequest.new + # + # # Call the mutate_ad_group_criterion_customizers method. + # result = client.mutate_ad_group_criterion_customizers request + # + # # The returned object is of type Google::Ads::GoogleAds::V25::Services::MutateAdGroupCriterionCustomizersResponse. + # p result + # + def mutate_ad_group_criterion_customizers request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::GoogleAds::V25::Services::MutateAdGroupCriterionCustomizersRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.mutate_ad_group_criterion_customizers.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Ads::GoogleAds::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.customer_id + header_params["customer_id"] = request.customer_id + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.mutate_ad_group_criterion_customizers.timeout, + metadata: metadata, + retry_policy: @config.rpcs.mutate_ad_group_criterion_customizers.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @ad_group_criterion_customizer_service_stub.call_rpc :mutate_ad_group_criterion_customizers, request, + options: options do |response, operation| + yield response, operation if block_given? + end + # rescue GRPC::BadStatus => grpc_error + # raise Google::Ads::GoogleAds::Error.new grpc_error.message + end + + ## + # Configuration class for the AdGroupCriterionCustomizerService API. + # + # This class represents the configuration for AdGroupCriterionCustomizerService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Ads::GoogleAds::V25::Services::AdGroupCriterionCustomizerService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # mutate_ad_group_criterion_customizers to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Ads::GoogleAds::V25::Services::AdGroupCriterionCustomizerService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.mutate_ad_group_criterion_customizers.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Ads::GoogleAds::V25::Services::AdGroupCriterionCustomizerService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.mutate_ad_group_criterion_customizers.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Ads::GoogleAds::V25::Services::AdGroupCriterionCustomizerService::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "googleads.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, + ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the AdGroupCriterionCustomizerService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `mutate_ad_group_criterion_customizers` + # @return [::Gapic::Config::Method] + # + attr_reader :mutate_ad_group_criterion_customizers + + # @private + def initialize parent_rpcs = nil + mutate_ad_group_criterion_customizers_config = parent_rpcs.mutate_ad_group_criterion_customizers if parent_rpcs.respond_to? :mutate_ad_group_criterion_customizers + @mutate_ad_group_criterion_customizers = ::Gapic::Config::Method.new mutate_ad_group_criterion_customizers_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/ad_group_criterion_customizer_service/credentials.rb b/lib/google/ads/google_ads/v25/services/ad_group_criterion_customizer_service/credentials.rb new file mode 100644 index 000000000..66dd3a714 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/ad_group_criterion_customizer_service/credentials.rb @@ -0,0 +1,38 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Ads + module GoogleAds + module V25 + module Services + module AdGroupCriterionCustomizerService + # Credentials for the AdGroupCriterionCustomizerService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/adwords" + ] + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/ad_group_criterion_customizer_service/paths.rb b/lib/google/ads/google_ads/v25/services/ad_group_criterion_customizer_service/paths.rb new file mode 100644 index 000000000..92a25770b --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/ad_group_criterion_customizer_service/paths.rb @@ -0,0 +1,92 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Ads + module GoogleAds + module V25 + module Services + module AdGroupCriterionCustomizerService + # Path helper methods for the AdGroupCriterionCustomizerService API. + module Paths + ## + # Create a fully-qualified AdGroupCriterion resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/adGroupCriteria/{ad_group_id}~{criterion_id}` + # + # @param customer_id [String] + # @param ad_group_id [String] + # @param criterion_id [String] + # + # @return [::String] + def ad_group_criterion_path customer_id:, ad_group_id:, criterion_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + raise ::ArgumentError, "ad_group_id cannot contain /" if ad_group_id.to_s.include? "/" + + "customers/#{customer_id}/adGroupCriteria/#{ad_group_id}~#{criterion_id}" + end + + ## + # Create a fully-qualified AdGroupCriterionCustomizer resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/adGroupCriterionCustomizers/{ad_group_id}~{criterion_id}~{customizer_attribute_id}` + # + # @param customer_id [String] + # @param ad_group_id [String] + # @param criterion_id [String] + # @param customizer_attribute_id [String] + # + # @return [::String] + def ad_group_criterion_customizer_path customer_id:, ad_group_id:, criterion_id:, customizer_attribute_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + raise ::ArgumentError, "ad_group_id cannot contain /" if ad_group_id.to_s.include? "/" + raise ::ArgumentError, "criterion_id cannot contain /" if criterion_id.to_s.include? "/" + + "customers/#{customer_id}/adGroupCriterionCustomizers/#{ad_group_id}~#{criterion_id}~#{customizer_attribute_id}" + end + + ## + # Create a fully-qualified CustomizerAttribute resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/customizerAttributes/{customizer_attribute_id}` + # + # @param customer_id [String] + # @param customizer_attribute_id [String] + # + # @return [::String] + def customizer_attribute_path customer_id:, customizer_attribute_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/customizerAttributes/#{customizer_attribute_id}" + end + + extend self + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/ad_group_criterion_customizer_service_pb.rb b/lib/google/ads/google_ads/v25/services/ad_group_criterion_customizer_service_pb.rb new file mode 100644 index 000000000..3c8b5d3e3 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/ad_group_criterion_customizer_service_pb.rb @@ -0,0 +1,34 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/services/ad_group_criterion_customizer_service.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/enums/response_content_type_pb' +require 'google/ads/google_ads/v25/resources/ad_group_criterion_customizer_pb' +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/rpc/status_pb' + + +descriptor_data = "\nMgoogle/ads/googleads/v25/services/ad_group_criterion_customizer_service.proto\x12!google.ads.googleads.v25.services\x1a:google/ads/googleads/v25/enums/response_content_type.proto\x1a\x46google/ads/googleads/v25/resources/ad_group_criterion_customizer.proto\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x17google/rpc/status.proto\"\xc1\x02\n(MutateAdGroupCriterionCustomizersRequest\x12\x18\n\x0b\x63ustomer_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12_\n\noperations\x18\x02 \x03(\x0b\x32\x46.google.ads.googleads.v25.services.AdGroupCriterionCustomizerOperationB\x03\xe0\x41\x02\x12\x17\n\x0fpartial_failure\x18\x03 \x01(\x08\x12\x15\n\rvalidate_only\x18\x04 \x01(\x08\x12j\n\x15response_content_type\x18\x05 \x01(\x0e\x32K.google.ads.googleads.v25.enums.ResponseContentTypeEnum.ResponseContentType\"\xd0\x01\n#AdGroupCriterionCustomizerOperation\x12P\n\x06\x63reate\x18\x01 \x01(\x0b\x32>.google.ads.googleads.v25.resources.AdGroupCriterionCustomizerH\x00\x12J\n\x06remove\x18\x02 \x01(\tB8\xfa\x41\x35\n3googleads.googleapis.com/AdGroupCriterionCustomizerH\x00\x42\x0b\n\toperation\"\xba\x01\n)MutateAdGroupCriterionCustomizersResponse\x12Z\n\x07results\x18\x01 \x03(\x0b\x32I.google.ads.googleads.v25.services.MutateAdGroupCriterionCustomizerResult\x12\x31\n\x15partial_failure_error\x18\x02 \x01(\x0b\x32\x12.google.rpc.Status\"\xe0\x01\n&MutateAdGroupCriterionCustomizerResult\x12O\n\rresource_name\x18\x01 \x01(\tB8\xfa\x41\x35\n3googleads.googleapis.com/AdGroupCriterionCustomizer\x12\x65\n\x1d\x61\x64_group_criterion_customizer\x18\x02 \x01(\x0b\x32>.google.ads.googleads.v25.resources.AdGroupCriterionCustomizer2\x92\x03\n!AdGroupCriterionCustomizerService\x12\xa5\x02\n!MutateAdGroupCriterionCustomizers\x12K.google.ads.googleads.v25.services.MutateAdGroupCriterionCustomizersRequest\x1aL.google.ads.googleads.v25.services.MutateAdGroupCriterionCustomizersResponse\"e\xda\x41\x16\x63ustomer_id,operations\x82\xd3\xe4\x93\x02\x46\"A/v25/customers/{customer_id=*}/AdGroupCriterionCustomizers:mutate:\x01*\x1a\x45\xca\x41\x18googleads.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/adwordsB\x92\x02\n%com.google.ads.googleads.v25.servicesB&AdGroupCriterionCustomizerServiceProtoP\x01ZIgoogle.golang.org/genproto/googleapis/ads/googleads/v25/services;services\xa2\x02\x03GAA\xaa\x02!Google.Ads.GoogleAds.V25.Services\xca\x02!Google\\Ads\\GoogleAds\\V25\\Services\xea\x02%Google::Ads::GoogleAds::V25::Servicesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Services + MutateAdGroupCriterionCustomizersRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.MutateAdGroupCriterionCustomizersRequest").msgclass + AdGroupCriterionCustomizerOperation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.AdGroupCriterionCustomizerOperation").msgclass + MutateAdGroupCriterionCustomizersResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.MutateAdGroupCriterionCustomizersResponse").msgclass + MutateAdGroupCriterionCustomizerResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.MutateAdGroupCriterionCustomizerResult").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/ad_group_criterion_customizer_service_services_pb.rb b/lib/google/ads/google_ads/v25/services/ad_group_criterion_customizer_service_services_pb.rb new file mode 100644 index 000000000..9c853a432 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/ad_group_criterion_customizer_service_services_pb.rb @@ -0,0 +1,50 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/ads/googleads/v25/services/ad_group_criterion_customizer_service.proto for package 'Google.Ads.GoogleAds.V25.Services' +# Original file comments: +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +require 'grpc' +require 'google/ads/google_ads/v25/services/ad_group_criterion_customizer_service_pb' + +module Google + module Ads + module GoogleAds + module V25 + module Services + module AdGroupCriterionCustomizerService + # Proto file describing the AdGroupCriterionCustomizer service. + # + # Service to manage ad group criterion customizer + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.ads.googleads.v25.services.AdGroupCriterionCustomizerService' + + # Creates, updates or removes ad group criterion customizers. Operation + # statuses are returned. + rpc :MutateAdGroupCriterionCustomizers, ::Google::Ads::GoogleAds::V25::Services::MutateAdGroupCriterionCustomizersRequest, ::Google::Ads::GoogleAds::V25::Services::MutateAdGroupCriterionCustomizersResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/ad_group_criterion_label_service.rb b/lib/google/ads/google_ads/v25/services/ad_group_criterion_label_service.rb new file mode 100644 index 000000000..5b270d695 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/ad_group_criterion_label_service.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/ads/google_ads/version" + +require "google/ads/google_ads/v25/services/ad_group_criterion_label_service/credentials" +require "google/ads/google_ads/v25/services/ad_group_criterion_label_service/paths" +require "google/ads/google_ads/v25/services/ad_group_criterion_label_service/client" + +module Google + module Ads + module GoogleAds + module V25 + module Services + ## + # Service to manage labels on ad group criteria. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/ads/google_ads/v25/services/ad_group_criterion_label_service" + # client = ::Google::Ads::GoogleAds::V25::Services::AdGroupCriterionLabelService::Client.new + # + module AdGroupCriterionLabelService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "ad_group_criterion_label_service", "helpers.rb" +require "google/ads/google_ads/v25/services/ad_group_criterion_label_service/helpers" if ::File.file? helper_path diff --git a/lib/google/ads/google_ads/v25/services/ad_group_criterion_label_service/client.rb b/lib/google/ads/google_ads/v25/services/ad_group_criterion_label_service/client.rb new file mode 100644 index 000000000..7b3f29159 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/ad_group_criterion_label_service/client.rb @@ -0,0 +1,500 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# require "google/ads/google_ads/error" +require "google/ads/google_ads/v25/services/ad_group_criterion_label_service_pb" + +module Google + module Ads + module GoogleAds + module V25 + module Services + module AdGroupCriterionLabelService + ## + # Client for the AdGroupCriterionLabelService service. + # + # Service to manage labels on ad group criteria. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "googleads.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :ad_group_criterion_label_service_stub + + ## + # Configure the AdGroupCriterionLabelService Client class. + # + # See {::Google::Ads::GoogleAds::V25::Services::AdGroupCriterionLabelService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all AdGroupCriterionLabelService clients + # ::Google::Ads::GoogleAds::V25::Services::AdGroupCriterionLabelService::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + default_config = Client::Configuration.new + + default_config.timeout = 14_400.0 + default_config.retry_policy = { + initial_delay: 5.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the AdGroupCriterionLabelService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Ads::GoogleAds::V25::Services::AdGroupCriterionLabelService::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @ad_group_criterion_label_service_stub.universe_domain + end + + ## + # Create a new AdGroupCriterionLabelService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Ads::GoogleAds::V25::Services::AdGroupCriterionLabelService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Ads::GoogleAds::V25::Services::AdGroupCriterionLabelService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the AdGroupCriterionLabelService client. + # @yieldparam config [Client::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/ads/google_ads/v25/services/ad_group_criterion_label_service_services_pb" + + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @ad_group_criterion_label_service_stub = ::Gapic::ServiceStub.new( + ::Google::Ads::GoogleAds::V25::Services::AdGroupCriterionLabelService::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool, + logger: @config.logger + ) + + @ad_group_criterion_label_service_stub.stub_logger&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @ad_group_criterion_label_service_stub.logger + end + + # Service calls + + ## + # Creates and removes ad group criterion labels. + # Operation statuses are returned. + # + # List of thrown errors: + # [AuthenticationError]() + # [AuthorizationError]() + # [DatabaseError]() + # [FieldError]() + # [HeaderError]() + # [InternalError]() + # [QuotaError]() + # [RequestError]() + # + # @overload mutate_ad_group_criterion_labels(request, options = nil) + # Pass arguments to `mutate_ad_group_criterion_labels` via a request object, either of type + # {::Google::Ads::GoogleAds::V25::Services::MutateAdGroupCriterionLabelsRequest} or an equivalent Hash. + # + # @param request [::Google::Ads::GoogleAds::V25::Services::MutateAdGroupCriterionLabelsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload mutate_ad_group_criterion_labels(customer_id: nil, operations: nil, partial_failure: nil, validate_only: nil) + # Pass arguments to `mutate_ad_group_criterion_labels` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param customer_id [::String] + # Required. ID of the customer whose ad group criterion labels are being + # modified. + # @param operations [::Array<::Google::Ads::GoogleAds::V25::Services::AdGroupCriterionLabelOperation, ::Hash>] + # Required. The list of operations to perform on ad group criterion labels. + # @param partial_failure [::Boolean] + # 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. + # @param validate_only [::Boolean] + # If true, the request is validated but not executed. Only errors are + # returned, not results. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Ads::GoogleAds::V25::Services::MutateAdGroupCriterionLabelsResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Ads::GoogleAds::V25::Services::MutateAdGroupCriterionLabelsResponse] + # + # @raise [Google::Ads::GoogleAds::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/ads/google_ads/v25/services" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Ads::GoogleAds::V25::Services::AdGroupCriterionLabelService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Ads::GoogleAds::V25::Services::MutateAdGroupCriterionLabelsRequest.new + # + # # Call the mutate_ad_group_criterion_labels method. + # result = client.mutate_ad_group_criterion_labels request + # + # # The returned object is of type Google::Ads::GoogleAds::V25::Services::MutateAdGroupCriterionLabelsResponse. + # p result + # + def mutate_ad_group_criterion_labels request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::GoogleAds::V25::Services::MutateAdGroupCriterionLabelsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.mutate_ad_group_criterion_labels.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Ads::GoogleAds::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.customer_id + header_params["customer_id"] = request.customer_id + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.mutate_ad_group_criterion_labels.timeout, + metadata: metadata, + retry_policy: @config.rpcs.mutate_ad_group_criterion_labels.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @ad_group_criterion_label_service_stub.call_rpc :mutate_ad_group_criterion_labels, request, + options: options do |response, operation| + yield response, operation if block_given? + end + # rescue GRPC::BadStatus => grpc_error + # raise Google::Ads::GoogleAds::Error.new grpc_error.message + end + + ## + # Configuration class for the AdGroupCriterionLabelService API. + # + # This class represents the configuration for AdGroupCriterionLabelService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Ads::GoogleAds::V25::Services::AdGroupCriterionLabelService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # mutate_ad_group_criterion_labels to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Ads::GoogleAds::V25::Services::AdGroupCriterionLabelService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.mutate_ad_group_criterion_labels.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Ads::GoogleAds::V25::Services::AdGroupCriterionLabelService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.mutate_ad_group_criterion_labels.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Ads::GoogleAds::V25::Services::AdGroupCriterionLabelService::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "googleads.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, + ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the AdGroupCriterionLabelService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `mutate_ad_group_criterion_labels` + # @return [::Gapic::Config::Method] + # + attr_reader :mutate_ad_group_criterion_labels + + # @private + def initialize parent_rpcs = nil + mutate_ad_group_criterion_labels_config = parent_rpcs.mutate_ad_group_criterion_labels if parent_rpcs.respond_to? :mutate_ad_group_criterion_labels + @mutate_ad_group_criterion_labels = ::Gapic::Config::Method.new mutate_ad_group_criterion_labels_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/ad_group_criterion_label_service/credentials.rb b/lib/google/ads/google_ads/v25/services/ad_group_criterion_label_service/credentials.rb new file mode 100644 index 000000000..139179163 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/ad_group_criterion_label_service/credentials.rb @@ -0,0 +1,38 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Ads + module GoogleAds + module V25 + module Services + module AdGroupCriterionLabelService + # Credentials for the AdGroupCriterionLabelService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/adwords" + ] + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/ad_group_criterion_label_service/paths.rb b/lib/google/ads/google_ads/v25/services/ad_group_criterion_label_service/paths.rb new file mode 100644 index 000000000..a45c4a2bf --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/ad_group_criterion_label_service/paths.rb @@ -0,0 +1,92 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Ads + module GoogleAds + module V25 + module Services + module AdGroupCriterionLabelService + # Path helper methods for the AdGroupCriterionLabelService API. + module Paths + ## + # Create a fully-qualified AdGroupCriterion resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/adGroupCriteria/{ad_group_id}~{criterion_id}` + # + # @param customer_id [String] + # @param ad_group_id [String] + # @param criterion_id [String] + # + # @return [::String] + def ad_group_criterion_path customer_id:, ad_group_id:, criterion_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + raise ::ArgumentError, "ad_group_id cannot contain /" if ad_group_id.to_s.include? "/" + + "customers/#{customer_id}/adGroupCriteria/#{ad_group_id}~#{criterion_id}" + end + + ## + # Create a fully-qualified AdGroupCriterionLabel resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/adGroupCriterionLabels/{ad_group_id}~{criterion_id}~{label_id}` + # + # @param customer_id [String] + # @param ad_group_id [String] + # @param criterion_id [String] + # @param label_id [String] + # + # @return [::String] + def ad_group_criterion_label_path customer_id:, ad_group_id:, criterion_id:, label_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + raise ::ArgumentError, "ad_group_id cannot contain /" if ad_group_id.to_s.include? "/" + raise ::ArgumentError, "criterion_id cannot contain /" if criterion_id.to_s.include? "/" + + "customers/#{customer_id}/adGroupCriterionLabels/#{ad_group_id}~#{criterion_id}~#{label_id}" + end + + ## + # Create a fully-qualified Label resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/labels/{label_id}` + # + # @param customer_id [String] + # @param label_id [String] + # + # @return [::String] + def label_path customer_id:, label_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/labels/#{label_id}" + end + + extend self + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/ad_group_criterion_label_service_pb.rb b/lib/google/ads/google_ads/v25/services/ad_group_criterion_label_service_pb.rb new file mode 100644 index 000000000..e6483ad6c --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/ad_group_criterion_label_service_pb.rb @@ -0,0 +1,33 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/services/ad_group_criterion_label_service.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/resources/ad_group_criterion_label_pb' +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/rpc/status_pb' + + +descriptor_data = "\nHgoogle/ads/googleads/v25/services/ad_group_criterion_label_service.proto\x12!google.ads.googleads.v25.services\x1a\x41google/ads/googleads/v25/resources/ad_group_criterion_label.proto\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x17google/rpc/status.proto\"\xcb\x01\n#MutateAdGroupCriterionLabelsRequest\x12\x18\n\x0b\x63ustomer_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12Z\n\noperations\x18\x02 \x03(\x0b\x32\x41.google.ads.googleads.v25.services.AdGroupCriterionLabelOperationB\x03\xe0\x41\x02\x12\x17\n\x0fpartial_failure\x18\x03 \x01(\x08\x12\x15\n\rvalidate_only\x18\x04 \x01(\x08\"\xc1\x01\n\x1e\x41\x64GroupCriterionLabelOperation\x12K\n\x06\x63reate\x18\x01 \x01(\x0b\x32\x39.google.ads.googleads.v25.resources.AdGroupCriterionLabelH\x00\x12\x45\n\x06remove\x18\x02 \x01(\tB3\xfa\x41\x30\n.googleads.googleapis.com/AdGroupCriterionLabelH\x00\x42\x0b\n\toperation\"\xb0\x01\n$MutateAdGroupCriterionLabelsResponse\x12\x31\n\x15partial_failure_error\x18\x03 \x01(\x0b\x32\x12.google.rpc.Status\x12U\n\x07results\x18\x02 \x03(\x0b\x32\x44.google.ads.googleads.v25.services.MutateAdGroupCriterionLabelResult\"o\n!MutateAdGroupCriterionLabelResult\x12J\n\rresource_name\x18\x01 \x01(\tB3\xfa\x41\x30\n.googleads.googleapis.com/AdGroupCriterionLabel2\xf9\x02\n\x1c\x41\x64GroupCriterionLabelService\x12\x91\x02\n\x1cMutateAdGroupCriterionLabels\x12\x46.google.ads.googleads.v25.services.MutateAdGroupCriterionLabelsRequest\x1aG.google.ads.googleads.v25.services.MutateAdGroupCriterionLabelsResponse\"`\xda\x41\x16\x63ustomer_id,operations\x82\xd3\xe4\x93\x02\x41\"] + # Required. The list of operations to perform on individual criteria. + # @param partial_failure [::Boolean] + # 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. + # @param validate_only [::Boolean] + # If true, the request is validated but not executed. Only errors are + # returned, not results. + # @param response_content_type [::Google::Ads::GoogleAds::V25::Enums::ResponseContentTypeEnum::ResponseContentType] + # The response content type setting. Determines whether the mutable resource + # or just the resource name should be returned post mutation. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Ads::GoogleAds::V25::Services::MutateAdGroupCriteriaResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Ads::GoogleAds::V25::Services::MutateAdGroupCriteriaResponse] + # + # @raise [Google::Ads::GoogleAds::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/ads/google_ads/v25/services" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Ads::GoogleAds::V25::Services::AdGroupCriterionService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Ads::GoogleAds::V25::Services::MutateAdGroupCriteriaRequest.new + # + # # Call the mutate_ad_group_criteria method. + # result = client.mutate_ad_group_criteria request + # + # # The returned object is of type Google::Ads::GoogleAds::V25::Services::MutateAdGroupCriteriaResponse. + # p result + # + def mutate_ad_group_criteria request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::GoogleAds::V25::Services::MutateAdGroupCriteriaRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.mutate_ad_group_criteria.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Ads::GoogleAds::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.customer_id + header_params["customer_id"] = request.customer_id + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.mutate_ad_group_criteria.timeout, + metadata: metadata, + retry_policy: @config.rpcs.mutate_ad_group_criteria.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @ad_group_criterion_service_stub.call_rpc :mutate_ad_group_criteria, request, + options: options do |response, operation| + yield response, operation if block_given? + end + # rescue GRPC::BadStatus => grpc_error + # raise Google::Ads::GoogleAds::Error.new grpc_error.message + end + + ## + # Configuration class for the AdGroupCriterionService API. + # + # This class represents the configuration for AdGroupCriterionService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Ads::GoogleAds::V25::Services::AdGroupCriterionService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # mutate_ad_group_criteria to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Ads::GoogleAds::V25::Services::AdGroupCriterionService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.mutate_ad_group_criteria.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Ads::GoogleAds::V25::Services::AdGroupCriterionService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.mutate_ad_group_criteria.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Ads::GoogleAds::V25::Services::AdGroupCriterionService::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "googleads.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, + ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the AdGroupCriterionService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `mutate_ad_group_criteria` + # @return [::Gapic::Config::Method] + # + attr_reader :mutate_ad_group_criteria + + # @private + def initialize parent_rpcs = nil + mutate_ad_group_criteria_config = parent_rpcs.mutate_ad_group_criteria if parent_rpcs.respond_to? :mutate_ad_group_criteria + @mutate_ad_group_criteria = ::Gapic::Config::Method.new mutate_ad_group_criteria_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/ad_group_criterion_service/credentials.rb b/lib/google/ads/google_ads/v25/services/ad_group_criterion_service/credentials.rb new file mode 100644 index 000000000..46865f214 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/ad_group_criterion_service/credentials.rb @@ -0,0 +1,38 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Ads + module GoogleAds + module V25 + module Services + module AdGroupCriterionService + # Credentials for the AdGroupCriterionService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/adwords" + ] + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/ad_group_criterion_service/paths.rb b/lib/google/ads/google_ads/v25/services/ad_group_criterion_service/paths.rb new file mode 100644 index 000000000..38a8bac7c --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/ad_group_criterion_service/paths.rb @@ -0,0 +1,137 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Ads + module GoogleAds + module V25 + module Services + module AdGroupCriterionService + # Path helper methods for the AdGroupCriterionService API. + module Paths + ## + # Create a fully-qualified AdGroup resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/adGroups/{ad_group_id}` + # + # @param customer_id [String] + # @param ad_group_id [String] + # + # @return [::String] + def ad_group_path customer_id:, ad_group_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/adGroups/#{ad_group_id}" + end + + ## + # Create a fully-qualified AdGroupCriterion resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/adGroupCriteria/{ad_group_id}~{criterion_id}` + # + # @param customer_id [String] + # @param ad_group_id [String] + # @param criterion_id [String] + # + # @return [::String] + def ad_group_criterion_path customer_id:, ad_group_id:, criterion_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + raise ::ArgumentError, "ad_group_id cannot contain /" if ad_group_id.to_s.include? "/" + + "customers/#{customer_id}/adGroupCriteria/#{ad_group_id}~#{criterion_id}" + end + + ## + # Create a fully-qualified AdGroupCriterionLabel resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/adGroupCriterionLabels/{ad_group_id}~{criterion_id}~{label_id}` + # + # @param customer_id [String] + # @param ad_group_id [String] + # @param criterion_id [String] + # @param label_id [String] + # + # @return [::String] + def ad_group_criterion_label_path customer_id:, ad_group_id:, criterion_id:, label_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + raise ::ArgumentError, "ad_group_id cannot contain /" if ad_group_id.to_s.include? "/" + raise ::ArgumentError, "criterion_id cannot contain /" if criterion_id.to_s.include? "/" + + "customers/#{customer_id}/adGroupCriterionLabels/#{ad_group_id}~#{criterion_id}~#{label_id}" + end + + ## + # Create a fully-qualified CombinedAudience resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/combinedAudiences/{combined_audience_id}` + # + # @param customer_id [String] + # @param combined_audience_id [String] + # + # @return [::String] + def combined_audience_path customer_id:, combined_audience_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/combinedAudiences/#{combined_audience_id}" + end + + ## + # Create a fully-qualified MobileAppCategoryConstant resource string. + # + # The resource will be in the following format: + # + # `mobileAppCategoryConstants/{mobile_app_category_id}` + # + # @param mobile_app_category_id [String] + # + # @return [::String] + def mobile_app_category_constant_path mobile_app_category_id: + "mobileAppCategoryConstants/#{mobile_app_category_id}" + end + + ## + # Create a fully-qualified TopicConstant resource string. + # + # The resource will be in the following format: + # + # `topicConstants/{topic_id}` + # + # @param topic_id [String] + # + # @return [::String] + def topic_constant_path topic_id: + "topicConstants/#{topic_id}" + end + + extend self + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/ad_group_criterion_service_pb.rb b/lib/google/ads/google_ads/v25/services/ad_group_criterion_service_pb.rb new file mode 100644 index 000000000..dc62d303b --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/ad_group_criterion_service_pb.rb @@ -0,0 +1,36 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/services/ad_group_criterion_service.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/common/policy_pb' +require 'google/ads/google_ads/v25/enums/response_content_type_pb' +require 'google/ads/google_ads/v25/resources/ad_group_criterion_pb' +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/field_mask_pb' +require 'google/rpc/status_pb' + + +descriptor_data = "\nBgoogle/ads/googleads/v25/services/ad_group_criterion_service.proto\x12!google.ads.googleads.v25.services\x1a,google/ads/googleads/v25/common/policy.proto\x1a:google/ads/googleads/v25/enums/response_content_type.proto\x1a;google/ads/googleads/v25/resources/ad_group_criterion.proto\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\x1a\x17google/rpc/status.proto\"\xab\x02\n\x1cMutateAdGroupCriteriaRequest\x12\x18\n\x0b\x63ustomer_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12U\n\noperations\x18\x02 \x03(\x0b\x32<.google.ads.googleads.v25.services.AdGroupCriterionOperationB\x03\xe0\x41\x02\x12\x17\n\x0fpartial_failure\x18\x03 \x01(\x08\x12\x15\n\rvalidate_only\x18\x04 \x01(\x08\x12j\n\x15response_content_type\x18\x05 \x01(\x0e\x32K.google.ads.googleads.v25.enums.ResponseContentTypeEnum.ResponseContentType\"\x86\x03\n\x19\x41\x64GroupCriterionOperation\x12/\n\x0bupdate_mask\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\x12Y\n\x1c\x65xempt_policy_violation_keys\x18\x05 \x03(\x0b\x32\x33.google.ads.googleads.v25.common.PolicyViolationKey\x12\x46\n\x06\x63reate\x18\x01 \x01(\x0b\x32\x34.google.ads.googleads.v25.resources.AdGroupCriterionH\x00\x12\x46\n\x06update\x18\x02 \x01(\x0b\x32\x34.google.ads.googleads.v25.resources.AdGroupCriterionH\x00\x12@\n\x06remove\x18\x03 \x01(\tB.\xfa\x41+\n)googleads.googleapis.com/AdGroupCriterionH\x00\x42\x0b\n\toperation\"\xa4\x01\n\x1dMutateAdGroupCriteriaResponse\x12\x31\n\x15partial_failure_error\x18\x03 \x01(\x0b\x32\x12.google.rpc.Status\x12P\n\x07results\x18\x02 \x03(\x0b\x32?.google.ads.googleads.v25.services.MutateAdGroupCriterionResult\"\xb7\x01\n\x1cMutateAdGroupCriterionResult\x12\x45\n\rresource_name\x18\x01 \x01(\tB.\xfa\x41+\n)googleads.googleapis.com/AdGroupCriterion\x12P\n\x12\x61\x64_group_criterion\x18\x02 \x01(\x0b\x32\x34.google.ads.googleads.v25.resources.AdGroupCriterion2\xd8\x02\n\x17\x41\x64GroupCriterionService\x12\xf5\x01\n\x15MutateAdGroupCriteria\x12?.google.ads.googleads.v25.services.MutateAdGroupCriteriaRequest\x1a@.google.ads.googleads.v25.services.MutateAdGroupCriteriaResponse\"Y\xda\x41\x16\x63ustomer_id,operations\x82\xd3\xe4\x93\x02:\"5/v25/customers/{customer_id=*}/adGroupCriteria:mutate:\x01*\x1a\x45\xca\x41\x18googleads.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/adwordsB\x88\x02\n%com.google.ads.googleads.v25.servicesB\x1c\x41\x64GroupCriterionServiceProtoP\x01ZIgoogle.golang.org/genproto/googleapis/ads/googleads/v25/services;services\xa2\x02\x03GAA\xaa\x02!Google.Ads.GoogleAds.V25.Services\xca\x02!Google\\Ads\\GoogleAds\\V25\\Services\xea\x02%Google::Ads::GoogleAds::V25::Servicesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Services + MutateAdGroupCriteriaRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.MutateAdGroupCriteriaRequest").msgclass + AdGroupCriterionOperation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.AdGroupCriterionOperation").msgclass + MutateAdGroupCriteriaResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.MutateAdGroupCriteriaResponse").msgclass + MutateAdGroupCriterionResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.MutateAdGroupCriterionResult").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/ad_group_criterion_service_services_pb.rb b/lib/google/ads/google_ads/v25/services/ad_group_criterion_service_services_pb.rb new file mode 100644 index 000000000..1863bc0ff --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/ad_group_criterion_service_services_pb.rb @@ -0,0 +1,84 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/ads/googleads/v25/services/ad_group_criterion_service.proto for package 'Google.Ads.GoogleAds.V25.Services' +# Original file comments: +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +require 'grpc' +require 'google/ads/google_ads/v25/services/ad_group_criterion_service_pb' + +module Google + module Ads + module GoogleAds + module V25 + module Services + module AdGroupCriterionService + # Proto file describing the Ad Group Criterion service. + # + # Service to manage ad group criteria. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.ads.googleads.v25.services.AdGroupCriterionService' + + # Creates, updates, or removes criteria. Operation statuses are returned. + # + # List of thrown errors: + # [AdGroupCriterionError]() + # [AdxError]() + # [AuthenticationError]() + # [AuthorizationError]() + # [BiddingError]() + # [BiddingStrategyError]() + # [CollectionSizeError]() + # [ContextError]() + # [CriterionError]() + # [DatabaseError]() + # [DateError]() + # [DistinctError]() + # [FieldError]() + # [FieldMaskError]() + # [HeaderError]() + # [IdError]() + # [InternalError]() + # [MultiplierError]() + # [MutateError]() + # [NewResourceCreationError]() + # [NotEmptyError]() + # [NullError]() + # [OperationAccessDeniedError]() + # [OperatorError]() + # [PolicyViolationError]() + # [QuotaError]() + # [RangeError]() + # [RequestError]() + # [ResourceCountLimitExceededError]() + # [SizeLimitError]() + # [StringFormatError]() + # [StringLengthError]() + # [UrlFieldError]() + rpc :MutateAdGroupCriteria, ::Google::Ads::GoogleAds::V25::Services::MutateAdGroupCriteriaRequest, ::Google::Ads::GoogleAds::V25::Services::MutateAdGroupCriteriaResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/ad_group_customizer_service.rb b/lib/google/ads/google_ads/v25/services/ad_group_customizer_service.rb new file mode 100644 index 000000000..1f6f93ebd --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/ad_group_customizer_service.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/ads/google_ads/version" + +require "google/ads/google_ads/v25/services/ad_group_customizer_service/credentials" +require "google/ads/google_ads/v25/services/ad_group_customizer_service/paths" +require "google/ads/google_ads/v25/services/ad_group_customizer_service/client" + +module Google + module Ads + module GoogleAds + module V25 + module Services + ## + # Service to manage ad group customizer + # + # @example Load this service and instantiate a gRPC client + # + # require "google/ads/google_ads/v25/services/ad_group_customizer_service" + # client = ::Google::Ads::GoogleAds::V25::Services::AdGroupCustomizerService::Client.new + # + module AdGroupCustomizerService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "ad_group_customizer_service", "helpers.rb" +require "google/ads/google_ads/v25/services/ad_group_customizer_service/helpers" if ::File.file? helper_path diff --git a/lib/google/ads/google_ads/v25/services/ad_group_customizer_service/client.rb b/lib/google/ads/google_ads/v25/services/ad_group_customizer_service/client.rb new file mode 100644 index 000000000..8119d9ab2 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/ad_group_customizer_service/client.rb @@ -0,0 +1,494 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# require "google/ads/google_ads/error" +require "google/ads/google_ads/v25/services/ad_group_customizer_service_pb" + +module Google + module Ads + module GoogleAds + module V25 + module Services + module AdGroupCustomizerService + ## + # Client for the AdGroupCustomizerService service. + # + # Service to manage ad group customizer + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "googleads.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :ad_group_customizer_service_stub + + ## + # Configure the AdGroupCustomizerService Client class. + # + # See {::Google::Ads::GoogleAds::V25::Services::AdGroupCustomizerService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all AdGroupCustomizerService clients + # ::Google::Ads::GoogleAds::V25::Services::AdGroupCustomizerService::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + default_config = Client::Configuration.new + + default_config.timeout = 14_400.0 + default_config.retry_policy = { + initial_delay: 5.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the AdGroupCustomizerService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Ads::GoogleAds::V25::Services::AdGroupCustomizerService::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @ad_group_customizer_service_stub.universe_domain + end + + ## + # Create a new AdGroupCustomizerService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Ads::GoogleAds::V25::Services::AdGroupCustomizerService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Ads::GoogleAds::V25::Services::AdGroupCustomizerService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the AdGroupCustomizerService client. + # @yieldparam config [Client::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/ads/google_ads/v25/services/ad_group_customizer_service_services_pb" + + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @ad_group_customizer_service_stub = ::Gapic::ServiceStub.new( + ::Google::Ads::GoogleAds::V25::Services::AdGroupCustomizerService::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool, + logger: @config.logger + ) + + @ad_group_customizer_service_stub.stub_logger&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @ad_group_customizer_service_stub.logger + end + + # Service calls + + ## + # Creates, updates or removes ad group customizers. Operation statuses are + # returned. + # + # @overload mutate_ad_group_customizers(request, options = nil) + # Pass arguments to `mutate_ad_group_customizers` via a request object, either of type + # {::Google::Ads::GoogleAds::V25::Services::MutateAdGroupCustomizersRequest} or an equivalent Hash. + # + # @param request [::Google::Ads::GoogleAds::V25::Services::MutateAdGroupCustomizersRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload mutate_ad_group_customizers(customer_id: nil, operations: nil, partial_failure: nil, validate_only: nil, response_content_type: nil) + # Pass arguments to `mutate_ad_group_customizers` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param customer_id [::String] + # Required. The ID of the customer whose ad group customizers are being + # modified. + # @param operations [::Array<::Google::Ads::GoogleAds::V25::Services::AdGroupCustomizerOperation, ::Hash>] + # Required. The list of operations to perform on individual ad group + # customizers. + # @param partial_failure [::Boolean] + # 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. + # @param validate_only [::Boolean] + # If true, the request is validated but not executed. Only errors are + # returned, not results. + # @param response_content_type [::Google::Ads::GoogleAds::V25::Enums::ResponseContentTypeEnum::ResponseContentType] + # The response content type setting. Determines whether the mutable resource + # or just the resource name should be returned post mutation. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Ads::GoogleAds::V25::Services::MutateAdGroupCustomizersResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Ads::GoogleAds::V25::Services::MutateAdGroupCustomizersResponse] + # + # @raise [Google::Ads::GoogleAds::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/ads/google_ads/v25/services" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Ads::GoogleAds::V25::Services::AdGroupCustomizerService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Ads::GoogleAds::V25::Services::MutateAdGroupCustomizersRequest.new + # + # # Call the mutate_ad_group_customizers method. + # result = client.mutate_ad_group_customizers request + # + # # The returned object is of type Google::Ads::GoogleAds::V25::Services::MutateAdGroupCustomizersResponse. + # p result + # + def mutate_ad_group_customizers request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::GoogleAds::V25::Services::MutateAdGroupCustomizersRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.mutate_ad_group_customizers.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Ads::GoogleAds::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.customer_id + header_params["customer_id"] = request.customer_id + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.mutate_ad_group_customizers.timeout, + metadata: metadata, + retry_policy: @config.rpcs.mutate_ad_group_customizers.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @ad_group_customizer_service_stub.call_rpc :mutate_ad_group_customizers, request, + options: options do |response, operation| + yield response, operation if block_given? + end + # rescue GRPC::BadStatus => grpc_error + # raise Google::Ads::GoogleAds::Error.new grpc_error.message + end + + ## + # Configuration class for the AdGroupCustomizerService API. + # + # This class represents the configuration for AdGroupCustomizerService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Ads::GoogleAds::V25::Services::AdGroupCustomizerService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # mutate_ad_group_customizers to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Ads::GoogleAds::V25::Services::AdGroupCustomizerService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.mutate_ad_group_customizers.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Ads::GoogleAds::V25::Services::AdGroupCustomizerService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.mutate_ad_group_customizers.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Ads::GoogleAds::V25::Services::AdGroupCustomizerService::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "googleads.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, + ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the AdGroupCustomizerService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `mutate_ad_group_customizers` + # @return [::Gapic::Config::Method] + # + attr_reader :mutate_ad_group_customizers + + # @private + def initialize parent_rpcs = nil + mutate_ad_group_customizers_config = parent_rpcs.mutate_ad_group_customizers if parent_rpcs.respond_to? :mutate_ad_group_customizers + @mutate_ad_group_customizers = ::Gapic::Config::Method.new mutate_ad_group_customizers_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/ad_group_customizer_service/credentials.rb b/lib/google/ads/google_ads/v25/services/ad_group_customizer_service/credentials.rb new file mode 100644 index 000000000..498406a27 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/ad_group_customizer_service/credentials.rb @@ -0,0 +1,38 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Ads + module GoogleAds + module V25 + module Services + module AdGroupCustomizerService + # Credentials for the AdGroupCustomizerService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/adwords" + ] + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/ad_group_customizer_service/paths.rb b/lib/google/ads/google_ads/v25/services/ad_group_customizer_service/paths.rb new file mode 100644 index 000000000..556e792a1 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/ad_group_customizer_service/paths.rb @@ -0,0 +1,88 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Ads + module GoogleAds + module V25 + module Services + module AdGroupCustomizerService + # Path helper methods for the AdGroupCustomizerService API. + module Paths + ## + # Create a fully-qualified AdGroup resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/adGroups/{ad_group_id}` + # + # @param customer_id [String] + # @param ad_group_id [String] + # + # @return [::String] + def ad_group_path customer_id:, ad_group_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/adGroups/#{ad_group_id}" + end + + ## + # Create a fully-qualified AdGroupCustomizer resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/adGroupCustomizers/{ad_group_id}~{customizer_attribute_id}` + # + # @param customer_id [String] + # @param ad_group_id [String] + # @param customizer_attribute_id [String] + # + # @return [::String] + def ad_group_customizer_path customer_id:, ad_group_id:, customizer_attribute_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + raise ::ArgumentError, "ad_group_id cannot contain /" if ad_group_id.to_s.include? "/" + + "customers/#{customer_id}/adGroupCustomizers/#{ad_group_id}~#{customizer_attribute_id}" + end + + ## + # Create a fully-qualified CustomizerAttribute resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/customizerAttributes/{customizer_attribute_id}` + # + # @param customer_id [String] + # @param customizer_attribute_id [String] + # + # @return [::String] + def customizer_attribute_path customer_id:, customizer_attribute_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/customizerAttributes/#{customizer_attribute_id}" + end + + extend self + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/ad_group_customizer_service_pb.rb b/lib/google/ads/google_ads/v25/services/ad_group_customizer_service_pb.rb new file mode 100644 index 000000000..d189b202c --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/ad_group_customizer_service_pb.rb @@ -0,0 +1,34 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/services/ad_group_customizer_service.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/enums/response_content_type_pb' +require 'google/ads/google_ads/v25/resources/ad_group_customizer_pb' +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/rpc/status_pb' + + +descriptor_data = "\nCgoogle/ads/googleads/v25/services/ad_group_customizer_service.proto\x12!google.ads.googleads.v25.services\x1a:google/ads/googleads/v25/enums/response_content_type.proto\x1a] + # Required. The list of operations to perform on ad group labels. + # @param partial_failure [::Boolean] + # 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. + # @param validate_only [::Boolean] + # If true, the request is validated but not executed. Only errors are + # returned, not results. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Ads::GoogleAds::V25::Services::MutateAdGroupLabelsResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Ads::GoogleAds::V25::Services::MutateAdGroupLabelsResponse] + # + # @raise [Google::Ads::GoogleAds::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/ads/google_ads/v25/services" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Ads::GoogleAds::V25::Services::AdGroupLabelService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Ads::GoogleAds::V25::Services::MutateAdGroupLabelsRequest.new + # + # # Call the mutate_ad_group_labels method. + # result = client.mutate_ad_group_labels request + # + # # The returned object is of type Google::Ads::GoogleAds::V25::Services::MutateAdGroupLabelsResponse. + # p result + # + def mutate_ad_group_labels request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::GoogleAds::V25::Services::MutateAdGroupLabelsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.mutate_ad_group_labels.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Ads::GoogleAds::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.customer_id + header_params["customer_id"] = request.customer_id + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.mutate_ad_group_labels.timeout, + metadata: metadata, + retry_policy: @config.rpcs.mutate_ad_group_labels.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @ad_group_label_service_stub.call_rpc :mutate_ad_group_labels, request, + options: options do |response, operation| + yield response, operation if block_given? + end + # rescue GRPC::BadStatus => grpc_error + # raise Google::Ads::GoogleAds::Error.new grpc_error.message + end + + ## + # Configuration class for the AdGroupLabelService API. + # + # This class represents the configuration for AdGroupLabelService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Ads::GoogleAds::V25::Services::AdGroupLabelService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # mutate_ad_group_labels to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Ads::GoogleAds::V25::Services::AdGroupLabelService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.mutate_ad_group_labels.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Ads::GoogleAds::V25::Services::AdGroupLabelService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.mutate_ad_group_labels.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Ads::GoogleAds::V25::Services::AdGroupLabelService::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "googleads.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, + ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the AdGroupLabelService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `mutate_ad_group_labels` + # @return [::Gapic::Config::Method] + # + attr_reader :mutate_ad_group_labels + + # @private + def initialize parent_rpcs = nil + mutate_ad_group_labels_config = parent_rpcs.mutate_ad_group_labels if parent_rpcs.respond_to? :mutate_ad_group_labels + @mutate_ad_group_labels = ::Gapic::Config::Method.new mutate_ad_group_labels_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/ad_group_label_service/credentials.rb b/lib/google/ads/google_ads/v25/services/ad_group_label_service/credentials.rb new file mode 100644 index 000000000..0fe933383 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/ad_group_label_service/credentials.rb @@ -0,0 +1,38 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Ads + module GoogleAds + module V25 + module Services + module AdGroupLabelService + # Credentials for the AdGroupLabelService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/adwords" + ] + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/ad_group_label_service/paths.rb b/lib/google/ads/google_ads/v25/services/ad_group_label_service/paths.rb new file mode 100644 index 000000000..fcce93c42 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/ad_group_label_service/paths.rb @@ -0,0 +1,88 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Ads + module GoogleAds + module V25 + module Services + module AdGroupLabelService + # Path helper methods for the AdGroupLabelService API. + module Paths + ## + # Create a fully-qualified AdGroup resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/adGroups/{ad_group_id}` + # + # @param customer_id [String] + # @param ad_group_id [String] + # + # @return [::String] + def ad_group_path customer_id:, ad_group_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/adGroups/#{ad_group_id}" + end + + ## + # Create a fully-qualified AdGroupLabel resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/adGroupLabels/{ad_group_id}~{label_id}` + # + # @param customer_id [String] + # @param ad_group_id [String] + # @param label_id [String] + # + # @return [::String] + def ad_group_label_path customer_id:, ad_group_id:, label_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + raise ::ArgumentError, "ad_group_id cannot contain /" if ad_group_id.to_s.include? "/" + + "customers/#{customer_id}/adGroupLabels/#{ad_group_id}~#{label_id}" + end + + ## + # Create a fully-qualified Label resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/labels/{label_id}` + # + # @param customer_id [String] + # @param label_id [String] + # + # @return [::String] + def label_path customer_id:, label_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/labels/#{label_id}" + end + + extend self + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/ad_group_label_service_pb.rb b/lib/google/ads/google_ads/v25/services/ad_group_label_service_pb.rb new file mode 100644 index 000000000..9782d0c79 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/ad_group_label_service_pb.rb @@ -0,0 +1,33 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/services/ad_group_label_service.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/resources/ad_group_label_pb' +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/rpc/status_pb' + + +descriptor_data = "\n>google/ads/googleads/v25/services/ad_group_label_service.proto\x12!google.ads.googleads.v25.services\x1a\x37google/ads/googleads/v25/resources/ad_group_label.proto\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x17google/rpc/status.proto\"\xb9\x01\n\x1aMutateAdGroupLabelsRequest\x12\x18\n\x0b\x63ustomer_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12Q\n\noperations\x18\x02 \x03(\x0b\x32\x38.google.ads.googleads.v25.services.AdGroupLabelOperationB\x03\xe0\x41\x02\x12\x17\n\x0fpartial_failure\x18\x03 \x01(\x08\x12\x15\n\rvalidate_only\x18\x04 \x01(\x08\"\xa6\x01\n\x15\x41\x64GroupLabelOperation\x12\x42\n\x06\x63reate\x18\x01 \x01(\x0b\x32\x30.google.ads.googleads.v25.resources.AdGroupLabelH\x00\x12<\n\x06remove\x18\x02 \x01(\tB*\xfa\x41\'\n%googleads.googleapis.com/AdGroupLabelH\x00\x42\x0b\n\toperation\"\x9e\x01\n\x1bMutateAdGroupLabelsResponse\x12\x31\n\x15partial_failure_error\x18\x03 \x01(\x0b\x32\x12.google.rpc.Status\x12L\n\x07results\x18\x02 \x03(\x0b\x32;.google.ads.googleads.v25.services.MutateAdGroupLabelResult\"]\n\x18MutateAdGroupLabelResult\x12\x41\n\rresource_name\x18\x01 \x01(\tB*\xfa\x41\'\n%googleads.googleapis.com/AdGroupLabel2\xcc\x02\n\x13\x41\x64GroupLabelService\x12\xed\x01\n\x13MutateAdGroupLabels\x12=.google.ads.googleads.v25.services.MutateAdGroupLabelsRequest\x1a>.google.ads.googleads.v25.services.MutateAdGroupLabelsResponse\"W\xda\x41\x16\x63ustomer_id,operations\x82\xd3\xe4\x93\x02\x38\"3/v25/customers/{customer_id=*}/adGroupLabels:mutate:\x01*\x1a\x45\xca\x41\x18googleads.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/adwordsB\x84\x02\n%com.google.ads.googleads.v25.servicesB\x18\x41\x64GroupLabelServiceProtoP\x01ZIgoogle.golang.org/genproto/googleapis/ads/googleads/v25/services;services\xa2\x02\x03GAA\xaa\x02!Google.Ads.GoogleAds.V25.Services\xca\x02!Google\\Ads\\GoogleAds\\V25\\Services\xea\x02%Google::Ads::GoogleAds::V25::Servicesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Services + MutateAdGroupLabelsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.MutateAdGroupLabelsRequest").msgclass + AdGroupLabelOperation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.AdGroupLabelOperation").msgclass + MutateAdGroupLabelsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.MutateAdGroupLabelsResponse").msgclass + MutateAdGroupLabelResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.MutateAdGroupLabelResult").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/ad_group_label_service_services_pb.rb b/lib/google/ads/google_ads/v25/services/ad_group_label_service_services_pb.rb new file mode 100644 index 000000000..f4aebfd1b --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/ad_group_label_service_services_pb.rb @@ -0,0 +1,63 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/ads/googleads/v25/services/ad_group_label_service.proto for package 'Google.Ads.GoogleAds.V25.Services' +# Original file comments: +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +require 'grpc' +require 'google/ads/google_ads/v25/services/ad_group_label_service_pb' + +module Google + module Ads + module GoogleAds + module V25 + module Services + module AdGroupLabelService + # Proto file describing the Ad Group Label service. + # + # Service to manage labels on ad groups. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.ads.googleads.v25.services.AdGroupLabelService' + + # Creates and removes ad group labels. + # Operation statuses are returned. + # + # List of thrown errors: + # [AuthenticationError]() + # [AuthorizationError]() + # [DatabaseError]() + # [FieldError]() + # [HeaderError]() + # [InternalError]() + # [LabelError]() + # [MutateError]() + # [NewResourceCreationError]() + # [QuotaError]() + # [RequestError]() + rpc :MutateAdGroupLabels, ::Google::Ads::GoogleAds::V25::Services::MutateAdGroupLabelsRequest, ::Google::Ads::GoogleAds::V25::Services::MutateAdGroupLabelsResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/ad_group_service.rb b/lib/google/ads/google_ads/v25/services/ad_group_service.rb new file mode 100644 index 000000000..c40623c13 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/ad_group_service.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/ads/google_ads/version" + +require "google/ads/google_ads/v25/services/ad_group_service/credentials" +require "google/ads/google_ads/v25/services/ad_group_service/paths" +require "google/ads/google_ads/v25/services/ad_group_service/client" + +module Google + module Ads + module GoogleAds + module V25 + module Services + ## + # Service to manage ad groups. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/ads/google_ads/v25/services/ad_group_service" + # client = ::Google::Ads::GoogleAds::V25::Services::AdGroupService::Client.new + # + module AdGroupService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "ad_group_service", "helpers.rb" +require "google/ads/google_ads/v25/services/ad_group_service/helpers" if ::File.file? helper_path diff --git a/lib/google/ads/google_ads/v25/services/ad_group_service/client.rb b/lib/google/ads/google_ads/v25/services/ad_group_service/client.rb new file mode 100644 index 000000000..f9aae38ff --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/ad_group_service/client.rb @@ -0,0 +1,523 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# require "google/ads/google_ads/error" +require "google/ads/google_ads/v25/services/ad_group_service_pb" + +module Google + module Ads + module GoogleAds + module V25 + module Services + module AdGroupService + ## + # Client for the AdGroupService service. + # + # Service to manage ad groups. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "googleads.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :ad_group_service_stub + + ## + # Configure the AdGroupService Client class. + # + # See {::Google::Ads::GoogleAds::V25::Services::AdGroupService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all AdGroupService clients + # ::Google::Ads::GoogleAds::V25::Services::AdGroupService::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + default_config = Client::Configuration.new + + default_config.timeout = 14_400.0 + default_config.retry_policy = { + initial_delay: 5.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the AdGroupService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Ads::GoogleAds::V25::Services::AdGroupService::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @ad_group_service_stub.universe_domain + end + + ## + # Create a new AdGroupService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Ads::GoogleAds::V25::Services::AdGroupService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Ads::GoogleAds::V25::Services::AdGroupService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the AdGroupService client. + # @yieldparam config [Client::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/ads/google_ads/v25/services/ad_group_service_services_pb" + + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @ad_group_service_stub = ::Gapic::ServiceStub.new( + ::Google::Ads::GoogleAds::V25::Services::AdGroupService::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool, + logger: @config.logger + ) + + @ad_group_service_stub.stub_logger&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @ad_group_service_stub.logger + end + + # Service calls + + ## + # Creates, updates, or removes ad groups. Operation statuses are returned. + # + # List of thrown errors: + # [AdGroupError]() + # [AdxError]() + # [AuthenticationError]() + # [AuthorizationError]() + # [BiddingError]() + # [BiddingStrategyError]() + # [DatabaseError]() + # [DateError]() + # [DistinctError]() + # [FieldError]() + # [FieldMaskError]() + # [HeaderError]() + # [IdError]() + # [InternalError]() + # [ListOperationError]() + # [MultiplierError]() + # [MutateError]() + # [NewResourceCreationError]() + # [NotEmptyError]() + # [NullError]() + # [OperationAccessDeniedError]() + # [OperatorError]() + # [QuotaError]() + # [RangeError]() + # [RequestError]() + # [ResourceCountLimitExceededError]() + # [SettingError]() + # [SizeLimitError]() + # [StringFormatError]() + # [StringLengthError]() + # [UrlFieldError]() + # + # @overload mutate_ad_groups(request, options = nil) + # Pass arguments to `mutate_ad_groups` via a request object, either of type + # {::Google::Ads::GoogleAds::V25::Services::MutateAdGroupsRequest} or an equivalent Hash. + # + # @param request [::Google::Ads::GoogleAds::V25::Services::MutateAdGroupsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload mutate_ad_groups(customer_id: nil, operations: nil, partial_failure: nil, validate_only: nil, response_content_type: nil) + # Pass arguments to `mutate_ad_groups` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param customer_id [::String] + # Required. The ID of the customer whose ad groups are being modified. + # @param operations [::Array<::Google::Ads::GoogleAds::V25::Services::AdGroupOperation, ::Hash>] + # Required. The list of operations to perform on individual ad groups. + # @param partial_failure [::Boolean] + # 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. + # @param validate_only [::Boolean] + # If true, the request is validated but not executed. Only errors are + # returned, not results. + # @param response_content_type [::Google::Ads::GoogleAds::V25::Enums::ResponseContentTypeEnum::ResponseContentType] + # The response content type setting. Determines whether the mutable resource + # or just the resource name should be returned post mutation. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Ads::GoogleAds::V25::Services::MutateAdGroupsResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Ads::GoogleAds::V25::Services::MutateAdGroupsResponse] + # + # @raise [Google::Ads::GoogleAds::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/ads/google_ads/v25/services" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Ads::GoogleAds::V25::Services::AdGroupService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Ads::GoogleAds::V25::Services::MutateAdGroupsRequest.new + # + # # Call the mutate_ad_groups method. + # result = client.mutate_ad_groups request + # + # # The returned object is of type Google::Ads::GoogleAds::V25::Services::MutateAdGroupsResponse. + # p result + # + def mutate_ad_groups request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::GoogleAds::V25::Services::MutateAdGroupsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.mutate_ad_groups.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Ads::GoogleAds::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.customer_id + header_params["customer_id"] = request.customer_id + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.mutate_ad_groups.timeout, + metadata: metadata, + retry_policy: @config.rpcs.mutate_ad_groups.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @ad_group_service_stub.call_rpc :mutate_ad_groups, request, options: options do |response, operation| + yield response, operation if block_given? + end + # rescue GRPC::BadStatus => grpc_error + # raise Google::Ads::GoogleAds::Error.new grpc_error.message + end + + ## + # Configuration class for the AdGroupService API. + # + # This class represents the configuration for AdGroupService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Ads::GoogleAds::V25::Services::AdGroupService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # mutate_ad_groups to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Ads::GoogleAds::V25::Services::AdGroupService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.mutate_ad_groups.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Ads::GoogleAds::V25::Services::AdGroupService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.mutate_ad_groups.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Ads::GoogleAds::V25::Services::AdGroupService::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "googleads.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, + ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the AdGroupService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `mutate_ad_groups` + # @return [::Gapic::Config::Method] + # + attr_reader :mutate_ad_groups + + # @private + def initialize parent_rpcs = nil + mutate_ad_groups_config = parent_rpcs.mutate_ad_groups if parent_rpcs.respond_to? :mutate_ad_groups + @mutate_ad_groups = ::Gapic::Config::Method.new mutate_ad_groups_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/ad_group_service/credentials.rb b/lib/google/ads/google_ads/v25/services/ad_group_service/credentials.rb new file mode 100644 index 000000000..eae95c3d5 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/ad_group_service/credentials.rb @@ -0,0 +1,38 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Ads + module GoogleAds + module V25 + module Services + module AdGroupService + # Credentials for the AdGroupService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/adwords" + ] + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/ad_group_service/paths.rb b/lib/google/ads/google_ads/v25/services/ad_group_service/paths.rb new file mode 100644 index 000000000..128303e9c --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/ad_group_service/paths.rb @@ -0,0 +1,88 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Ads + module GoogleAds + module V25 + module Services + module AdGroupService + # Path helper methods for the AdGroupService API. + module Paths + ## + # Create a fully-qualified AdGroup resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/adGroups/{ad_group_id}` + # + # @param customer_id [String] + # @param ad_group_id [String] + # + # @return [::String] + def ad_group_path customer_id:, ad_group_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/adGroups/#{ad_group_id}" + end + + ## + # Create a fully-qualified AdGroupLabel resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/adGroupLabels/{ad_group_id}~{label_id}` + # + # @param customer_id [String] + # @param ad_group_id [String] + # @param label_id [String] + # + # @return [::String] + def ad_group_label_path customer_id:, ad_group_id:, label_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + raise ::ArgumentError, "ad_group_id cannot contain /" if ad_group_id.to_s.include? "/" + + "customers/#{customer_id}/adGroupLabels/#{ad_group_id}~#{label_id}" + end + + ## + # Create a fully-qualified Campaign resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/campaigns/{campaign_id}` + # + # @param customer_id [String] + # @param campaign_id [String] + # + # @return [::String] + def campaign_path customer_id:, campaign_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/campaigns/#{campaign_id}" + end + + extend self + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/ad_group_service_pb.rb b/lib/google/ads/google_ads/v25/services/ad_group_service_pb.rb new file mode 100644 index 000000000..8cd9c18e7 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/ad_group_service_pb.rb @@ -0,0 +1,35 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/services/ad_group_service.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/enums/response_content_type_pb' +require 'google/ads/google_ads/v25/resources/ad_group_pb' +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/field_mask_pb' +require 'google/rpc/status_pb' + + +descriptor_data = "\n8google/ads/googleads/v25/services/ad_group_service.proto\x12!google.ads.googleads.v25.services\x1a:google/ads/googleads/v25/enums/response_content_type.proto\x1a\x31google/ads/googleads/v25/resources/ad_group.proto\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\x1a\x17google/rpc/status.proto\"\x9b\x02\n\x15MutateAdGroupsRequest\x12\x18\n\x0b\x63ustomer_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12L\n\noperations\x18\x02 \x03(\x0b\x32\x33.google.ads.googleads.v25.services.AdGroupOperationB\x03\xe0\x41\x02\x12\x17\n\x0fpartial_failure\x18\x03 \x01(\x08\x12\x15\n\rvalidate_only\x18\x04 \x01(\x08\x12j\n\x15response_content_type\x18\x05 \x01(\x0e\x32K.google.ads.googleads.v25.enums.ResponseContentTypeEnum.ResponseContentType\"\x87\x02\n\x10\x41\x64GroupOperation\x12/\n\x0bupdate_mask\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\x12=\n\x06\x63reate\x18\x01 \x01(\x0b\x32+.google.ads.googleads.v25.resources.AdGroupH\x00\x12=\n\x06update\x18\x02 \x01(\x0b\x32+.google.ads.googleads.v25.resources.AdGroupH\x00\x12\x37\n\x06remove\x18\x03 \x01(\tB%\xfa\x41\"\n googleads.googleapis.com/AdGroupH\x00\x42\x0b\n\toperation\"\x94\x01\n\x16MutateAdGroupsResponse\x12\x31\n\x15partial_failure_error\x18\x03 \x01(\x0b\x32\x12.google.rpc.Status\x12G\n\x07results\x18\x02 \x03(\x0b\x32\x36.google.ads.googleads.v25.services.MutateAdGroupResult\"\x92\x01\n\x13MutateAdGroupResult\x12<\n\rresource_name\x18\x01 \x01(\tB%\xfa\x41\"\n googleads.googleapis.com/AdGroup\x12=\n\x08\x61\x64_group\x18\x02 \x01(\x0b\x32+.google.ads.googleads.v25.resources.AdGroup2\xb3\x02\n\x0e\x41\x64GroupService\x12\xd9\x01\n\x0eMutateAdGroups\x12\x38.google.ads.googleads.v25.services.MutateAdGroupsRequest\x1a\x39.google.ads.googleads.v25.services.MutateAdGroupsResponse\"R\xda\x41\x16\x63ustomer_id,operations\x82\xd3\xe4\x93\x02\x33\"./v25/customers/{customer_id=*}/adGroups:mutate:\x01*\x1a\x45\xca\x41\x18googleads.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/adwordsB\xff\x01\n%com.google.ads.googleads.v25.servicesB\x13\x41\x64GroupServiceProtoP\x01ZIgoogle.golang.org/genproto/googleapis/ads/googleads/v25/services;services\xa2\x02\x03GAA\xaa\x02!Google.Ads.GoogleAds.V25.Services\xca\x02!Google\\Ads\\GoogleAds\\V25\\Services\xea\x02%Google::Ads::GoogleAds::V25::Servicesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Services + MutateAdGroupsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.MutateAdGroupsRequest").msgclass + AdGroupOperation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.AdGroupOperation").msgclass + MutateAdGroupsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.MutateAdGroupsResponse").msgclass + MutateAdGroupResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.MutateAdGroupResult").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/ad_group_service_services_pb.rb b/lib/google/ads/google_ads/v25/services/ad_group_service_services_pb.rb new file mode 100644 index 000000000..0ffa41d89 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/ad_group_service_services_pb.rb @@ -0,0 +1,82 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/ads/googleads/v25/services/ad_group_service.proto for package 'Google.Ads.GoogleAds.V25.Services' +# Original file comments: +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +require 'grpc' +require 'google/ads/google_ads/v25/services/ad_group_service_pb' + +module Google + module Ads + module GoogleAds + module V25 + module Services + module AdGroupService + # Proto file describing the Ad Group service. + # + # Service to manage ad groups. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.ads.googleads.v25.services.AdGroupService' + + # Creates, updates, or removes ad groups. Operation statuses are returned. + # + # List of thrown errors: + # [AdGroupError]() + # [AdxError]() + # [AuthenticationError]() + # [AuthorizationError]() + # [BiddingError]() + # [BiddingStrategyError]() + # [DatabaseError]() + # [DateError]() + # [DistinctError]() + # [FieldError]() + # [FieldMaskError]() + # [HeaderError]() + # [IdError]() + # [InternalError]() + # [ListOperationError]() + # [MultiplierError]() + # [MutateError]() + # [NewResourceCreationError]() + # [NotEmptyError]() + # [NullError]() + # [OperationAccessDeniedError]() + # [OperatorError]() + # [QuotaError]() + # [RangeError]() + # [RequestError]() + # [ResourceCountLimitExceededError]() + # [SettingError]() + # [SizeLimitError]() + # [StringFormatError]() + # [StringLengthError]() + # [UrlFieldError]() + rpc :MutateAdGroups, ::Google::Ads::GoogleAds::V25::Services::MutateAdGroupsRequest, ::Google::Ads::GoogleAds::V25::Services::MutateAdGroupsResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/ad_parameter_service.rb b/lib/google/ads/google_ads/v25/services/ad_parameter_service.rb new file mode 100644 index 000000000..0d5ee6d61 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/ad_parameter_service.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/ads/google_ads/version" + +require "google/ads/google_ads/v25/services/ad_parameter_service/credentials" +require "google/ads/google_ads/v25/services/ad_parameter_service/paths" +require "google/ads/google_ads/v25/services/ad_parameter_service/client" + +module Google + module Ads + module GoogleAds + module V25 + module Services + ## + # Service to manage ad parameters. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/ads/google_ads/v25/services/ad_parameter_service" + # client = ::Google::Ads::GoogleAds::V25::Services::AdParameterService::Client.new + # + module AdParameterService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "ad_parameter_service", "helpers.rb" +require "google/ads/google_ads/v25/services/ad_parameter_service/helpers" if ::File.file? helper_path diff --git a/lib/google/ads/google_ads/v25/services/ad_parameter_service/client.rb b/lib/google/ads/google_ads/v25/services/ad_parameter_service/client.rb new file mode 100644 index 000000000..faf054ee2 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/ad_parameter_service/client.rb @@ -0,0 +1,506 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# require "google/ads/google_ads/error" +require "google/ads/google_ads/v25/services/ad_parameter_service_pb" + +module Google + module Ads + module GoogleAds + module V25 + module Services + module AdParameterService + ## + # Client for the AdParameterService service. + # + # Service to manage ad parameters. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "googleads.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :ad_parameter_service_stub + + ## + # Configure the AdParameterService Client class. + # + # See {::Google::Ads::GoogleAds::V25::Services::AdParameterService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all AdParameterService clients + # ::Google::Ads::GoogleAds::V25::Services::AdParameterService::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + default_config = Client::Configuration.new + + default_config.timeout = 14_400.0 + default_config.retry_policy = { + initial_delay: 5.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the AdParameterService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Ads::GoogleAds::V25::Services::AdParameterService::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @ad_parameter_service_stub.universe_domain + end + + ## + # Create a new AdParameterService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Ads::GoogleAds::V25::Services::AdParameterService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Ads::GoogleAds::V25::Services::AdParameterService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the AdParameterService client. + # @yieldparam config [Client::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/ads/google_ads/v25/services/ad_parameter_service_services_pb" + + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @ad_parameter_service_stub = ::Gapic::ServiceStub.new( + ::Google::Ads::GoogleAds::V25::Services::AdParameterService::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool, + logger: @config.logger + ) + + @ad_parameter_service_stub.stub_logger&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @ad_parameter_service_stub.logger + end + + # Service calls + + ## + # Creates, updates, or removes ad parameters. Operation statuses are + # returned. + # + # List of thrown errors: + # [AdParameterError]() + # [AuthenticationError]() + # [AuthorizationError]() + # [ContextError]() + # [DatabaseError]() + # [FieldError]() + # [FieldMaskError]() + # [HeaderError]() + # [InternalError]() + # [MutateError]() + # [QuotaError]() + # [RequestError]() + # + # @overload mutate_ad_parameters(request, options = nil) + # Pass arguments to `mutate_ad_parameters` via a request object, either of type + # {::Google::Ads::GoogleAds::V25::Services::MutateAdParametersRequest} or an equivalent Hash. + # + # @param request [::Google::Ads::GoogleAds::V25::Services::MutateAdParametersRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload mutate_ad_parameters(customer_id: nil, operations: nil, partial_failure: nil, validate_only: nil, response_content_type: nil) + # Pass arguments to `mutate_ad_parameters` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param customer_id [::String] + # Required. The ID of the customer whose ad parameters are being modified. + # @param operations [::Array<::Google::Ads::GoogleAds::V25::Services::AdParameterOperation, ::Hash>] + # Required. The list of operations to perform on individual ad parameters. + # @param partial_failure [::Boolean] + # 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. + # @param validate_only [::Boolean] + # If true, the request is validated but not executed. Only errors are + # returned, not results. + # @param response_content_type [::Google::Ads::GoogleAds::V25::Enums::ResponseContentTypeEnum::ResponseContentType] + # The response content type setting. Determines whether the mutable resource + # or just the resource name should be returned post mutation. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Ads::GoogleAds::V25::Services::MutateAdParametersResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Ads::GoogleAds::V25::Services::MutateAdParametersResponse] + # + # @raise [Google::Ads::GoogleAds::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/ads/google_ads/v25/services" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Ads::GoogleAds::V25::Services::AdParameterService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Ads::GoogleAds::V25::Services::MutateAdParametersRequest.new + # + # # Call the mutate_ad_parameters method. + # result = client.mutate_ad_parameters request + # + # # The returned object is of type Google::Ads::GoogleAds::V25::Services::MutateAdParametersResponse. + # p result + # + def mutate_ad_parameters request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::GoogleAds::V25::Services::MutateAdParametersRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.mutate_ad_parameters.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Ads::GoogleAds::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.customer_id + header_params["customer_id"] = request.customer_id + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.mutate_ad_parameters.timeout, + metadata: metadata, + retry_policy: @config.rpcs.mutate_ad_parameters.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @ad_parameter_service_stub.call_rpc :mutate_ad_parameters, request, + options: options do |response, operation| + yield response, operation if block_given? + end + # rescue GRPC::BadStatus => grpc_error + # raise Google::Ads::GoogleAds::Error.new grpc_error.message + end + + ## + # Configuration class for the AdParameterService API. + # + # This class represents the configuration for AdParameterService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Ads::GoogleAds::V25::Services::AdParameterService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # mutate_ad_parameters to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Ads::GoogleAds::V25::Services::AdParameterService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.mutate_ad_parameters.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Ads::GoogleAds::V25::Services::AdParameterService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.mutate_ad_parameters.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Ads::GoogleAds::V25::Services::AdParameterService::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "googleads.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, + ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the AdParameterService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `mutate_ad_parameters` + # @return [::Gapic::Config::Method] + # + attr_reader :mutate_ad_parameters + + # @private + def initialize parent_rpcs = nil + mutate_ad_parameters_config = parent_rpcs.mutate_ad_parameters if parent_rpcs.respond_to? :mutate_ad_parameters + @mutate_ad_parameters = ::Gapic::Config::Method.new mutate_ad_parameters_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/ad_parameter_service/credentials.rb b/lib/google/ads/google_ads/v25/services/ad_parameter_service/credentials.rb new file mode 100644 index 000000000..2c8a617ad --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/ad_parameter_service/credentials.rb @@ -0,0 +1,38 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Ads + module GoogleAds + module V25 + module Services + module AdParameterService + # Credentials for the AdParameterService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/adwords" + ] + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/ad_parameter_service/paths.rb b/lib/google/ads/google_ads/v25/services/ad_parameter_service/paths.rb new file mode 100644 index 000000000..5eb7d1c98 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/ad_parameter_service/paths.rb @@ -0,0 +1,75 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Ads + module GoogleAds + module V25 + module Services + module AdParameterService + # Path helper methods for the AdParameterService API. + module Paths + ## + # Create a fully-qualified AdGroupCriterion resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/adGroupCriteria/{ad_group_id}~{criterion_id}` + # + # @param customer_id [String] + # @param ad_group_id [String] + # @param criterion_id [String] + # + # @return [::String] + def ad_group_criterion_path customer_id:, ad_group_id:, criterion_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + raise ::ArgumentError, "ad_group_id cannot contain /" if ad_group_id.to_s.include? "/" + + "customers/#{customer_id}/adGroupCriteria/#{ad_group_id}~#{criterion_id}" + end + + ## + # Create a fully-qualified AdParameter resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/adParameters/{ad_group_id}~{criterion_id}~{parameter_index}` + # + # @param customer_id [String] + # @param ad_group_id [String] + # @param criterion_id [String] + # @param parameter_index [String] + # + # @return [::String] + def ad_parameter_path customer_id:, ad_group_id:, criterion_id:, parameter_index: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + raise ::ArgumentError, "ad_group_id cannot contain /" if ad_group_id.to_s.include? "/" + raise ::ArgumentError, "criterion_id cannot contain /" if criterion_id.to_s.include? "/" + + "customers/#{customer_id}/adParameters/#{ad_group_id}~#{criterion_id}~#{parameter_index}" + end + + extend self + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/ad_parameter_service_pb.rb b/lib/google/ads/google_ads/v25/services/ad_parameter_service_pb.rb new file mode 100644 index 000000000..8e7a7170a --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/ad_parameter_service_pb.rb @@ -0,0 +1,35 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/services/ad_parameter_service.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/enums/response_content_type_pb' +require 'google/ads/google_ads/v25/resources/ad_parameter_pb' +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/field_mask_pb' +require 'google/rpc/status_pb' + + +descriptor_data = "\n] + # Required. The list of operations to perform on individual ads. + # @param partial_failure [::Boolean] + # 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. + # @param response_content_type [::Google::Ads::GoogleAds::V25::Enums::ResponseContentTypeEnum::ResponseContentType] + # The response content type setting. Determines whether the mutable resource + # or just the resource name should be returned post mutation. + # @param validate_only [::Boolean] + # If true, the request is validated but not executed. Only errors are + # returned, not results. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Ads::GoogleAds::V25::Services::MutateAdsResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Ads::GoogleAds::V25::Services::MutateAdsResponse] + # + # @raise [Google::Ads::GoogleAds::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/ads/google_ads/v25/services" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Ads::GoogleAds::V25::Services::AdService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Ads::GoogleAds::V25::Services::MutateAdsRequest.new + # + # # Call the mutate_ads method. + # result = client.mutate_ads request + # + # # The returned object is of type Google::Ads::GoogleAds::V25::Services::MutateAdsResponse. + # p result + # + def mutate_ads request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::GoogleAds::V25::Services::MutateAdsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.mutate_ads.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Ads::GoogleAds::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.customer_id + header_params["customer_id"] = request.customer_id + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.mutate_ads.timeout, + metadata: metadata, + retry_policy: @config.rpcs.mutate_ads.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @ad_service_stub.call_rpc :mutate_ads, request, options: options do |response, operation| + yield response, operation if block_given? + end + # rescue GRPC::BadStatus => grpc_error + # raise Google::Ads::GoogleAds::Error.new grpc_error.message + end + + ## + # Configuration class for the AdService API. + # + # This class represents the configuration for AdService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Ads::GoogleAds::V25::Services::AdService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # mutate_ads to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Ads::GoogleAds::V25::Services::AdService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.mutate_ads.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Ads::GoogleAds::V25::Services::AdService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.mutate_ads.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Ads::GoogleAds::V25::Services::AdService::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "googleads.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, + ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the AdService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `mutate_ads` + # @return [::Gapic::Config::Method] + # + attr_reader :mutate_ads + + # @private + def initialize parent_rpcs = nil + mutate_ads_config = parent_rpcs.mutate_ads if parent_rpcs.respond_to? :mutate_ads + @mutate_ads = ::Gapic::Config::Method.new mutate_ads_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/ad_service/credentials.rb b/lib/google/ads/google_ads/v25/services/ad_service/credentials.rb new file mode 100644 index 000000000..b7b857d05 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/ad_service/credentials.rb @@ -0,0 +1,38 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Ads + module GoogleAds + module V25 + module Services + module AdService + # Credentials for the AdService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/adwords" + ] + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/ad_service/paths.rb b/lib/google/ads/google_ads/v25/services/ad_service/paths.rb new file mode 100644 index 000000000..afcff803e --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/ad_service/paths.rb @@ -0,0 +1,52 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Ads + module GoogleAds + module V25 + module Services + module AdService + # Path helper methods for the AdService API. + module Paths + ## + # Create a fully-qualified Ad resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/ads/{ad_id}` + # + # @param customer_id [String] + # @param ad_id [String] + # + # @return [::String] + def ad_path customer_id:, ad_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/ads/#{ad_id}" + end + + extend self + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/ad_service_pb.rb b/lib/google/ads/google_ads/v25/services/ad_service_pb.rb new file mode 100644 index 000000000..dc958d514 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/ad_service_pb.rb @@ -0,0 +1,36 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/services/ad_service.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/common/policy_pb' +require 'google/ads/google_ads/v25/enums/response_content_type_pb' +require 'google/ads/google_ads/v25/resources/ad_pb' +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/field_mask_pb' +require 'google/rpc/status_pb' + + +descriptor_data = "\n2google/ads/googleads/v25/services/ad_service.proto\x12!google.ads.googleads.v25.services\x1a,google/ads/googleads/v25/common/policy.proto\x1a:google/ads/googleads/v25/enums/response_content_type.proto\x1a+google/ads/googleads/v25/resources/ad.proto\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\x1a\x17google/rpc/status.proto\"\x91\x02\n\x10MutateAdsRequest\x12\x18\n\x0b\x63ustomer_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12G\n\noperations\x18\x02 \x03(\x0b\x32..google.ads.googleads.v25.services.AdOperationB\x03\xe0\x41\x02\x12\x17\n\x0fpartial_failure\x18\x04 \x01(\x08\x12j\n\x15response_content_type\x18\x05 \x01(\x0e\x32K.google.ads.googleads.v25.enums.ResponseContentTypeEnum.ResponseContentType\x12\x15\n\rvalidate_only\x18\x03 \x01(\x08\"\xe6\x01\n\x0b\x41\x64Operation\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\x12_\n\x1bpolicy_validation_parameter\x18\x03 \x01(\x0b\x32:.google.ads.googleads.v25.common.PolicyValidationParameter\x12\x38\n\x06update\x18\x01 \x01(\x0b\x32&.google.ads.googleads.v25.resources.AdH\x00\x42\x0b\n\toperation\"\x8a\x01\n\x11MutateAdsResponse\x12\x31\n\x15partial_failure_error\x18\x03 \x01(\x0b\x32\x12.google.rpc.Status\x12\x42\n\x07results\x18\x02 \x03(\x0b\x32\x31.google.ads.googleads.v25.services.MutateAdResult\"}\n\x0eMutateAdResult\x12\x37\n\rresource_name\x18\x01 \x01(\tB \xfa\x41\x1d\n\x1bgoogleads.googleapis.com/Ad\x12\x32\n\x02\x61\x64\x18\x02 \x01(\x0b\x32&.google.ads.googleads.v25.resources.Ad2\x9a\x02\n\tAdService\x12\xc5\x01\n\tMutateAds\x12\x33.google.ads.googleads.v25.services.MutateAdsRequest\x1a\x34.google.ads.googleads.v25.services.MutateAdsResponse\"M\xda\x41\x16\x63ustomer_id,operations\x82\xd3\xe4\x93\x02.\")/v25/customers/{customer_id=*}/ads:mutate:\x01*\x1a\x45\xca\x41\x18googleads.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/adwordsB\xfa\x01\n%com.google.ads.googleads.v25.servicesB\x0e\x41\x64ServiceProtoP\x01ZIgoogle.golang.org/genproto/googleapis/ads/googleads/v25/services;services\xa2\x02\x03GAA\xaa\x02!Google.Ads.GoogleAds.V25.Services\xca\x02!Google\\Ads\\GoogleAds\\V25\\Services\xea\x02%Google::Ads::GoogleAds::V25::Servicesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Services + MutateAdsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.MutateAdsRequest").msgclass + AdOperation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.AdOperation").msgclass + MutateAdsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.MutateAdsResponse").msgclass + MutateAdResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.MutateAdResult").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/ad_service_services_pb.rb b/lib/google/ads/google_ads/v25/services/ad_service_services_pb.rb new file mode 100644 index 000000000..9d8df5fac --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/ad_service_services_pb.rb @@ -0,0 +1,90 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/ads/googleads/v25/services/ad_service.proto for package 'Google.Ads.GoogleAds.V25.Services' +# Original file comments: +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +require 'grpc' +require 'google/ads/google_ads/v25/services/ad_service_pb' + +module Google + module Ads + module GoogleAds + module V25 + module Services + module AdService + # Proto file describing the Ad service. + # + # Service to manage ads. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.ads.googleads.v25.services.AdService' + + # Updates ads. Operation statuses are returned. Updating ads is not supported + # for TextAd, ExpandedDynamicSearchAd, GmailAd and ImageAd. + # + # List of thrown errors: + # [AdCustomizerError]() + # [AdError]() + # [AdSharingError]() + # [AdxError]() + # [AssetError]() + # [AssetLinkError]() + # [AuthenticationError]() + # [AuthorizationError]() + # [CollectionSizeError]() + # [DatabaseError]() + # [DateError]() + # [DistinctError]() + # [FeedAttributeReferenceError]() + # [FieldError]() + # [FieldMaskError]() + # [FunctionError]() + # [FunctionParsingError]() + # [HeaderError]() + # [IdError]() + # [ImageError]() + # [InternalError]() + # [ListOperationError]() + # [MediaBundleError]() + # [MediaFileError]() + # [MutateError]() + # [NewResourceCreationError]() + # [NotEmptyError]() + # [NullError]() + # [OperatorError]() + # [PolicyFindingError]() + # [PolicyViolationError]() + # [QuotaError]() + # [RangeError]() + # [RequestError]() + # [SizeLimitError]() + # [StringFormatError]() + # [StringLengthError]() + # [UrlFieldError]() + rpc :MutateAds, ::Google::Ads::GoogleAds::V25::Services::MutateAdsRequest, ::Google::Ads::GoogleAds::V25::Services::MutateAdsResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/asset_generation_service.rb b/lib/google/ads/google_ads/v25/services/asset_generation_service.rb new file mode 100644 index 000000000..a2e615ee6 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/asset_generation_service.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/ads/google_ads/version" + +require "google/ads/google_ads/v25/services/asset_generation_service/credentials" +require "google/ads/google_ads/v25/services/asset_generation_service/paths" +require "google/ads/google_ads/v25/services/asset_generation_service/client" + +module Google + module Ads + module GoogleAds + module V25 + module Services + ## + # Service for generating new assets with generative AI. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/ads/google_ads/v25/services/asset_generation_service" + # client = ::Google::Ads::GoogleAds::V25::Services::AssetGenerationService::Client.new + # + module AssetGenerationService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "asset_generation_service", "helpers.rb" +require "google/ads/google_ads/v25/services/asset_generation_service/helpers" if ::File.file? helper_path diff --git a/lib/google/ads/google_ads/v25/services/asset_generation_service/client.rb b/lib/google/ads/google_ads/v25/services/asset_generation_service/client.rb new file mode 100644 index 000000000..147395eb4 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/asset_generation_service/client.rb @@ -0,0 +1,643 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# require "google/ads/google_ads/error" +require "google/ads/google_ads/v25/services/asset_generation_service_pb" + +module Google + module Ads + module GoogleAds + module V25 + module Services + module AssetGenerationService + ## + # Client for the AssetGenerationService service. + # + # Service for generating new assets with generative AI. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "googleads.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :asset_generation_service_stub + + ## + # Configure the AssetGenerationService Client class. + # + # See {::Google::Ads::GoogleAds::V25::Services::AssetGenerationService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all AssetGenerationService clients + # ::Google::Ads::GoogleAds::V25::Services::AssetGenerationService::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + default_config = Client::Configuration.new + + default_config.timeout = 14_400.0 + default_config.retry_policy = { + initial_delay: 5.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the AssetGenerationService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Ads::GoogleAds::V25::Services::AssetGenerationService::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @asset_generation_service_stub.universe_domain + end + + ## + # Create a new AssetGenerationService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Ads::GoogleAds::V25::Services::AssetGenerationService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Ads::GoogleAds::V25::Services::AssetGenerationService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the AssetGenerationService client. + # @yieldparam config [Client::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/ads/google_ads/v25/services/asset_generation_service_services_pb" + + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @asset_generation_service_stub = ::Gapic::ServiceStub.new( + ::Google::Ads::GoogleAds::V25::Services::AssetGenerationService::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool, + logger: @config.logger + ) + + @asset_generation_service_stub.stub_logger&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @asset_generation_service_stub.logger + end + + # Service calls + + ## + # Uses generative AI to generate text that can be used as assets in a + # campaign. + # + # List of thrown errors: + # [AuthenticationError]() + # [AuthorizationError]() + # [AssetGenerationError]() + # [HeaderError]() + # [InternalError]() + # [QuotaError]() + # [RequestError]() + # + # @overload generate_text(request, options = nil) + # Pass arguments to `generate_text` via a request object, either of type + # {::Google::Ads::GoogleAds::V25::Services::GenerateTextRequest} or an equivalent Hash. + # + # @param request [::Google::Ads::GoogleAds::V25::Services::GenerateTextRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload generate_text(customer_id: nil, asset_field_types: nil, final_url: nil, freeform_prompt: nil, keywords: nil, existing_generation_context: nil, advertising_channel_type: nil) + # Pass arguments to `generate_text` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param customer_id [::String] + # Required. The ID of the customer to generate assets for. Required. + # @param asset_field_types [::Array<::Google::Ads::GoogleAds::V25::Enums::AssetFieldTypeEnum::AssetFieldType>] + # Required. Which field types text is being generated for. Supported values + # are: HEADLINE, LONG_HEADLINE, DESCRIPTION. Required. + # @param final_url [::String] + # Optional. Final url to use as a source for generating assets. + # Required if existing_generation_context is not provided + # or does not have a final url associated with it. + # @param freeform_prompt [::String] + # Optional. A freeform description of what assets should be generated. + # The string length must be between 1 and 1500, inclusive. + # @param keywords [::Array<::String>] + # Optional. A freeform list of keywords that are relevant, + # used to inform asset generation. + # @param existing_generation_context [::Google::Ads::GoogleAds::V25::Services::AssetGenerationExistingContext, ::Hash] + # Optional. The setting for which assets are being generated, such as an + # existing AssetGroup or AdGroupAd. + # + # Note: The following parameters are mutually exclusive: `existing_generation_context`, `advertising_channel_type`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. + # @param advertising_channel_type [::Google::Ads::GoogleAds::V25::Enums::AdvertisingChannelTypeEnum::AdvertisingChannelType] + # Optional. The advertising channel for which to generate assets. Required + # if existing_context is not provided. + # + # Supported channel types: + # SEARCH, PERFORMANCE_MAX, DISPLAY, and DEMAND_GEN + # + # Note: The following parameters are mutually exclusive: `advertising_channel_type`, `existing_generation_context`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Ads::GoogleAds::V25::Services::GenerateTextResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Ads::GoogleAds::V25::Services::GenerateTextResponse] + # + # @raise [Google::Ads::GoogleAds::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/ads/google_ads/v25/services" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Ads::GoogleAds::V25::Services::AssetGenerationService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Ads::GoogleAds::V25::Services::GenerateTextRequest.new + # + # # Call the generate_text method. + # result = client.generate_text request + # + # # The returned object is of type Google::Ads::GoogleAds::V25::Services::GenerateTextResponse. + # p result + # + def generate_text request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::GoogleAds::V25::Services::GenerateTextRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.generate_text.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Ads::GoogleAds::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.customer_id + header_params["customer_id"] = request.customer_id + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.generate_text.timeout, + metadata: metadata, + retry_policy: @config.rpcs.generate_text.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @asset_generation_service_stub.call_rpc :generate_text, request, + options: options do |response, operation| + yield response, operation if block_given? + end + # rescue GRPC::BadStatus => grpc_error + # raise Google::Ads::GoogleAds::Error.new grpc_error.message + end + + ## + # Uses generative AI to generate images that can be used as assets in a + # campaign. + # + # List of thrown errors: + # [AuthenticationError]() + # [AuthorizationError]() + # [AssetGenerationError]() + # [HeaderError]() + # [InternalError]() + # [QuotaError]() + # [RequestError]() + # + # @overload generate_images(request, options = nil) + # Pass arguments to `generate_images` via a request object, either of type + # {::Google::Ads::GoogleAds::V25::Services::GenerateImagesRequest} or an equivalent Hash. + # + # @param request [::Google::Ads::GoogleAds::V25::Services::GenerateImagesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload generate_images(customer_id: nil, asset_field_types: nil, advertising_channel_type: nil, final_url_generation: nil, freeform_generation: nil, product_recontext_generation: nil) + # Pass arguments to `generate_images` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param customer_id [::String] + # Required. The ID of the customer for whom the images are being generated. + # Required. + # @param asset_field_types [::Array<::Google::Ads::GoogleAds::V25::Enums::AssetFieldTypeEnum::AssetFieldType>] + # Optional. Output field types for generated images. Supported values are + # MARKETING_IMAGE, SQUARE_MARKETING_IMAGE, PORTRAIT_MARKETING_IMAGE, and + # TALL_PORTRAIT_MARKETING_IMAGE. All specified field types must be + # compatible with the `advertising_channel_type` or + # `existing_generation_context` (whichever is set). If no field types are + # provided, images will be generated for all compatible field types. + # @param advertising_channel_type [::Google::Ads::GoogleAds::V25::Enums::AdvertisingChannelTypeEnum::AdvertisingChannelType] + # Optional. The advertising channel type for which the images are being + # generated. This field is required if `existing_generation_context` is not + # provided. Supported channel types include SEARCH, PERFORMANCE_MAX, + # DISPLAY, and DEMAND_GEN. + # @param final_url_generation [::Google::Ads::GoogleAds::V25::Services::FinalUrlImageGenerationInput, ::Hash] + # Optional. Generate images from a final url. + # + # Note: The following parameters are mutually exclusive: `final_url_generation`, `freeform_generation`, `product_recontext_generation`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. + # @param freeform_generation [::Google::Ads::GoogleAds::V25::Services::FreeformImageGenerationInput, ::Hash] + # Optional. Generate images from a freeform prompt. + # + # Note: The following parameters are mutually exclusive: `freeform_generation`, `final_url_generation`, `product_recontext_generation`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. + # @param product_recontext_generation [::Google::Ads::GoogleAds::V25::Services::ProductRecontextGenerationImageInput, ::Hash] + # Optional. Generate new images by recontextualizing existing product + # images. + # + # Note: The following parameters are mutually exclusive: `product_recontext_generation`, `final_url_generation`, `freeform_generation`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Ads::GoogleAds::V25::Services::GenerateImagesResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Ads::GoogleAds::V25::Services::GenerateImagesResponse] + # + # @raise [Google::Ads::GoogleAds::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/ads/google_ads/v25/services" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Ads::GoogleAds::V25::Services::AssetGenerationService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Ads::GoogleAds::V25::Services::GenerateImagesRequest.new + # + # # Call the generate_images method. + # result = client.generate_images request + # + # # The returned object is of type Google::Ads::GoogleAds::V25::Services::GenerateImagesResponse. + # p result + # + def generate_images request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::GoogleAds::V25::Services::GenerateImagesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.generate_images.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Ads::GoogleAds::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.customer_id + header_params["customer_id"] = request.customer_id + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.generate_images.timeout, + metadata: metadata, + retry_policy: @config.rpcs.generate_images.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @asset_generation_service_stub.call_rpc :generate_images, request, + options: options do |response, operation| + yield response, operation if block_given? + end + # rescue GRPC::BadStatus => grpc_error + # raise Google::Ads::GoogleAds::Error.new grpc_error.message + end + + ## + # Configuration class for the AssetGenerationService API. + # + # This class represents the configuration for AssetGenerationService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Ads::GoogleAds::V25::Services::AssetGenerationService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # generate_text to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Ads::GoogleAds::V25::Services::AssetGenerationService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.generate_text.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Ads::GoogleAds::V25::Services::AssetGenerationService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.generate_text.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Ads::GoogleAds::V25::Services::AssetGenerationService::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "googleads.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, + ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the AssetGenerationService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `generate_text` + # @return [::Gapic::Config::Method] + # + attr_reader :generate_text + ## + # RPC-specific configuration for `generate_images` + # @return [::Gapic::Config::Method] + # + attr_reader :generate_images + + # @private + def initialize parent_rpcs = nil + generate_text_config = parent_rpcs.generate_text if parent_rpcs.respond_to? :generate_text + @generate_text = ::Gapic::Config::Method.new generate_text_config + generate_images_config = parent_rpcs.generate_images if parent_rpcs.respond_to? :generate_images + @generate_images = ::Gapic::Config::Method.new generate_images_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/asset_generation_service/credentials.rb b/lib/google/ads/google_ads/v25/services/asset_generation_service/credentials.rb new file mode 100644 index 000000000..7f2792928 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/asset_generation_service/credentials.rb @@ -0,0 +1,38 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Ads + module GoogleAds + module V25 + module Services + module AssetGenerationService + # Credentials for the AssetGenerationService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/adwords" + ] + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/asset_generation_service/paths.rb b/lib/google/ads/google_ads/v25/services/asset_generation_service/paths.rb new file mode 100644 index 000000000..29bff87e2 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/asset_generation_service/paths.rb @@ -0,0 +1,71 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Ads + module GoogleAds + module V25 + module Services + module AssetGenerationService + # Path helper methods for the AssetGenerationService API. + module Paths + ## + # Create a fully-qualified AdGroupAd resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/adGroupAds/{ad_group_id}~{ad_id}` + # + # @param customer_id [String] + # @param ad_group_id [String] + # @param ad_id [String] + # + # @return [::String] + def ad_group_ad_path customer_id:, ad_group_id:, ad_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + raise ::ArgumentError, "ad_group_id cannot contain /" if ad_group_id.to_s.include? "/" + + "customers/#{customer_id}/adGroupAds/#{ad_group_id}~#{ad_id}" + end + + ## + # Create a fully-qualified AssetGroup resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/assetGroups/{asset_group_id}` + # + # @param customer_id [String] + # @param asset_group_id [String] + # + # @return [::String] + def asset_group_path customer_id:, asset_group_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/assetGroups/#{asset_group_id}" + end + + extend self + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/asset_generation_service_pb.rb b/lib/google/ads/google_ads/v25/services/asset_generation_service_pb.rb new file mode 100644 index 000000000..29d0f5f96 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/asset_generation_service_pb.rb @@ -0,0 +1,40 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/services/asset_generation_service.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/enums/advertising_channel_type_pb' +require 'google/ads/google_ads/v25/enums/asset_field_type_pb' +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' + + +descriptor_data = "\n@google/ads/googleads/v25/services/asset_generation_service.proto\x12!google.ads.googleads.v25.services\x1a=google/ads/googleads/v25/enums/advertising_channel_type.proto\x1a\x35google/ads/googleads/v25/enums/asset_field_type.proto\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\xd5\x03\n\x13GenerateTextRequest\x12\x18\n\x0b\x63ustomer_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x61\n\x11\x61sset_field_types\x18\x02 \x03(\x0e\x32\x41.google.ads.googleads.v25.enums.AssetFieldTypeEnum.AssetFieldTypeB\x03\xe0\x41\x02\x12\x16\n\tfinal_url\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x1c\n\x0f\x66reeform_prompt\x18\x06 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08keywords\x18\x07 \x03(\tB\x03\xe0\x41\x01\x12m\n\x1b\x65xisting_generation_context\x18\x03 \x01(\x0b\x32\x41.google.ads.googleads.v25.services.AssetGenerationExistingContextB\x03\xe0\x41\x01H\x00\x12z\n\x18\x61\x64vertising_channel_type\x18\x04 \x01(\x0e\x32Q.google.ads.googleads.v25.enums.AdvertisingChannelTypeEnum.AdvertisingChannelTypeB\x03\xe0\x41\x01H\x00\x42\t\n\x07\x63ontext\"`\n\x14GenerateTextResponse\x12H\n\x0egenerated_text\x18\x01 \x03(\x0b\x32\x30.google.ads.googleads.v25.services.GeneratedText\"z\n\rGeneratedText\x12\x0c\n\x04text\x18\x01 \x01(\t\x12[\n\x10\x61sset_field_type\x18\x02 \x01(\x0e\x32\x41.google.ads.googleads.v25.enums.AssetFieldTypeEnum.AssetFieldType\"\xef\x04\n\x15GenerateImagesRequest\x12\x18\n\x0b\x63ustomer_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x61\n\x11\x61sset_field_types\x18\x04 \x03(\x0e\x32\x41.google.ads.googleads.v25.enums.AssetFieldTypeEnum.AssetFieldTypeB\x03\xe0\x41\x01\x12z\n\x18\x61\x64vertising_channel_type\x18\x02 \x01(\x0e\x32Q.google.ads.googleads.v25.enums.AdvertisingChannelTypeEnum.AdvertisingChannelTypeB\x03\xe0\x41\x01H\x00\x12\x64\n\x14\x66inal_url_generation\x18\x05 \x01(\x0b\x32?.google.ads.googleads.v25.services.FinalUrlImageGenerationInputB\x03\xe0\x41\x01H\x01\x12\x63\n\x13\x66reeform_generation\x18\x06 \x01(\x0b\x32?.google.ads.googleads.v25.services.FreeformImageGenerationInputB\x03\xe0\x41\x01H\x01\x12t\n\x1cproduct_recontext_generation\x18\x07 \x01(\x0b\x32G.google.ads.googleads.v25.services.ProductRecontextGenerationImageInputB\x03\xe0\x41\x01H\x01\x42\t\n\x07\x63ontextB\x11\n\x0fgeneration_type\"6\n\x1c\x46inalUrlImageGenerationInput\x12\x16\n\tfinal_url\x18\x01 \x01(\tB\x03\xe0\x41\x02\"<\n\x1c\x46reeformImageGenerationInput\x12\x1c\n\x0f\x66reeform_prompt\x18\x01 \x01(\tB\x03\xe0\x41\x02\"\x87\x01\n$ProductRecontextGenerationImageInput\x12\x13\n\x06prompt\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12J\n\rsource_images\x18\x02 \x03(\x0b\x32..google.ads.googleads.v25.services.SourceImageB\x03\xe0\x41\x02\"e\n\x16GenerateImagesResponse\x12K\n\x10generated_images\x18\x01 \x03(\x0b\x32\x31.google.ads.googleads.v25.services.GeneratedImage\"1\n\x0bSourceImage\x12\x19\n\nimage_data\x18\x01 \x01(\x0c\x42\x03\xe0\x41\x01H\x00\x42\x07\n\x05image\"\x8a\x01\n\x0eGeneratedImage\x12\x1b\n\x13image_temporary_url\x18\x01 \x01(\t\x12[\n\x10\x61sset_field_type\x18\x02 \x01(\x0e\x32\x41.google.ads.googleads.v25.enums.AssetFieldTypeEnum.AssetFieldType\"\xc7\x01\n\x1e\x41ssetGenerationExistingContext\x12H\n\x14\x65xisting_asset_group\x18\x01 \x01(\tB(\xfa\x41%\n#googleads.googleapis.com/AssetGroupH\x00\x12G\n\x14\x65xisting_ad_group_ad\x18\x02 \x01(\tB\'\xfa\x41$\n\"googleads.googleapis.com/AdGroupAdH\x00\x42\x12\n\x10\x65xisting_context2\xfd\x03\n\x16\x41ssetGenerationService\x12\xc8\x01\n\x0cGenerateText\x12\x36.google.ads.googleads.v25.services.GenerateTextRequest\x1a\x37.google.ads.googleads.v25.services.GenerateTextResponse\"G\x82\xd3\xe4\x93\x02\x41\"/v25/customers/{customer_id=*}/assetGenerations:generateImages:\x01*\x1a\x45\xca\x41\x18googleads.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/adwordsB\x87\x02\n%com.google.ads.googleads.v25.servicesB\x1b\x41ssetGenerationServiceProtoP\x01ZIgoogle.golang.org/genproto/googleapis/ads/googleads/v25/services;services\xa2\x02\x03GAA\xaa\x02!Google.Ads.GoogleAds.V25.Services\xca\x02!Google\\Ads\\GoogleAds\\V25\\Services\xea\x02%Google::Ads::GoogleAds::V25::Servicesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Services + GenerateTextRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.GenerateTextRequest").msgclass + GenerateTextResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.GenerateTextResponse").msgclass + GeneratedText = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.GeneratedText").msgclass + GenerateImagesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.GenerateImagesRequest").msgclass + FinalUrlImageGenerationInput = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.FinalUrlImageGenerationInput").msgclass + FreeformImageGenerationInput = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.FreeformImageGenerationInput").msgclass + ProductRecontextGenerationImageInput = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.ProductRecontextGenerationImageInput").msgclass + GenerateImagesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.GenerateImagesResponse").msgclass + SourceImage = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.SourceImage").msgclass + GeneratedImage = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.GeneratedImage").msgclass + AssetGenerationExistingContext = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.AssetGenerationExistingContext").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/asset_generation_service_services_pb.rb b/lib/google/ads/google_ads/v25/services/asset_generation_service_services_pb.rb new file mode 100644 index 000000000..d50d4dcda --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/asset_generation_service_services_pb.rb @@ -0,0 +1,69 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/ads/googleads/v25/services/asset_generation_service.proto for package 'Google.Ads.GoogleAds.V25.Services' +# Original file comments: +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +require 'grpc' +require 'google/ads/google_ads/v25/services/asset_generation_service_pb' + +module Google + module Ads + module GoogleAds + module V25 + module Services + module AssetGenerationService + # Service for generating new assets with generative AI. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.ads.googleads.v25.services.AssetGenerationService' + + # Uses generative AI to generate text that can be used as assets in a + # campaign. + # + # List of thrown errors: + # [AuthenticationError]() + # [AuthorizationError]() + # [AssetGenerationError]() + # [HeaderError]() + # [InternalError]() + # [QuotaError]() + # [RequestError]() + rpc :GenerateText, ::Google::Ads::GoogleAds::V25::Services::GenerateTextRequest, ::Google::Ads::GoogleAds::V25::Services::GenerateTextResponse + # Uses generative AI to generate images that can be used as assets in a + # campaign. + # + # List of thrown errors: + # [AuthenticationError]() + # [AuthorizationError]() + # [AssetGenerationError]() + # [HeaderError]() + # [InternalError]() + # [QuotaError]() + # [RequestError]() + rpc :GenerateImages, ::Google::Ads::GoogleAds::V25::Services::GenerateImagesRequest, ::Google::Ads::GoogleAds::V25::Services::GenerateImagesResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/asset_group_asset_service.rb b/lib/google/ads/google_ads/v25/services/asset_group_asset_service.rb new file mode 100644 index 000000000..2611c6f70 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/asset_group_asset_service.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/ads/google_ads/version" + +require "google/ads/google_ads/v25/services/asset_group_asset_service/credentials" +require "google/ads/google_ads/v25/services/asset_group_asset_service/paths" +require "google/ads/google_ads/v25/services/asset_group_asset_service/client" + +module Google + module Ads + module GoogleAds + module V25 + module Services + ## + # Service to manage asset group asset. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/ads/google_ads/v25/services/asset_group_asset_service" + # client = ::Google::Ads::GoogleAds::V25::Services::AssetGroupAssetService::Client.new + # + module AssetGroupAssetService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "asset_group_asset_service", "helpers.rb" +require "google/ads/google_ads/v25/services/asset_group_asset_service/helpers" if ::File.file? helper_path diff --git a/lib/google/ads/google_ads/v25/services/asset_group_asset_service/client.rb b/lib/google/ads/google_ads/v25/services/asset_group_asset_service/client.rb new file mode 100644 index 000000000..3c1c81573 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/asset_group_asset_service/client.rb @@ -0,0 +1,491 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# require "google/ads/google_ads/error" +require "google/ads/google_ads/v25/services/asset_group_asset_service_pb" + +module Google + module Ads + module GoogleAds + module V25 + module Services + module AssetGroupAssetService + ## + # Client for the AssetGroupAssetService service. + # + # Service to manage asset group asset. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "googleads.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :asset_group_asset_service_stub + + ## + # Configure the AssetGroupAssetService Client class. + # + # See {::Google::Ads::GoogleAds::V25::Services::AssetGroupAssetService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all AssetGroupAssetService clients + # ::Google::Ads::GoogleAds::V25::Services::AssetGroupAssetService::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + default_config = Client::Configuration.new + + default_config.timeout = 14_400.0 + default_config.retry_policy = { + initial_delay: 5.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the AssetGroupAssetService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Ads::GoogleAds::V25::Services::AssetGroupAssetService::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @asset_group_asset_service_stub.universe_domain + end + + ## + # Create a new AssetGroupAssetService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Ads::GoogleAds::V25::Services::AssetGroupAssetService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Ads::GoogleAds::V25::Services::AssetGroupAssetService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the AssetGroupAssetService client. + # @yieldparam config [Client::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/ads/google_ads/v25/services/asset_group_asset_service_services_pb" + + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @asset_group_asset_service_stub = ::Gapic::ServiceStub.new( + ::Google::Ads::GoogleAds::V25::Services::AssetGroupAssetService::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool, + logger: @config.logger + ) + + @asset_group_asset_service_stub.stub_logger&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @asset_group_asset_service_stub.logger + end + + # Service calls + + ## + # Creates, updates or removes asset group assets. Operation statuses are + # returned. + # + # @overload mutate_asset_group_assets(request, options = nil) + # Pass arguments to `mutate_asset_group_assets` via a request object, either of type + # {::Google::Ads::GoogleAds::V25::Services::MutateAssetGroupAssetsRequest} or an equivalent Hash. + # + # @param request [::Google::Ads::GoogleAds::V25::Services::MutateAssetGroupAssetsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload mutate_asset_group_assets(customer_id: nil, operations: nil, partial_failure: nil, validate_only: nil) + # Pass arguments to `mutate_asset_group_assets` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param customer_id [::String] + # Required. The ID of the customer whose asset group assets are being + # modified. + # @param operations [::Array<::Google::Ads::GoogleAds::V25::Services::AssetGroupAssetOperation, ::Hash>] + # Required. The list of operations to perform on individual asset group + # assets. + # @param partial_failure [::Boolean] + # 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. + # @param validate_only [::Boolean] + # If true, the request is validated but not executed. Only errors are + # returned, not results. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Ads::GoogleAds::V25::Services::MutateAssetGroupAssetsResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Ads::GoogleAds::V25::Services::MutateAssetGroupAssetsResponse] + # + # @raise [Google::Ads::GoogleAds::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/ads/google_ads/v25/services" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Ads::GoogleAds::V25::Services::AssetGroupAssetService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Ads::GoogleAds::V25::Services::MutateAssetGroupAssetsRequest.new + # + # # Call the mutate_asset_group_assets method. + # result = client.mutate_asset_group_assets request + # + # # The returned object is of type Google::Ads::GoogleAds::V25::Services::MutateAssetGroupAssetsResponse. + # p result + # + def mutate_asset_group_assets request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::GoogleAds::V25::Services::MutateAssetGroupAssetsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.mutate_asset_group_assets.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Ads::GoogleAds::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.customer_id + header_params["customer_id"] = request.customer_id + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.mutate_asset_group_assets.timeout, + metadata: metadata, + retry_policy: @config.rpcs.mutate_asset_group_assets.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @asset_group_asset_service_stub.call_rpc :mutate_asset_group_assets, request, + options: options do |response, operation| + yield response, operation if block_given? + end + # rescue GRPC::BadStatus => grpc_error + # raise Google::Ads::GoogleAds::Error.new grpc_error.message + end + + ## + # Configuration class for the AssetGroupAssetService API. + # + # This class represents the configuration for AssetGroupAssetService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Ads::GoogleAds::V25::Services::AssetGroupAssetService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # mutate_asset_group_assets to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Ads::GoogleAds::V25::Services::AssetGroupAssetService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.mutate_asset_group_assets.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Ads::GoogleAds::V25::Services::AssetGroupAssetService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.mutate_asset_group_assets.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Ads::GoogleAds::V25::Services::AssetGroupAssetService::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "googleads.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, + ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the AssetGroupAssetService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `mutate_asset_group_assets` + # @return [::Gapic::Config::Method] + # + attr_reader :mutate_asset_group_assets + + # @private + def initialize parent_rpcs = nil + mutate_asset_group_assets_config = parent_rpcs.mutate_asset_group_assets if parent_rpcs.respond_to? :mutate_asset_group_assets + @mutate_asset_group_assets = ::Gapic::Config::Method.new mutate_asset_group_assets_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/asset_group_asset_service/credentials.rb b/lib/google/ads/google_ads/v25/services/asset_group_asset_service/credentials.rb new file mode 100644 index 000000000..3f9593289 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/asset_group_asset_service/credentials.rb @@ -0,0 +1,38 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Ads + module GoogleAds + module V25 + module Services + module AssetGroupAssetService + # Credentials for the AssetGroupAssetService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/adwords" + ] + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/asset_group_asset_service/paths.rb b/lib/google/ads/google_ads/v25/services/asset_group_asset_service/paths.rb new file mode 100644 index 000000000..ed5942f30 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/asset_group_asset_service/paths.rb @@ -0,0 +1,90 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Ads + module GoogleAds + module V25 + module Services + module AssetGroupAssetService + # Path helper methods for the AssetGroupAssetService API. + module Paths + ## + # Create a fully-qualified Asset resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/assets/{asset_id}` + # + # @param customer_id [String] + # @param asset_id [String] + # + # @return [::String] + def asset_path customer_id:, asset_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/assets/#{asset_id}" + end + + ## + # Create a fully-qualified AssetGroup resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/assetGroups/{asset_group_id}` + # + # @param customer_id [String] + # @param asset_group_id [String] + # + # @return [::String] + def asset_group_path customer_id:, asset_group_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/assetGroups/#{asset_group_id}" + end + + ## + # Create a fully-qualified AssetGroupAsset resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/assetGroupAssets/{asset_group_id}~{asset_id}~{field_type}` + # + # @param customer_id [String] + # @param asset_group_id [String] + # @param asset_id [String] + # @param field_type [String] + # + # @return [::String] + def asset_group_asset_path customer_id:, asset_group_id:, asset_id:, field_type: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + raise ::ArgumentError, "asset_group_id cannot contain /" if asset_group_id.to_s.include? "/" + raise ::ArgumentError, "asset_id cannot contain /" if asset_id.to_s.include? "/" + + "customers/#{customer_id}/assetGroupAssets/#{asset_group_id}~#{asset_id}~#{field_type}" + end + + extend self + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/asset_group_asset_service_pb.rb b/lib/google/ads/google_ads/v25/services/asset_group_asset_service_pb.rb new file mode 100644 index 000000000..7e380f50c --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/asset_group_asset_service_pb.rb @@ -0,0 +1,34 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/services/asset_group_asset_service.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/resources/asset_group_asset_pb' +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/field_mask_pb' +require 'google/rpc/status_pb' + + +descriptor_data = "\nAgoogle/ads/googleads/v25/services/asset_group_asset_service.proto\x12!google.ads.googleads.v25.services\x1a:google/ads/googleads/v25/resources/asset_group_asset.proto\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\x1a\x17google/rpc/status.proto\"\xbf\x01\n\x1dMutateAssetGroupAssetsRequest\x12\x18\n\x0b\x63ustomer_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12T\n\noperations\x18\x02 \x03(\x0b\x32;.google.ads.googleads.v25.services.AssetGroupAssetOperationB\x03\xe0\x41\x02\x12\x17\n\x0fpartial_failure\x18\x03 \x01(\x08\x12\x15\n\rvalidate_only\x18\x04 \x01(\x08\"\xa7\x02\n\x18\x41ssetGroupAssetOperation\x12/\n\x0bupdate_mask\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\x12\x45\n\x06\x63reate\x18\x01 \x01(\x0b\x32\x33.google.ads.googleads.v25.resources.AssetGroupAssetH\x00\x12\x45\n\x06update\x18\x02 \x01(\x0b\x32\x33.google.ads.googleads.v25.resources.AssetGroupAssetH\x00\x12?\n\x06remove\x18\x03 \x01(\tB-\xfa\x41*\n(googleads.googleapis.com/AssetGroupAssetH\x00\x42\x0b\n\toperation\"\xa4\x01\n\x1eMutateAssetGroupAssetsResponse\x12O\n\x07results\x18\x01 \x03(\x0b\x32>.google.ads.googleads.v25.services.MutateAssetGroupAssetResult\x12\x31\n\x15partial_failure_error\x18\x02 \x01(\x0b\x32\x12.google.rpc.Status\"c\n\x1bMutateAssetGroupAssetResult\x12\x44\n\rresource_name\x18\x01 \x01(\tB-\xfa\x41*\n(googleads.googleapis.com/AssetGroupAsset2\xdb\x02\n\x16\x41ssetGroupAssetService\x12\xf9\x01\n\x16MutateAssetGroupAssets\x12@.google.ads.googleads.v25.services.MutateAssetGroupAssetsRequest\x1a\x41.google.ads.googleads.v25.services.MutateAssetGroupAssetsResponse\"Z\xda\x41\x16\x63ustomer_id,operations\x82\xd3\xe4\x93\x02;\"6/v25/customers/{customer_id=*}/assetGroupAssets:mutate:\x01*\x1a\x45\xca\x41\x18googleads.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/adwordsB\x87\x02\n%com.google.ads.googleads.v25.servicesB\x1b\x41ssetGroupAssetServiceProtoP\x01ZIgoogle.golang.org/genproto/googleapis/ads/googleads/v25/services;services\xa2\x02\x03GAA\xaa\x02!Google.Ads.GoogleAds.V25.Services\xca\x02!Google\\Ads\\GoogleAds\\V25\\Services\xea\x02%Google::Ads::GoogleAds::V25::Servicesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Services + MutateAssetGroupAssetsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.MutateAssetGroupAssetsRequest").msgclass + AssetGroupAssetOperation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.AssetGroupAssetOperation").msgclass + MutateAssetGroupAssetsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.MutateAssetGroupAssetsResponse").msgclass + MutateAssetGroupAssetResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.MutateAssetGroupAssetResult").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/asset_group_asset_service_services_pb.rb b/lib/google/ads/google_ads/v25/services/asset_group_asset_service_services_pb.rb new file mode 100644 index 000000000..024aaf8e1 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/asset_group_asset_service_services_pb.rb @@ -0,0 +1,50 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/ads/googleads/v25/services/asset_group_asset_service.proto for package 'Google.Ads.GoogleAds.V25.Services' +# Original file comments: +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +require 'grpc' +require 'google/ads/google_ads/v25/services/asset_group_asset_service_pb' + +module Google + module Ads + module GoogleAds + module V25 + module Services + module AssetGroupAssetService + # Proto file describing the AssetGroupAsset service. + # + # Service to manage asset group asset. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.ads.googleads.v25.services.AssetGroupAssetService' + + # Creates, updates or removes asset group assets. Operation statuses are + # returned. + rpc :MutateAssetGroupAssets, ::Google::Ads::GoogleAds::V25::Services::MutateAssetGroupAssetsRequest, ::Google::Ads::GoogleAds::V25::Services::MutateAssetGroupAssetsResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/asset_group_listing_group_filter_service.rb b/lib/google/ads/google_ads/v25/services/asset_group_listing_group_filter_service.rb new file mode 100644 index 000000000..17dae45a2 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/asset_group_listing_group_filter_service.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/ads/google_ads/version" + +require "google/ads/google_ads/v25/services/asset_group_listing_group_filter_service/credentials" +require "google/ads/google_ads/v25/services/asset_group_listing_group_filter_service/paths" +require "google/ads/google_ads/v25/services/asset_group_listing_group_filter_service/client" + +module Google + module Ads + module GoogleAds + module V25 + module Services + ## + # Service to manage asset group listing group filter. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/ads/google_ads/v25/services/asset_group_listing_group_filter_service" + # client = ::Google::Ads::GoogleAds::V25::Services::AssetGroupListingGroupFilterService::Client.new + # + module AssetGroupListingGroupFilterService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "asset_group_listing_group_filter_service", "helpers.rb" +require "google/ads/google_ads/v25/services/asset_group_listing_group_filter_service/helpers" if ::File.file? helper_path diff --git a/lib/google/ads/google_ads/v25/services/asset_group_listing_group_filter_service/client.rb b/lib/google/ads/google_ads/v25/services/asset_group_listing_group_filter_service/client.rb new file mode 100644 index 000000000..949bb2f86 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/asset_group_listing_group_filter_service/client.rb @@ -0,0 +1,489 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# require "google/ads/google_ads/error" +require "google/ads/google_ads/v25/services/asset_group_listing_group_filter_service_pb" + +module Google + module Ads + module GoogleAds + module V25 + module Services + module AssetGroupListingGroupFilterService + ## + # Client for the AssetGroupListingGroupFilterService service. + # + # Service to manage asset group listing group filter. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "googleads.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :asset_group_listing_group_filter_service_stub + + ## + # Configure the AssetGroupListingGroupFilterService Client class. + # + # See {::Google::Ads::GoogleAds::V25::Services::AssetGroupListingGroupFilterService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all AssetGroupListingGroupFilterService clients + # ::Google::Ads::GoogleAds::V25::Services::AssetGroupListingGroupFilterService::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + default_config = Client::Configuration.new + + default_config.timeout = 14_400.0 + default_config.retry_policy = { + initial_delay: 5.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the AssetGroupListingGroupFilterService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Ads::GoogleAds::V25::Services::AssetGroupListingGroupFilterService::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @asset_group_listing_group_filter_service_stub.universe_domain + end + + ## + # Create a new AssetGroupListingGroupFilterService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Ads::GoogleAds::V25::Services::AssetGroupListingGroupFilterService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Ads::GoogleAds::V25::Services::AssetGroupListingGroupFilterService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the AssetGroupListingGroupFilterService client. + # @yieldparam config [Client::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/ads/google_ads/v25/services/asset_group_listing_group_filter_service_services_pb" + + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @asset_group_listing_group_filter_service_stub = ::Gapic::ServiceStub.new( + ::Google::Ads::GoogleAds::V25::Services::AssetGroupListingGroupFilterService::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool, + logger: @config.logger + ) + + @asset_group_listing_group_filter_service_stub.stub_logger&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @asset_group_listing_group_filter_service_stub.logger + end + + # Service calls + + ## + # Creates, updates or removes asset group listing group filters. Operation + # statuses are returned. + # + # @overload mutate_asset_group_listing_group_filters(request, options = nil) + # Pass arguments to `mutate_asset_group_listing_group_filters` via a request object, either of type + # {::Google::Ads::GoogleAds::V25::Services::MutateAssetGroupListingGroupFiltersRequest} or an equivalent Hash. + # + # @param request [::Google::Ads::GoogleAds::V25::Services::MutateAssetGroupListingGroupFiltersRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload mutate_asset_group_listing_group_filters(customer_id: nil, operations: nil, validate_only: nil, response_content_type: nil) + # Pass arguments to `mutate_asset_group_listing_group_filters` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param customer_id [::String] + # Required. The ID of the customer whose asset group listing group filters + # are being modified. + # @param operations [::Array<::Google::Ads::GoogleAds::V25::Services::AssetGroupListingGroupFilterOperation, ::Hash>] + # Required. The list of operations to perform on individual asset group + # listing group filters. + # @param validate_only [::Boolean] + # If true, the request is validated but not executed. Only errors are + # returned, not results. + # @param response_content_type [::Google::Ads::GoogleAds::V25::Enums::ResponseContentTypeEnum::ResponseContentType] + # The response content type setting. Determines whether the mutable resource + # or just the resource name should be returned post mutation. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Ads::GoogleAds::V25::Services::MutateAssetGroupListingGroupFiltersResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Ads::GoogleAds::V25::Services::MutateAssetGroupListingGroupFiltersResponse] + # + # @raise [Google::Ads::GoogleAds::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/ads/google_ads/v25/services" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Ads::GoogleAds::V25::Services::AssetGroupListingGroupFilterService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Ads::GoogleAds::V25::Services::MutateAssetGroupListingGroupFiltersRequest.new + # + # # Call the mutate_asset_group_listing_group_filters method. + # result = client.mutate_asset_group_listing_group_filters request + # + # # The returned object is of type Google::Ads::GoogleAds::V25::Services::MutateAssetGroupListingGroupFiltersResponse. + # p result + # + def mutate_asset_group_listing_group_filters request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::GoogleAds::V25::Services::MutateAssetGroupListingGroupFiltersRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.mutate_asset_group_listing_group_filters.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Ads::GoogleAds::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.customer_id + header_params["customer_id"] = request.customer_id + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.mutate_asset_group_listing_group_filters.timeout, + metadata: metadata, + retry_policy: @config.rpcs.mutate_asset_group_listing_group_filters.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @asset_group_listing_group_filter_service_stub.call_rpc :mutate_asset_group_listing_group_filters, + request, options: options do |response, operation| + yield response, operation if block_given? + end + # rescue GRPC::BadStatus => grpc_error + # raise Google::Ads::GoogleAds::Error.new grpc_error.message + end + + ## + # Configuration class for the AssetGroupListingGroupFilterService API. + # + # This class represents the configuration for AssetGroupListingGroupFilterService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Ads::GoogleAds::V25::Services::AssetGroupListingGroupFilterService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # mutate_asset_group_listing_group_filters to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Ads::GoogleAds::V25::Services::AssetGroupListingGroupFilterService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.mutate_asset_group_listing_group_filters.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Ads::GoogleAds::V25::Services::AssetGroupListingGroupFilterService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.mutate_asset_group_listing_group_filters.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Ads::GoogleAds::V25::Services::AssetGroupListingGroupFilterService::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "googleads.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, + ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the AssetGroupListingGroupFilterService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `mutate_asset_group_listing_group_filters` + # @return [::Gapic::Config::Method] + # + attr_reader :mutate_asset_group_listing_group_filters + + # @private + def initialize parent_rpcs = nil + mutate_asset_group_listing_group_filters_config = parent_rpcs.mutate_asset_group_listing_group_filters if parent_rpcs.respond_to? :mutate_asset_group_listing_group_filters + @mutate_asset_group_listing_group_filters = ::Gapic::Config::Method.new mutate_asset_group_listing_group_filters_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/asset_group_listing_group_filter_service/credentials.rb b/lib/google/ads/google_ads/v25/services/asset_group_listing_group_filter_service/credentials.rb new file mode 100644 index 000000000..2ad065c2a --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/asset_group_listing_group_filter_service/credentials.rb @@ -0,0 +1,38 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Ads + module GoogleAds + module V25 + module Services + module AssetGroupListingGroupFilterService + # Credentials for the AssetGroupListingGroupFilterService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/adwords" + ] + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/asset_group_listing_group_filter_service/paths.rb b/lib/google/ads/google_ads/v25/services/asset_group_listing_group_filter_service/paths.rb new file mode 100644 index 000000000..8bc1717e9 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/asset_group_listing_group_filter_service/paths.rb @@ -0,0 +1,88 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Ads + module GoogleAds + module V25 + module Services + module AssetGroupListingGroupFilterService + # Path helper methods for the AssetGroupListingGroupFilterService API. + module Paths + ## + # Create a fully-qualified AssetGroup resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/assetGroups/{asset_group_id}` + # + # @param customer_id [String] + # @param asset_group_id [String] + # + # @return [::String] + def asset_group_path customer_id:, asset_group_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/assetGroups/#{asset_group_id}" + end + + ## + # Create a fully-qualified AssetGroupListingGroupFilter resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/assetGroupListingGroupFilters/{asset_group_id}~{listing_group_filter_id}` + # + # @param customer_id [String] + # @param asset_group_id [String] + # @param listing_group_filter_id [String] + # + # @return [::String] + def asset_group_listing_group_filter_path customer_id:, asset_group_id:, listing_group_filter_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + raise ::ArgumentError, "asset_group_id cannot contain /" if asset_group_id.to_s.include? "/" + + "customers/#{customer_id}/assetGroupListingGroupFilters/#{asset_group_id}~#{listing_group_filter_id}" + end + + ## + # Create a fully-qualified SharedSet resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/sharedSets/{shared_set_id}` + # + # @param customer_id [String] + # @param shared_set_id [String] + # + # @return [::String] + def shared_set_path customer_id:, shared_set_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/sharedSets/#{shared_set_id}" + end + + extend self + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/asset_group_listing_group_filter_service_pb.rb b/lib/google/ads/google_ads/v25/services/asset_group_listing_group_filter_service_pb.rb new file mode 100644 index 000000000..e556c1326 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/asset_group_listing_group_filter_service_pb.rb @@ -0,0 +1,34 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/services/asset_group_listing_group_filter_service.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/enums/response_content_type_pb' +require 'google/ads/google_ads/v25/resources/asset_group_listing_group_filter_pb' +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/field_mask_pb' + + +descriptor_data = "\nPgoogle/ads/googleads/v25/services/asset_group_listing_group_filter_service.proto\x12!google.ads.googleads.v25.services\x1a:google/ads/googleads/v25/enums/response_content_type.proto\x1aIgoogle/ads/googleads/v25/resources/asset_group_listing_group_filter.proto\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\"\xac\x02\n*MutateAssetGroupListingGroupFiltersRequest\x12\x18\n\x0b\x63ustomer_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x61\n\noperations\x18\x02 \x03(\x0b\x32H.google.ads.googleads.v25.services.AssetGroupListingGroupFilterOperationB\x03\xe0\x41\x02\x12\x15\n\rvalidate_only\x18\x03 \x01(\x08\x12j\n\x15response_content_type\x18\x04 \x01(\x0e\x32K.google.ads.googleads.v25.enums.ResponseContentTypeEnum.ResponseContentType\"\xdb\x02\n%AssetGroupListingGroupFilterOperation\x12/\n\x0bupdate_mask\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\x12R\n\x06\x63reate\x18\x01 \x01(\x0b\x32@.google.ads.googleads.v25.resources.AssetGroupListingGroupFilterH\x00\x12R\n\x06update\x18\x02 \x01(\x0b\x32@.google.ads.googleads.v25.resources.AssetGroupListingGroupFilterH\x00\x12L\n\x06remove\x18\x03 \x01(\tB:\xfa\x41\x37\n5googleads.googleapis.com/AssetGroupListingGroupFilterH\x00\x42\x0b\n\toperation\"\x8b\x01\n+MutateAssetGroupListingGroupFiltersResponse\x12\\\n\x07results\x18\x01 \x03(\x0b\x32K.google.ads.googleads.v25.services.MutateAssetGroupListingGroupFilterResult\"\xe9\x01\n(MutateAssetGroupListingGroupFilterResult\x12Q\n\rresource_name\x18\x01 \x01(\tB:\xfa\x41\x37\n5googleads.googleapis.com/AssetGroupListingGroupFilter\x12j\n asset_group_listing_group_filter\x18\x02 \x01(\x0b\x32@.google.ads.googleads.v25.resources.AssetGroupListingGroupFilter2\x9c\x03\n#AssetGroupListingGroupFilterService\x12\xad\x02\n#MutateAssetGroupListingGroupFilters\x12M.google.ads.googleads.v25.services.MutateAssetGroupListingGroupFiltersRequest\x1aN.google.ads.googleads.v25.services.MutateAssetGroupListingGroupFiltersResponse\"g\xda\x41\x16\x63ustomer_id,operations\x82\xd3\xe4\x93\x02H\"C/v25/customers/{customer_id=*}/assetGroupListingGroupFilters:mutate:\x01*\x1a\x45\xca\x41\x18googleads.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/adwordsB\x94\x02\n%com.google.ads.googleads.v25.servicesB(AssetGroupListingGroupFilterServiceProtoP\x01ZIgoogle.golang.org/genproto/googleapis/ads/googleads/v25/services;services\xa2\x02\x03GAA\xaa\x02!Google.Ads.GoogleAds.V25.Services\xca\x02!Google\\Ads\\GoogleAds\\V25\\Services\xea\x02%Google::Ads::GoogleAds::V25::Servicesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Services + MutateAssetGroupListingGroupFiltersRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.MutateAssetGroupListingGroupFiltersRequest").msgclass + AssetGroupListingGroupFilterOperation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.AssetGroupListingGroupFilterOperation").msgclass + MutateAssetGroupListingGroupFiltersResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.MutateAssetGroupListingGroupFiltersResponse").msgclass + MutateAssetGroupListingGroupFilterResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.MutateAssetGroupListingGroupFilterResult").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/asset_group_listing_group_filter_service_services_pb.rb b/lib/google/ads/google_ads/v25/services/asset_group_listing_group_filter_service_services_pb.rb new file mode 100644 index 000000000..d55a46eb7 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/asset_group_listing_group_filter_service_services_pb.rb @@ -0,0 +1,50 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/ads/googleads/v25/services/asset_group_listing_group_filter_service.proto for package 'Google.Ads.GoogleAds.V25.Services' +# Original file comments: +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +require 'grpc' +require 'google/ads/google_ads/v25/services/asset_group_listing_group_filter_service_pb' + +module Google + module Ads + module GoogleAds + module V25 + module Services + module AssetGroupListingGroupFilterService + # Proto file describing the AssetGroupListingGroupFilter service. + # + # Service to manage asset group listing group filter. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.ads.googleads.v25.services.AssetGroupListingGroupFilterService' + + # Creates, updates or removes asset group listing group filters. Operation + # statuses are returned. + rpc :MutateAssetGroupListingGroupFilters, ::Google::Ads::GoogleAds::V25::Services::MutateAssetGroupListingGroupFiltersRequest, ::Google::Ads::GoogleAds::V25::Services::MutateAssetGroupListingGroupFiltersResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/asset_group_service.rb b/lib/google/ads/google_ads/v25/services/asset_group_service.rb new file mode 100644 index 000000000..a790878f7 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/asset_group_service.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/ads/google_ads/version" + +require "google/ads/google_ads/v25/services/asset_group_service/credentials" +require "google/ads/google_ads/v25/services/asset_group_service/paths" +require "google/ads/google_ads/v25/services/asset_group_service/client" + +module Google + module Ads + module GoogleAds + module V25 + module Services + ## + # Service to manage asset group + # + # @example Load this service and instantiate a gRPC client + # + # require "google/ads/google_ads/v25/services/asset_group_service" + # client = ::Google::Ads::GoogleAds::V25::Services::AssetGroupService::Client.new + # + module AssetGroupService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "asset_group_service", "helpers.rb" +require "google/ads/google_ads/v25/services/asset_group_service/helpers" if ::File.file? helper_path diff --git a/lib/google/ads/google_ads/v25/services/asset_group_service/client.rb b/lib/google/ads/google_ads/v25/services/asset_group_service/client.rb new file mode 100644 index 000000000..81796fdf1 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/asset_group_service/client.rb @@ -0,0 +1,484 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# require "google/ads/google_ads/error" +require "google/ads/google_ads/v25/services/asset_group_service_pb" + +module Google + module Ads + module GoogleAds + module V25 + module Services + module AssetGroupService + ## + # Client for the AssetGroupService service. + # + # Service to manage asset group + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "googleads.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :asset_group_service_stub + + ## + # Configure the AssetGroupService Client class. + # + # See {::Google::Ads::GoogleAds::V25::Services::AssetGroupService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all AssetGroupService clients + # ::Google::Ads::GoogleAds::V25::Services::AssetGroupService::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + default_config = Client::Configuration.new + + default_config.timeout = 14_400.0 + default_config.retry_policy = { + initial_delay: 5.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the AssetGroupService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Ads::GoogleAds::V25::Services::AssetGroupService::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @asset_group_service_stub.universe_domain + end + + ## + # Create a new AssetGroupService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Ads::GoogleAds::V25::Services::AssetGroupService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Ads::GoogleAds::V25::Services::AssetGroupService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the AssetGroupService client. + # @yieldparam config [Client::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/ads/google_ads/v25/services/asset_group_service_services_pb" + + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @asset_group_service_stub = ::Gapic::ServiceStub.new( + ::Google::Ads::GoogleAds::V25::Services::AssetGroupService::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool, + logger: @config.logger + ) + + @asset_group_service_stub.stub_logger&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @asset_group_service_stub.logger + end + + # Service calls + + ## + # Creates, updates or removes asset groups. Operation statuses are + # returned. + # + # @overload mutate_asset_groups(request, options = nil) + # Pass arguments to `mutate_asset_groups` via a request object, either of type + # {::Google::Ads::GoogleAds::V25::Services::MutateAssetGroupsRequest} or an equivalent Hash. + # + # @param request [::Google::Ads::GoogleAds::V25::Services::MutateAssetGroupsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload mutate_asset_groups(customer_id: nil, operations: nil, validate_only: nil) + # Pass arguments to `mutate_asset_groups` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param customer_id [::String] + # Required. The ID of the customer whose asset groups are being modified. + # @param operations [::Array<::Google::Ads::GoogleAds::V25::Services::AssetGroupOperation, ::Hash>] + # Required. The list of operations to perform on individual asset groups. + # @param validate_only [::Boolean] + # If true, the request is validated but not executed. Only errors are + # returned, not results. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Ads::GoogleAds::V25::Services::MutateAssetGroupsResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Ads::GoogleAds::V25::Services::MutateAssetGroupsResponse] + # + # @raise [Google::Ads::GoogleAds::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/ads/google_ads/v25/services" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Ads::GoogleAds::V25::Services::AssetGroupService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Ads::GoogleAds::V25::Services::MutateAssetGroupsRequest.new + # + # # Call the mutate_asset_groups method. + # result = client.mutate_asset_groups request + # + # # The returned object is of type Google::Ads::GoogleAds::V25::Services::MutateAssetGroupsResponse. + # p result + # + def mutate_asset_groups request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::GoogleAds::V25::Services::MutateAssetGroupsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.mutate_asset_groups.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Ads::GoogleAds::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.customer_id + header_params["customer_id"] = request.customer_id + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.mutate_asset_groups.timeout, + metadata: metadata, + retry_policy: @config.rpcs.mutate_asset_groups.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @asset_group_service_stub.call_rpc :mutate_asset_groups, request, + options: options do |response, operation| + yield response, operation if block_given? + end + # rescue GRPC::BadStatus => grpc_error + # raise Google::Ads::GoogleAds::Error.new grpc_error.message + end + + ## + # Configuration class for the AssetGroupService API. + # + # This class represents the configuration for AssetGroupService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Ads::GoogleAds::V25::Services::AssetGroupService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # mutate_asset_groups to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Ads::GoogleAds::V25::Services::AssetGroupService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.mutate_asset_groups.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Ads::GoogleAds::V25::Services::AssetGroupService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.mutate_asset_groups.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Ads::GoogleAds::V25::Services::AssetGroupService::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "googleads.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, + ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the AssetGroupService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `mutate_asset_groups` + # @return [::Gapic::Config::Method] + # + attr_reader :mutate_asset_groups + + # @private + def initialize parent_rpcs = nil + mutate_asset_groups_config = parent_rpcs.mutate_asset_groups if parent_rpcs.respond_to? :mutate_asset_groups + @mutate_asset_groups = ::Gapic::Config::Method.new mutate_asset_groups_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/asset_group_service/credentials.rb b/lib/google/ads/google_ads/v25/services/asset_group_service/credentials.rb new file mode 100644 index 000000000..7a71319b2 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/asset_group_service/credentials.rb @@ -0,0 +1,38 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Ads + module GoogleAds + module V25 + module Services + module AssetGroupService + # Credentials for the AssetGroupService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/adwords" + ] + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/asset_group_service/paths.rb b/lib/google/ads/google_ads/v25/services/asset_group_service/paths.rb new file mode 100644 index 000000000..3f0140067 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/asset_group_service/paths.rb @@ -0,0 +1,69 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Ads + module GoogleAds + module V25 + module Services + module AssetGroupService + # Path helper methods for the AssetGroupService API. + module Paths + ## + # Create a fully-qualified AssetGroup resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/assetGroups/{asset_group_id}` + # + # @param customer_id [String] + # @param asset_group_id [String] + # + # @return [::String] + def asset_group_path customer_id:, asset_group_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/assetGroups/#{asset_group_id}" + end + + ## + # Create a fully-qualified Campaign resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/campaigns/{campaign_id}` + # + # @param customer_id [String] + # @param campaign_id [String] + # + # @return [::String] + def campaign_path customer_id:, campaign_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/campaigns/#{campaign_id}" + end + + extend self + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/asset_group_service_pb.rb b/lib/google/ads/google_ads/v25/services/asset_group_service_pb.rb new file mode 100644 index 000000000..ea4ef7d94 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/asset_group_service_pb.rb @@ -0,0 +1,34 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/services/asset_group_service.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/resources/asset_group_pb' +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/field_mask_pb' +require 'google/rpc/status_pb' + + +descriptor_data = "\n;google/ads/googleads/v25/services/asset_group_service.proto\x12!google.ads.googleads.v25.services\x1a\x34google/ads/googleads/v25/resources/asset_group.proto\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\x1a\x17google/rpc/status.proto\"\x9c\x01\n\x18MutateAssetGroupsRequest\x12\x18\n\x0b\x63ustomer_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12O\n\noperations\x18\x02 \x03(\x0b\x32\x36.google.ads.googleads.v25.services.AssetGroupOperationB\x03\xe0\x41\x02\x12\x15\n\rvalidate_only\x18\x04 \x01(\x08\"\x93\x02\n\x13\x41ssetGroupOperation\x12/\n\x0bupdate_mask\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\x12@\n\x06\x63reate\x18\x01 \x01(\x0b\x32..google.ads.googleads.v25.resources.AssetGroupH\x00\x12@\n\x06update\x18\x02 \x01(\x0b\x32..google.ads.googleads.v25.resources.AssetGroupH\x00\x12:\n\x06remove\x18\x03 \x01(\tB(\xfa\x41%\n#googleads.googleapis.com/AssetGroupH\x00\x42\x0b\n\toperation\"\x9a\x01\n\x19MutateAssetGroupsResponse\x12J\n\x07results\x18\x01 \x03(\x0b\x32\x39.google.ads.googleads.v25.services.MutateAssetGroupResult\x12\x31\n\x15partial_failure_error\x18\x02 \x01(\x0b\x32\x12.google.rpc.Status\"Y\n\x16MutateAssetGroupResult\x12?\n\rresource_name\x18\x01 \x01(\tB(\xfa\x41%\n#googleads.googleapis.com/AssetGroup2\xc2\x02\n\x11\x41ssetGroupService\x12\xe5\x01\n\x11MutateAssetGroups\x12;.google.ads.googleads.v25.services.MutateAssetGroupsRequest\x1a<.google.ads.googleads.v25.services.MutateAssetGroupsResponse\"U\xda\x41\x16\x63ustomer_id,operations\x82\xd3\xe4\x93\x02\x36\"1/v25/customers/{customer_id=*}/assetGroups:mutate:\x01*\x1a\x45\xca\x41\x18googleads.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/adwordsB\x82\x02\n%com.google.ads.googleads.v25.servicesB\x16\x41ssetGroupServiceProtoP\x01ZIgoogle.golang.org/genproto/googleapis/ads/googleads/v25/services;services\xa2\x02\x03GAA\xaa\x02!Google.Ads.GoogleAds.V25.Services\xca\x02!Google\\Ads\\GoogleAds\\V25\\Services\xea\x02%Google::Ads::GoogleAds::V25::Servicesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Services + MutateAssetGroupsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.MutateAssetGroupsRequest").msgclass + AssetGroupOperation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.AssetGroupOperation").msgclass + MutateAssetGroupsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.MutateAssetGroupsResponse").msgclass + MutateAssetGroupResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.MutateAssetGroupResult").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/asset_group_service_services_pb.rb b/lib/google/ads/google_ads/v25/services/asset_group_service_services_pb.rb new file mode 100644 index 000000000..820e3c067 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/asset_group_service_services_pb.rb @@ -0,0 +1,50 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/ads/googleads/v25/services/asset_group_service.proto for package 'Google.Ads.GoogleAds.V25.Services' +# Original file comments: +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +require 'grpc' +require 'google/ads/google_ads/v25/services/asset_group_service_pb' + +module Google + module Ads + module GoogleAds + module V25 + module Services + module AssetGroupService + # Proto file describing the AssetGroup service. + # + # Service to manage asset group + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.ads.googleads.v25.services.AssetGroupService' + + # Creates, updates or removes asset groups. Operation statuses are + # returned. + rpc :MutateAssetGroups, ::Google::Ads::GoogleAds::V25::Services::MutateAssetGroupsRequest, ::Google::Ads::GoogleAds::V25::Services::MutateAssetGroupsResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/asset_group_signal_service.rb b/lib/google/ads/google_ads/v25/services/asset_group_signal_service.rb new file mode 100644 index 000000000..6342e303a --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/asset_group_signal_service.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/ads/google_ads/version" + +require "google/ads/google_ads/v25/services/asset_group_signal_service/credentials" +require "google/ads/google_ads/v25/services/asset_group_signal_service/paths" +require "google/ads/google_ads/v25/services/asset_group_signal_service/client" + +module Google + module Ads + module GoogleAds + module V25 + module Services + ## + # Service to manage asset group signal. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/ads/google_ads/v25/services/asset_group_signal_service" + # client = ::Google::Ads::GoogleAds::V25::Services::AssetGroupSignalService::Client.new + # + module AssetGroupSignalService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "asset_group_signal_service", "helpers.rb" +require "google/ads/google_ads/v25/services/asset_group_signal_service/helpers" if ::File.file? helper_path diff --git a/lib/google/ads/google_ads/v25/services/asset_group_signal_service/client.rb b/lib/google/ads/google_ads/v25/services/asset_group_signal_service/client.rb new file mode 100644 index 000000000..3fa989e8a --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/asset_group_signal_service/client.rb @@ -0,0 +1,493 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# require "google/ads/google_ads/error" +require "google/ads/google_ads/v25/services/asset_group_signal_service_pb" + +module Google + module Ads + module GoogleAds + module V25 + module Services + module AssetGroupSignalService + ## + # Client for the AssetGroupSignalService service. + # + # Service to manage asset group signal. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "googleads.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :asset_group_signal_service_stub + + ## + # Configure the AssetGroupSignalService Client class. + # + # See {::Google::Ads::GoogleAds::V25::Services::AssetGroupSignalService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all AssetGroupSignalService clients + # ::Google::Ads::GoogleAds::V25::Services::AssetGroupSignalService::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + default_config = Client::Configuration.new + + default_config.timeout = 14_400.0 + default_config.retry_policy = { + initial_delay: 5.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the AssetGroupSignalService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Ads::GoogleAds::V25::Services::AssetGroupSignalService::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @asset_group_signal_service_stub.universe_domain + end + + ## + # Create a new AssetGroupSignalService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Ads::GoogleAds::V25::Services::AssetGroupSignalService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Ads::GoogleAds::V25::Services::AssetGroupSignalService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the AssetGroupSignalService client. + # @yieldparam config [Client::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/ads/google_ads/v25/services/asset_group_signal_service_services_pb" + + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @asset_group_signal_service_stub = ::Gapic::ServiceStub.new( + ::Google::Ads::GoogleAds::V25::Services::AssetGroupSignalService::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool, + logger: @config.logger + ) + + @asset_group_signal_service_stub.stub_logger&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @asset_group_signal_service_stub.logger + end + + # Service calls + + ## + # Creates or removes asset group signals. Operation statuses are + # returned. + # + # @overload mutate_asset_group_signals(request, options = nil) + # Pass arguments to `mutate_asset_group_signals` via a request object, either of type + # {::Google::Ads::GoogleAds::V25::Services::MutateAssetGroupSignalsRequest} or an equivalent Hash. + # + # @param request [::Google::Ads::GoogleAds::V25::Services::MutateAssetGroupSignalsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload mutate_asset_group_signals(customer_id: nil, operations: nil, partial_failure: nil, validate_only: nil, response_content_type: nil) + # Pass arguments to `mutate_asset_group_signals` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param customer_id [::String] + # Required. The ID of the customer whose asset group signals are being + # modified. + # @param operations [::Array<::Google::Ads::GoogleAds::V25::Services::AssetGroupSignalOperation, ::Hash>] + # Required. The list of operations to perform on individual asset group + # signals. + # @param partial_failure [::Boolean] + # 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. + # @param validate_only [::Boolean] + # If true, the request is validated but not executed. Only errors are + # returned, not results. + # @param response_content_type [::Google::Ads::GoogleAds::V25::Enums::ResponseContentTypeEnum::ResponseContentType] + # The response content type setting. Determines whether the mutable resource + # or just the resource name should be returned post mutation. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Ads::GoogleAds::V25::Services::MutateAssetGroupSignalsResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Ads::GoogleAds::V25::Services::MutateAssetGroupSignalsResponse] + # + # @raise [Google::Ads::GoogleAds::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/ads/google_ads/v25/services" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Ads::GoogleAds::V25::Services::AssetGroupSignalService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Ads::GoogleAds::V25::Services::MutateAssetGroupSignalsRequest.new + # + # # Call the mutate_asset_group_signals method. + # result = client.mutate_asset_group_signals request + # + # # The returned object is of type Google::Ads::GoogleAds::V25::Services::MutateAssetGroupSignalsResponse. + # p result + # + def mutate_asset_group_signals request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::GoogleAds::V25::Services::MutateAssetGroupSignalsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.mutate_asset_group_signals.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Ads::GoogleAds::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.customer_id + header_params["customer_id"] = request.customer_id + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.mutate_asset_group_signals.timeout, + metadata: metadata, + retry_policy: @config.rpcs.mutate_asset_group_signals.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @asset_group_signal_service_stub.call_rpc :mutate_asset_group_signals, request, + options: options do |response, operation| + yield response, operation if block_given? + end + # rescue GRPC::BadStatus => grpc_error + # raise Google::Ads::GoogleAds::Error.new grpc_error.message + end + + ## + # Configuration class for the AssetGroupSignalService API. + # + # This class represents the configuration for AssetGroupSignalService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Ads::GoogleAds::V25::Services::AssetGroupSignalService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # mutate_asset_group_signals to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Ads::GoogleAds::V25::Services::AssetGroupSignalService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.mutate_asset_group_signals.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Ads::GoogleAds::V25::Services::AssetGroupSignalService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.mutate_asset_group_signals.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Ads::GoogleAds::V25::Services::AssetGroupSignalService::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "googleads.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, + ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the AssetGroupSignalService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `mutate_asset_group_signals` + # @return [::Gapic::Config::Method] + # + attr_reader :mutate_asset_group_signals + + # @private + def initialize parent_rpcs = nil + mutate_asset_group_signals_config = parent_rpcs.mutate_asset_group_signals if parent_rpcs.respond_to? :mutate_asset_group_signals + @mutate_asset_group_signals = ::Gapic::Config::Method.new mutate_asset_group_signals_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/asset_group_signal_service/credentials.rb b/lib/google/ads/google_ads/v25/services/asset_group_signal_service/credentials.rb new file mode 100644 index 000000000..07d1bf210 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/asset_group_signal_service/credentials.rb @@ -0,0 +1,38 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Ads + module GoogleAds + module V25 + module Services + module AssetGroupSignalService + # Credentials for the AssetGroupSignalService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/adwords" + ] + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/asset_group_signal_service/paths.rb b/lib/google/ads/google_ads/v25/services/asset_group_signal_service/paths.rb new file mode 100644 index 000000000..3a7cbdd20 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/asset_group_signal_service/paths.rb @@ -0,0 +1,71 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Ads + module GoogleAds + module V25 + module Services + module AssetGroupSignalService + # Path helper methods for the AssetGroupSignalService API. + module Paths + ## + # Create a fully-qualified AssetGroup resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/assetGroups/{asset_group_id}` + # + # @param customer_id [String] + # @param asset_group_id [String] + # + # @return [::String] + def asset_group_path customer_id:, asset_group_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/assetGroups/#{asset_group_id}" + end + + ## + # Create a fully-qualified AssetGroupSignal resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/assetGroupSignals/{asset_group_id}~{criterion_id}` + # + # @param customer_id [String] + # @param asset_group_id [String] + # @param criterion_id [String] + # + # @return [::String] + def asset_group_signal_path customer_id:, asset_group_id:, criterion_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + raise ::ArgumentError, "asset_group_id cannot contain /" if asset_group_id.to_s.include? "/" + + "customers/#{customer_id}/assetGroupSignals/#{asset_group_id}~#{criterion_id}" + end + + extend self + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/asset_group_signal_service_pb.rb b/lib/google/ads/google_ads/v25/services/asset_group_signal_service_pb.rb new file mode 100644 index 000000000..4ad113c71 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/asset_group_signal_service_pb.rb @@ -0,0 +1,35 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/services/asset_group_signal_service.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/common/policy_pb' +require 'google/ads/google_ads/v25/enums/response_content_type_pb' +require 'google/ads/google_ads/v25/resources/asset_group_signal_pb' +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/rpc/status_pb' + + +descriptor_data = "\nBgoogle/ads/googleads/v25/services/asset_group_signal_service.proto\x12!google.ads.googleads.v25.services\x1a,google/ads/googleads/v25/common/policy.proto\x1a:google/ads/googleads/v25/enums/response_content_type.proto\x1a;google/ads/googleads/v25/resources/asset_group_signal.proto\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x17google/rpc/status.proto\"\xad\x02\n\x1eMutateAssetGroupSignalsRequest\x12\x18\n\x0b\x63ustomer_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12U\n\noperations\x18\x02 \x03(\x0b\x32<.google.ads.googleads.v25.services.AssetGroupSignalOperationB\x03\xe0\x41\x02\x12\x17\n\x0fpartial_failure\x18\x03 \x01(\x08\x12\x15\n\rvalidate_only\x18\x04 \x01(\x08\x12j\n\x15response_content_type\x18\x05 \x01(\x0e\x32K.google.ads.googleads.v25.enums.ResponseContentTypeEnum.ResponseContentType\"\x92\x02\n\x19\x41ssetGroupSignalOperation\x12^\n\x1c\x65xempt_policy_violation_keys\x18\x03 \x03(\x0b\x32\x33.google.ads.googleads.v25.common.PolicyViolationKeyB\x03\xe0\x41\x01\x12\x46\n\x06\x63reate\x18\x01 \x01(\x0b\x32\x34.google.ads.googleads.v25.resources.AssetGroupSignalH\x00\x12@\n\x06remove\x18\x02 \x01(\tB.\xfa\x41+\n)googleads.googleapis.com/AssetGroupSignalH\x00\x42\x0b\n\toperation\"\xa6\x01\n\x1fMutateAssetGroupSignalsResponse\x12P\n\x07results\x18\x01 \x03(\x0b\x32?.google.ads.googleads.v25.services.MutateAssetGroupSignalResult\x12\x31\n\x15partial_failure_error\x18\x02 \x01(\x0b\x32\x12.google.rpc.Status\"\xb7\x01\n\x1cMutateAssetGroupSignalResult\x12\x45\n\rresource_name\x18\x01 \x01(\tB.\xfa\x41+\n)googleads.googleapis.com/AssetGroupSignal\x12P\n\x12\x61sset_group_signal\x18\x02 \x01(\x0b\x32\x34.google.ads.googleads.v25.resources.AssetGroupSignal2\xe0\x02\n\x17\x41ssetGroupSignalService\x12\xfd\x01\n\x17MutateAssetGroupSignals\x12\x41.google.ads.googleads.v25.services.MutateAssetGroupSignalsRequest\x1a\x42.google.ads.googleads.v25.services.MutateAssetGroupSignalsResponse\"[\xda\x41\x16\x63ustomer_id,operations\x82\xd3\xe4\x93\x02<\"7/v25/customers/{customer_id=*}/assetGroupSignals:mutate:\x01*\x1a\x45\xca\x41\x18googleads.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/adwordsB\x88\x02\n%com.google.ads.googleads.v25.servicesB\x1c\x41ssetGroupSignalServiceProtoP\x01ZIgoogle.golang.org/genproto/googleapis/ads/googleads/v25/services;services\xa2\x02\x03GAA\xaa\x02!Google.Ads.GoogleAds.V25.Services\xca\x02!Google\\Ads\\GoogleAds\\V25\\Services\xea\x02%Google::Ads::GoogleAds::V25::Servicesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Services + MutateAssetGroupSignalsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.MutateAssetGroupSignalsRequest").msgclass + AssetGroupSignalOperation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.AssetGroupSignalOperation").msgclass + MutateAssetGroupSignalsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.MutateAssetGroupSignalsResponse").msgclass + MutateAssetGroupSignalResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.MutateAssetGroupSignalResult").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/asset_group_signal_service_services_pb.rb b/lib/google/ads/google_ads/v25/services/asset_group_signal_service_services_pb.rb new file mode 100644 index 000000000..0f4b55f25 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/asset_group_signal_service_services_pb.rb @@ -0,0 +1,50 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/ads/googleads/v25/services/asset_group_signal_service.proto for package 'Google.Ads.GoogleAds.V25.Services' +# Original file comments: +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +require 'grpc' +require 'google/ads/google_ads/v25/services/asset_group_signal_service_pb' + +module Google + module Ads + module GoogleAds + module V25 + module Services + module AssetGroupSignalService + # Proto file describing the AssetGroupSignal service. + # + # Service to manage asset group signal. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.ads.googleads.v25.services.AssetGroupSignalService' + + # Creates or removes asset group signals. Operation statuses are + # returned. + rpc :MutateAssetGroupSignals, ::Google::Ads::GoogleAds::V25::Services::MutateAssetGroupSignalsRequest, ::Google::Ads::GoogleAds::V25::Services::MutateAssetGroupSignalsResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/asset_service.rb b/lib/google/ads/google_ads/v25/services/asset_service.rb new file mode 100644 index 000000000..1650720db --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/asset_service.rb @@ -0,0 +1,53 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/ads/google_ads/version" + +require "google/ads/google_ads/v25/services/asset_service/credentials" +require "google/ads/google_ads/v25/services/asset_service/paths" +require "google/ads/google_ads/v25/services/asset_service/client" + +module Google + module Ads + module GoogleAds + module V25 + module Services + ## + # Service to manage assets. Asset types can be created with AssetService are + # YoutubeVideoAsset, MediaBundleAsset and ImageAsset. TextAsset should be + # created with Ad inline. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/ads/google_ads/v25/services/asset_service" + # client = ::Google::Ads::GoogleAds::V25::Services::AssetService::Client.new + # + module AssetService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "asset_service", "helpers.rb" +require "google/ads/google_ads/v25/services/asset_service/helpers" if ::File.file? helper_path diff --git a/lib/google/ads/google_ads/v25/services/asset_service/client.rb b/lib/google/ads/google_ads/v25/services/asset_service/client.rb new file mode 100644 index 000000000..cff00f7eb --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/asset_service/client.rb @@ -0,0 +1,521 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# require "google/ads/google_ads/error" +require "google/ads/google_ads/v25/services/asset_service_pb" + +module Google + module Ads + module GoogleAds + module V25 + module Services + module AssetService + ## + # Client for the AssetService service. + # + # Service to manage assets. Asset types can be created with AssetService are + # YoutubeVideoAsset, MediaBundleAsset and ImageAsset. TextAsset should be + # created with Ad inline. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "googleads.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :asset_service_stub + + ## + # Configure the AssetService Client class. + # + # See {::Google::Ads::GoogleAds::V25::Services::AssetService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all AssetService clients + # ::Google::Ads::GoogleAds::V25::Services::AssetService::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + default_config = Client::Configuration.new + + default_config.timeout = 14_400.0 + default_config.retry_policy = { + initial_delay: 5.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the AssetService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Ads::GoogleAds::V25::Services::AssetService::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @asset_service_stub.universe_domain + end + + ## + # Create a new AssetService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Ads::GoogleAds::V25::Services::AssetService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Ads::GoogleAds::V25::Services::AssetService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the AssetService client. + # @yieldparam config [Client::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/ads/google_ads/v25/services/asset_service_services_pb" + + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @asset_service_stub = ::Gapic::ServiceStub.new( + ::Google::Ads::GoogleAds::V25::Services::AssetService::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool, + logger: @config.logger + ) + + @asset_service_stub.stub_logger&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @asset_service_stub.logger + end + + # Service calls + + ## + # Creates assets. Operation statuses are returned. + # + # List of thrown errors: + # [AssetError]() + # [AuthenticationError]() + # [AuthorizationError]() + # [CollectionSizeError]() + # [CurrencyCodeError]() + # [DatabaseError]() + # [DateError]() + # [DistinctError]() + # [FieldError]() + # [FieldMaskError]() + # [HeaderError]() + # [IdError]() + # [InternalError]() + # [ListOperationError]() + # [MediaUploadError]() + # [MutateError]() + # [NotAllowlistedError]() + # [NotEmptyError]() + # [OperatorError]() + # [QuotaError]() + # [RangeError]() + # [RequestError]() + # [SizeLimitError]() + # [StringFormatError]() + # [StringLengthError]() + # [UrlFieldError]() + # [YoutubeVideoRegistrationError]() + # + # @overload mutate_assets(request, options = nil) + # Pass arguments to `mutate_assets` via a request object, either of type + # {::Google::Ads::GoogleAds::V25::Services::MutateAssetsRequest} or an equivalent Hash. + # + # @param request [::Google::Ads::GoogleAds::V25::Services::MutateAssetsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload mutate_assets(customer_id: nil, operations: nil, partial_failure: nil, response_content_type: nil, validate_only: nil) + # Pass arguments to `mutate_assets` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param customer_id [::String] + # Required. The ID of the customer whose assets are being modified. + # @param operations [::Array<::Google::Ads::GoogleAds::V25::Services::AssetOperation, ::Hash>] + # Required. The list of operations to perform on individual assets. + # @param partial_failure [::Boolean] + # 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. + # @param response_content_type [::Google::Ads::GoogleAds::V25::Enums::ResponseContentTypeEnum::ResponseContentType] + # The response content type setting. Determines whether the mutable resource + # or just the resource name should be returned post mutation. + # @param validate_only [::Boolean] + # If true, the request is validated but not executed. Only errors are + # returned, not results. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Ads::GoogleAds::V25::Services::MutateAssetsResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Ads::GoogleAds::V25::Services::MutateAssetsResponse] + # + # @raise [Google::Ads::GoogleAds::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/ads/google_ads/v25/services" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Ads::GoogleAds::V25::Services::AssetService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Ads::GoogleAds::V25::Services::MutateAssetsRequest.new + # + # # Call the mutate_assets method. + # result = client.mutate_assets request + # + # # The returned object is of type Google::Ads::GoogleAds::V25::Services::MutateAssetsResponse. + # p result + # + def mutate_assets request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::GoogleAds::V25::Services::MutateAssetsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.mutate_assets.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Ads::GoogleAds::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.customer_id + header_params["customer_id"] = request.customer_id + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.mutate_assets.timeout, + metadata: metadata, + retry_policy: @config.rpcs.mutate_assets.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @asset_service_stub.call_rpc :mutate_assets, request, options: options do |response, operation| + yield response, operation if block_given? + end + # rescue GRPC::BadStatus => grpc_error + # raise Google::Ads::GoogleAds::Error.new grpc_error.message + end + + ## + # Configuration class for the AssetService API. + # + # This class represents the configuration for AssetService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Ads::GoogleAds::V25::Services::AssetService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # mutate_assets to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Ads::GoogleAds::V25::Services::AssetService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.mutate_assets.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Ads::GoogleAds::V25::Services::AssetService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.mutate_assets.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Ads::GoogleAds::V25::Services::AssetService::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "googleads.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, + ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the AssetService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `mutate_assets` + # @return [::Gapic::Config::Method] + # + attr_reader :mutate_assets + + # @private + def initialize parent_rpcs = nil + mutate_assets_config = parent_rpcs.mutate_assets if parent_rpcs.respond_to? :mutate_assets + @mutate_assets = ::Gapic::Config::Method.new mutate_assets_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/asset_service/credentials.rb b/lib/google/ads/google_ads/v25/services/asset_service/credentials.rb new file mode 100644 index 000000000..b970c6d39 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/asset_service/credentials.rb @@ -0,0 +1,38 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Ads + module GoogleAds + module V25 + module Services + module AssetService + # Credentials for the AssetService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/adwords" + ] + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/asset_service/paths.rb b/lib/google/ads/google_ads/v25/services/asset_service/paths.rb new file mode 100644 index 000000000..54cb9afcf --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/asset_service/paths.rb @@ -0,0 +1,69 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Ads + module GoogleAds + module V25 + module Services + module AssetService + # Path helper methods for the AssetService API. + module Paths + ## + # Create a fully-qualified Asset resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/assets/{asset_id}` + # + # @param customer_id [String] + # @param asset_id [String] + # + # @return [::String] + def asset_path customer_id:, asset_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/assets/#{asset_id}" + end + + ## + # Create a fully-qualified ConversionAction resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/conversionActions/{conversion_action_id}` + # + # @param customer_id [String] + # @param conversion_action_id [String] + # + # @return [::String] + def conversion_action_path customer_id:, conversion_action_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/conversionActions/#{conversion_action_id}" + end + + extend self + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/asset_service_pb.rb b/lib/google/ads/google_ads/v25/services/asset_service_pb.rb new file mode 100644 index 000000000..d85ceab82 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/asset_service_pb.rb @@ -0,0 +1,35 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/services/asset_service.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/enums/response_content_type_pb' +require 'google/ads/google_ads/v25/resources/asset_pb' +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/field_mask_pb' +require 'google/rpc/status_pb' + + +descriptor_data = "\n5google/ads/googleads/v25/services/asset_service.proto\x12!google.ads.googleads.v25.services\x1a:google/ads/googleads/v25/enums/response_content_type.proto\x1a.google/ads/googleads/v25/resources/asset.proto\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\x1a\x17google/rpc/status.proto\"\x97\x02\n\x13MutateAssetsRequest\x12\x18\n\x0b\x63ustomer_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12J\n\noperations\x18\x02 \x03(\x0b\x32\x31.google.ads.googleads.v25.services.AssetOperationB\x03\xe0\x41\x02\x12\x17\n\x0fpartial_failure\x18\x05 \x01(\x08\x12j\n\x15response_content_type\x18\x03 \x01(\x0e\x32K.google.ads.googleads.v25.enums.ResponseContentTypeEnum.ResponseContentType\x12\x15\n\rvalidate_only\x18\x04 \x01(\x08\"\xc8\x01\n\x0e\x41ssetOperation\x12/\n\x0bupdate_mask\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\x12;\n\x06\x63reate\x18\x01 \x01(\x0b\x32).google.ads.googleads.v25.resources.AssetH\x00\x12;\n\x06update\x18\x02 \x01(\x0b\x32).google.ads.googleads.v25.resources.AssetH\x00\x42\x0b\n\toperation\"\x90\x01\n\x14MutateAssetsResponse\x12\x31\n\x15partial_failure_error\x18\x03 \x01(\x0b\x32\x12.google.rpc.Status\x12\x45\n\x07results\x18\x02 \x03(\x0b\x32\x34.google.ads.googleads.v25.services.MutateAssetResult\"\x89\x01\n\x11MutateAssetResult\x12:\n\rresource_name\x18\x01 \x01(\tB#\xfa\x41 \n\x1egoogleads.googleapis.com/Asset\x12\x38\n\x05\x61sset\x18\x02 \x01(\x0b\x32).google.ads.googleads.v25.resources.Asset2\xa9\x02\n\x0c\x41ssetService\x12\xd1\x01\n\x0cMutateAssets\x12\x36.google.ads.googleads.v25.services.MutateAssetsRequest\x1a\x37.google.ads.googleads.v25.services.MutateAssetsResponse\"P\xda\x41\x16\x63ustomer_id,operations\x82\xd3\xe4\x93\x02\x31\",/v25/customers/{customer_id=*}/assets:mutate:\x01*\x1a\x45\xca\x41\x18googleads.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/adwordsB\xfd\x01\n%com.google.ads.googleads.v25.servicesB\x11\x41ssetServiceProtoP\x01ZIgoogle.golang.org/genproto/googleapis/ads/googleads/v25/services;services\xa2\x02\x03GAA\xaa\x02!Google.Ads.GoogleAds.V25.Services\xca\x02!Google\\Ads\\GoogleAds\\V25\\Services\xea\x02%Google::Ads::GoogleAds::V25::Servicesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Services + MutateAssetsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.MutateAssetsRequest").msgclass + AssetOperation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.AssetOperation").msgclass + MutateAssetsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.MutateAssetsResponse").msgclass + MutateAssetResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.MutateAssetResult").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/asset_service_services_pb.rb b/lib/google/ads/google_ads/v25/services/asset_service_services_pb.rb new file mode 100644 index 000000000..b3468002f --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/asset_service_services_pb.rb @@ -0,0 +1,80 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/ads/googleads/v25/services/asset_service.proto for package 'Google.Ads.GoogleAds.V25.Services' +# Original file comments: +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +require 'grpc' +require 'google/ads/google_ads/v25/services/asset_service_pb' + +module Google + module Ads + module GoogleAds + module V25 + module Services + module AssetService + # Proto file describing the Asset service. + # + # Service to manage assets. Asset types can be created with AssetService are + # YoutubeVideoAsset, MediaBundleAsset and ImageAsset. TextAsset should be + # created with Ad inline. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.ads.googleads.v25.services.AssetService' + + # Creates assets. Operation statuses are returned. + # + # List of thrown errors: + # [AssetError]() + # [AuthenticationError]() + # [AuthorizationError]() + # [CollectionSizeError]() + # [CurrencyCodeError]() + # [DatabaseError]() + # [DateError]() + # [DistinctError]() + # [FieldError]() + # [FieldMaskError]() + # [HeaderError]() + # [IdError]() + # [InternalError]() + # [ListOperationError]() + # [MediaUploadError]() + # [MutateError]() + # [NotAllowlistedError]() + # [NotEmptyError]() + # [OperatorError]() + # [QuotaError]() + # [RangeError]() + # [RequestError]() + # [SizeLimitError]() + # [StringFormatError]() + # [StringLengthError]() + # [UrlFieldError]() + # [YoutubeVideoRegistrationError]() + rpc :MutateAssets, ::Google::Ads::GoogleAds::V25::Services::MutateAssetsRequest, ::Google::Ads::GoogleAds::V25::Services::MutateAssetsResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/asset_set_asset_service.rb b/lib/google/ads/google_ads/v25/services/asset_set_asset_service.rb new file mode 100644 index 000000000..a0da418cd --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/asset_set_asset_service.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/ads/google_ads/version" + +require "google/ads/google_ads/v25/services/asset_set_asset_service/credentials" +require "google/ads/google_ads/v25/services/asset_set_asset_service/paths" +require "google/ads/google_ads/v25/services/asset_set_asset_service/client" + +module Google + module Ads + module GoogleAds + module V25 + module Services + ## + # Service to manage asset set asset. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/ads/google_ads/v25/services/asset_set_asset_service" + # client = ::Google::Ads::GoogleAds::V25::Services::AssetSetAssetService::Client.new + # + module AssetSetAssetService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "asset_set_asset_service", "helpers.rb" +require "google/ads/google_ads/v25/services/asset_set_asset_service/helpers" if ::File.file? helper_path diff --git a/lib/google/ads/google_ads/v25/services/asset_set_asset_service/client.rb b/lib/google/ads/google_ads/v25/services/asset_set_asset_service/client.rb new file mode 100644 index 000000000..71998bb9a --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/asset_set_asset_service/client.rb @@ -0,0 +1,492 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# require "google/ads/google_ads/error" +require "google/ads/google_ads/v25/services/asset_set_asset_service_pb" + +module Google + module Ads + module GoogleAds + module V25 + module Services + module AssetSetAssetService + ## + # Client for the AssetSetAssetService service. + # + # Service to manage asset set asset. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "googleads.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :asset_set_asset_service_stub + + ## + # Configure the AssetSetAssetService Client class. + # + # See {::Google::Ads::GoogleAds::V25::Services::AssetSetAssetService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all AssetSetAssetService clients + # ::Google::Ads::GoogleAds::V25::Services::AssetSetAssetService::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + default_config = Client::Configuration.new + + default_config.timeout = 14_400.0 + default_config.retry_policy = { + initial_delay: 5.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the AssetSetAssetService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Ads::GoogleAds::V25::Services::AssetSetAssetService::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @asset_set_asset_service_stub.universe_domain + end + + ## + # Create a new AssetSetAssetService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Ads::GoogleAds::V25::Services::AssetSetAssetService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Ads::GoogleAds::V25::Services::AssetSetAssetService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the AssetSetAssetService client. + # @yieldparam config [Client::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/ads/google_ads/v25/services/asset_set_asset_service_services_pb" + + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @asset_set_asset_service_stub = ::Gapic::ServiceStub.new( + ::Google::Ads::GoogleAds::V25::Services::AssetSetAssetService::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool, + logger: @config.logger + ) + + @asset_set_asset_service_stub.stub_logger&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @asset_set_asset_service_stub.logger + end + + # Service calls + + ## + # Creates, updates or removes asset set assets. Operation statuses are + # returned. + # + # @overload mutate_asset_set_assets(request, options = nil) + # Pass arguments to `mutate_asset_set_assets` via a request object, either of type + # {::Google::Ads::GoogleAds::V25::Services::MutateAssetSetAssetsRequest} or an equivalent Hash. + # + # @param request [::Google::Ads::GoogleAds::V25::Services::MutateAssetSetAssetsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload mutate_asset_set_assets(customer_id: nil, operations: nil, partial_failure: nil, validate_only: nil, response_content_type: nil) + # Pass arguments to `mutate_asset_set_assets` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param customer_id [::String] + # Required. The ID of the customer whose asset set assets are being modified. + # @param operations [::Array<::Google::Ads::GoogleAds::V25::Services::AssetSetAssetOperation, ::Hash>] + # Required. The list of operations to perform on individual asset set assets. + # @param partial_failure [::Boolean] + # 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. + # @param validate_only [::Boolean] + # If true, the request is validated but not executed. Only errors are + # returned, not results. + # @param response_content_type [::Google::Ads::GoogleAds::V25::Enums::ResponseContentTypeEnum::ResponseContentType] + # The response content type setting. Determines whether the mutable resource + # or just the resource name should be returned post mutation. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Ads::GoogleAds::V25::Services::MutateAssetSetAssetsResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Ads::GoogleAds::V25::Services::MutateAssetSetAssetsResponse] + # + # @raise [Google::Ads::GoogleAds::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/ads/google_ads/v25/services" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Ads::GoogleAds::V25::Services::AssetSetAssetService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Ads::GoogleAds::V25::Services::MutateAssetSetAssetsRequest.new + # + # # Call the mutate_asset_set_assets method. + # result = client.mutate_asset_set_assets request + # + # # The returned object is of type Google::Ads::GoogleAds::V25::Services::MutateAssetSetAssetsResponse. + # p result + # + def mutate_asset_set_assets request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::GoogleAds::V25::Services::MutateAssetSetAssetsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.mutate_asset_set_assets.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Ads::GoogleAds::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.customer_id + header_params["customer_id"] = request.customer_id + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.mutate_asset_set_assets.timeout, + metadata: metadata, + retry_policy: @config.rpcs.mutate_asset_set_assets.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @asset_set_asset_service_stub.call_rpc :mutate_asset_set_assets, request, + options: options do |response, operation| + yield response, operation if block_given? + end + # rescue GRPC::BadStatus => grpc_error + # raise Google::Ads::GoogleAds::Error.new grpc_error.message + end + + ## + # Configuration class for the AssetSetAssetService API. + # + # This class represents the configuration for AssetSetAssetService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Ads::GoogleAds::V25::Services::AssetSetAssetService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # mutate_asset_set_assets to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Ads::GoogleAds::V25::Services::AssetSetAssetService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.mutate_asset_set_assets.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Ads::GoogleAds::V25::Services::AssetSetAssetService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.mutate_asset_set_assets.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Ads::GoogleAds::V25::Services::AssetSetAssetService::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "googleads.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, + ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the AssetSetAssetService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `mutate_asset_set_assets` + # @return [::Gapic::Config::Method] + # + attr_reader :mutate_asset_set_assets + + # @private + def initialize parent_rpcs = nil + mutate_asset_set_assets_config = parent_rpcs.mutate_asset_set_assets if parent_rpcs.respond_to? :mutate_asset_set_assets + @mutate_asset_set_assets = ::Gapic::Config::Method.new mutate_asset_set_assets_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/asset_set_asset_service/credentials.rb b/lib/google/ads/google_ads/v25/services/asset_set_asset_service/credentials.rb new file mode 100644 index 000000000..e9fb96aba --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/asset_set_asset_service/credentials.rb @@ -0,0 +1,38 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Ads + module GoogleAds + module V25 + module Services + module AssetSetAssetService + # Credentials for the AssetSetAssetService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/adwords" + ] + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/asset_set_asset_service/paths.rb b/lib/google/ads/google_ads/v25/services/asset_set_asset_service/paths.rb new file mode 100644 index 000000000..bbe93c172 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/asset_set_asset_service/paths.rb @@ -0,0 +1,88 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Ads + module GoogleAds + module V25 + module Services + module AssetSetAssetService + # Path helper methods for the AssetSetAssetService API. + module Paths + ## + # Create a fully-qualified Asset resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/assets/{asset_id}` + # + # @param customer_id [String] + # @param asset_id [String] + # + # @return [::String] + def asset_path customer_id:, asset_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/assets/#{asset_id}" + end + + ## + # Create a fully-qualified AssetSet resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/assetSets/{asset_set_id}` + # + # @param customer_id [String] + # @param asset_set_id [String] + # + # @return [::String] + def asset_set_path customer_id:, asset_set_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/assetSets/#{asset_set_id}" + end + + ## + # Create a fully-qualified AssetSetAsset resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/assetSetAssets/{asset_set_id}~{asset_id}` + # + # @param customer_id [String] + # @param asset_set_id [String] + # @param asset_id [String] + # + # @return [::String] + def asset_set_asset_path customer_id:, asset_set_id:, asset_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + raise ::ArgumentError, "asset_set_id cannot contain /" if asset_set_id.to_s.include? "/" + + "customers/#{customer_id}/assetSetAssets/#{asset_set_id}~#{asset_id}" + end + + extend self + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/asset_set_asset_service_pb.rb b/lib/google/ads/google_ads/v25/services/asset_set_asset_service_pb.rb new file mode 100644 index 000000000..7c33296bf --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/asset_set_asset_service_pb.rb @@ -0,0 +1,34 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/services/asset_set_asset_service.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/enums/response_content_type_pb' +require 'google/ads/google_ads/v25/resources/asset_set_asset_pb' +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/rpc/status_pb' + + +descriptor_data = "\n?google/ads/googleads/v25/services/asset_set_asset_service.proto\x12!google.ads.googleads.v25.services\x1a:google/ads/googleads/v25/enums/response_content_type.proto\x1a\x38google/ads/googleads/v25/resources/asset_set_asset.proto\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x17google/rpc/status.proto\"\xa7\x02\n\x1bMutateAssetSetAssetsRequest\x12\x18\n\x0b\x63ustomer_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12R\n\noperations\x18\x02 \x03(\x0b\x32\x39.google.ads.googleads.v25.services.AssetSetAssetOperationB\x03\xe0\x41\x02\x12\x17\n\x0fpartial_failure\x18\x03 \x01(\x08\x12\x15\n\rvalidate_only\x18\x04 \x01(\x08\x12j\n\x15response_content_type\x18\x05 \x01(\x0e\x32K.google.ads.googleads.v25.enums.ResponseContentTypeEnum.ResponseContentType\"\xa9\x01\n\x16\x41ssetSetAssetOperation\x12\x43\n\x06\x63reate\x18\x01 \x01(\x0b\x32\x31.google.ads.googleads.v25.resources.AssetSetAssetH\x00\x12=\n\x06remove\x18\x02 \x01(\tB+\xfa\x41(\n&googleads.googleapis.com/AssetSetAssetH\x00\x42\x0b\n\toperation\"\xa0\x01\n\x1cMutateAssetSetAssetsResponse\x12M\n\x07results\x18\x01 \x03(\x0b\x32<.google.ads.googleads.v25.services.MutateAssetSetAssetResult\x12\x31\n\x15partial_failure_error\x18\x02 \x01(\x0b\x32\x12.google.rpc.Status\"\xab\x01\n\x19MutateAssetSetAssetResult\x12\x42\n\rresource_name\x18\x01 \x01(\tB+\xfa\x41(\n&googleads.googleapis.com/AssetSetAsset\x12J\n\x0f\x61sset_set_asset\x18\x02 \x01(\x0b\x32\x31.google.ads.googleads.v25.resources.AssetSetAsset2\xd1\x02\n\x14\x41ssetSetAssetService\x12\xf1\x01\n\x14MutateAssetSetAssets\x12>.google.ads.googleads.v25.services.MutateAssetSetAssetsRequest\x1a?.google.ads.googleads.v25.services.MutateAssetSetAssetsResponse\"X\xda\x41\x16\x63ustomer_id,operations\x82\xd3\xe4\x93\x02\x39\"4/v25/customers/{customer_id=*}/assetSetAssets:mutate:\x01*\x1a\x45\xca\x41\x18googleads.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/adwordsB\x85\x02\n%com.google.ads.googleads.v25.servicesB\x19\x41ssetSetAssetServiceProtoP\x01ZIgoogle.golang.org/genproto/googleapis/ads/googleads/v25/services;services\xa2\x02\x03GAA\xaa\x02!Google.Ads.GoogleAds.V25.Services\xca\x02!Google\\Ads\\GoogleAds\\V25\\Services\xea\x02%Google::Ads::GoogleAds::V25::Servicesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Services + MutateAssetSetAssetsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.MutateAssetSetAssetsRequest").msgclass + AssetSetAssetOperation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.AssetSetAssetOperation").msgclass + MutateAssetSetAssetsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.MutateAssetSetAssetsResponse").msgclass + MutateAssetSetAssetResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.MutateAssetSetAssetResult").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/asset_set_asset_service_services_pb.rb b/lib/google/ads/google_ads/v25/services/asset_set_asset_service_services_pb.rb new file mode 100644 index 000000000..12f74ea1f --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/asset_set_asset_service_services_pb.rb @@ -0,0 +1,50 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/ads/googleads/v25/services/asset_set_asset_service.proto for package 'Google.Ads.GoogleAds.V25.Services' +# Original file comments: +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +require 'grpc' +require 'google/ads/google_ads/v25/services/asset_set_asset_service_pb' + +module Google + module Ads + module GoogleAds + module V25 + module Services + module AssetSetAssetService + # Proto file describing the AssetSetAsset service. + # + # Service to manage asset set asset. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.ads.googleads.v25.services.AssetSetAssetService' + + # Creates, updates or removes asset set assets. Operation statuses are + # returned. + rpc :MutateAssetSetAssets, ::Google::Ads::GoogleAds::V25::Services::MutateAssetSetAssetsRequest, ::Google::Ads::GoogleAds::V25::Services::MutateAssetSetAssetsResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/asset_set_service.rb b/lib/google/ads/google_ads/v25/services/asset_set_service.rb new file mode 100644 index 000000000..f69081fdc --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/asset_set_service.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/ads/google_ads/version" + +require "google/ads/google_ads/v25/services/asset_set_service/credentials" +require "google/ads/google_ads/v25/services/asset_set_service/paths" +require "google/ads/google_ads/v25/services/asset_set_service/client" + +module Google + module Ads + module GoogleAds + module V25 + module Services + ## + # Service to manage asset set + # + # @example Load this service and instantiate a gRPC client + # + # require "google/ads/google_ads/v25/services/asset_set_service" + # client = ::Google::Ads::GoogleAds::V25::Services::AssetSetService::Client.new + # + module AssetSetService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "asset_set_service", "helpers.rb" +require "google/ads/google_ads/v25/services/asset_set_service/helpers" if ::File.file? helper_path diff --git a/lib/google/ads/google_ads/v25/services/asset_set_service/client.rb b/lib/google/ads/google_ads/v25/services/asset_set_service/client.rb new file mode 100644 index 000000000..ab7e061c6 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/asset_set_service/client.rb @@ -0,0 +1,491 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# require "google/ads/google_ads/error" +require "google/ads/google_ads/v25/services/asset_set_service_pb" + +module Google + module Ads + module GoogleAds + module V25 + module Services + module AssetSetService + ## + # Client for the AssetSetService service. + # + # Service to manage asset set + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "googleads.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :asset_set_service_stub + + ## + # Configure the AssetSetService Client class. + # + # See {::Google::Ads::GoogleAds::V25::Services::AssetSetService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all AssetSetService clients + # ::Google::Ads::GoogleAds::V25::Services::AssetSetService::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + default_config = Client::Configuration.new + + default_config.timeout = 14_400.0 + default_config.retry_policy = { + initial_delay: 5.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the AssetSetService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Ads::GoogleAds::V25::Services::AssetSetService::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @asset_set_service_stub.universe_domain + end + + ## + # Create a new AssetSetService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Ads::GoogleAds::V25::Services::AssetSetService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Ads::GoogleAds::V25::Services::AssetSetService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the AssetSetService client. + # @yieldparam config [Client::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/ads/google_ads/v25/services/asset_set_service_services_pb" + + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @asset_set_service_stub = ::Gapic::ServiceStub.new( + ::Google::Ads::GoogleAds::V25::Services::AssetSetService::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool, + logger: @config.logger + ) + + @asset_set_service_stub.stub_logger&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @asset_set_service_stub.logger + end + + # Service calls + + ## + # Creates, updates or removes asset sets. Operation statuses are + # returned. + # + # @overload mutate_asset_sets(request, options = nil) + # Pass arguments to `mutate_asset_sets` via a request object, either of type + # {::Google::Ads::GoogleAds::V25::Services::MutateAssetSetsRequest} or an equivalent Hash. + # + # @param request [::Google::Ads::GoogleAds::V25::Services::MutateAssetSetsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload mutate_asset_sets(customer_id: nil, operations: nil, partial_failure: nil, validate_only: nil, response_content_type: nil) + # Pass arguments to `mutate_asset_sets` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param customer_id [::String] + # Required. The ID of the customer whose asset sets are being modified. + # @param operations [::Array<::Google::Ads::GoogleAds::V25::Services::AssetSetOperation, ::Hash>] + # Required. The list of operations to perform on individual asset sets. + # @param partial_failure [::Boolean] + # 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. + # @param validate_only [::Boolean] + # If true, the request is validated but not executed. Only errors are + # returned, not results. + # @param response_content_type [::Google::Ads::GoogleAds::V25::Enums::ResponseContentTypeEnum::ResponseContentType] + # The response content type setting. Determines whether the mutable resource + # or just the resource name should be returned post mutation. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Ads::GoogleAds::V25::Services::MutateAssetSetsResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Ads::GoogleAds::V25::Services::MutateAssetSetsResponse] + # + # @raise [Google::Ads::GoogleAds::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/ads/google_ads/v25/services" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Ads::GoogleAds::V25::Services::AssetSetService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Ads::GoogleAds::V25::Services::MutateAssetSetsRequest.new + # + # # Call the mutate_asset_sets method. + # result = client.mutate_asset_sets request + # + # # The returned object is of type Google::Ads::GoogleAds::V25::Services::MutateAssetSetsResponse. + # p result + # + def mutate_asset_sets request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::GoogleAds::V25::Services::MutateAssetSetsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.mutate_asset_sets.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Ads::GoogleAds::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.customer_id + header_params["customer_id"] = request.customer_id + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.mutate_asset_sets.timeout, + metadata: metadata, + retry_policy: @config.rpcs.mutate_asset_sets.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @asset_set_service_stub.call_rpc :mutate_asset_sets, request, options: options do |response, operation| + yield response, operation if block_given? + end + # rescue GRPC::BadStatus => grpc_error + # raise Google::Ads::GoogleAds::Error.new grpc_error.message + end + + ## + # Configuration class for the AssetSetService API. + # + # This class represents the configuration for AssetSetService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Ads::GoogleAds::V25::Services::AssetSetService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # mutate_asset_sets to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Ads::GoogleAds::V25::Services::AssetSetService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.mutate_asset_sets.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Ads::GoogleAds::V25::Services::AssetSetService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.mutate_asset_sets.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Ads::GoogleAds::V25::Services::AssetSetService::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "googleads.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, + ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the AssetSetService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `mutate_asset_sets` + # @return [::Gapic::Config::Method] + # + attr_reader :mutate_asset_sets + + # @private + def initialize parent_rpcs = nil + mutate_asset_sets_config = parent_rpcs.mutate_asset_sets if parent_rpcs.respond_to? :mutate_asset_sets + @mutate_asset_sets = ::Gapic::Config::Method.new mutate_asset_sets_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/asset_set_service/credentials.rb b/lib/google/ads/google_ads/v25/services/asset_set_service/credentials.rb new file mode 100644 index 000000000..9d23f5599 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/asset_set_service/credentials.rb @@ -0,0 +1,38 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Ads + module GoogleAds + module V25 + module Services + module AssetSetService + # Credentials for the AssetSetService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/adwords" + ] + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/asset_set_service/paths.rb b/lib/google/ads/google_ads/v25/services/asset_set_service/paths.rb new file mode 100644 index 000000000..fdbfe48ef --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/asset_set_service/paths.rb @@ -0,0 +1,52 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Ads + module GoogleAds + module V25 + module Services + module AssetSetService + # Path helper methods for the AssetSetService API. + module Paths + ## + # Create a fully-qualified AssetSet resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/assetSets/{asset_set_id}` + # + # @param customer_id [String] + # @param asset_set_id [String] + # + # @return [::String] + def asset_set_path customer_id:, asset_set_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/assetSets/#{asset_set_id}" + end + + extend self + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/asset_set_service_pb.rb b/lib/google/ads/google_ads/v25/services/asset_set_service_pb.rb new file mode 100644 index 000000000..6b32d28f2 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/asset_set_service_pb.rb @@ -0,0 +1,35 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/services/asset_set_service.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/enums/response_content_type_pb' +require 'google/ads/google_ads/v25/resources/asset_set_pb' +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/field_mask_pb' +require 'google/rpc/status_pb' + + +descriptor_data = "\n9google/ads/googleads/v25/services/asset_set_service.proto\x12!google.ads.googleads.v25.services\x1a:google/ads/googleads/v25/enums/response_content_type.proto\x1a\x32google/ads/googleads/v25/resources/asset_set.proto\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\x1a\x17google/rpc/status.proto\"\x9d\x02\n\x16MutateAssetSetsRequest\x12\x18\n\x0b\x63ustomer_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12M\n\noperations\x18\x02 \x03(\x0b\x32\x34.google.ads.googleads.v25.services.AssetSetOperationB\x03\xe0\x41\x02\x12\x17\n\x0fpartial_failure\x18\x03 \x01(\x08\x12\x15\n\rvalidate_only\x18\x04 \x01(\x08\x12j\n\x15response_content_type\x18\x05 \x01(\x0e\x32K.google.ads.googleads.v25.enums.ResponseContentTypeEnum.ResponseContentType\"\x8b\x02\n\x11\x41ssetSetOperation\x12/\n\x0bupdate_mask\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\x12>\n\x06\x63reate\x18\x01 \x01(\x0b\x32,.google.ads.googleads.v25.resources.AssetSetH\x00\x12>\n\x06update\x18\x02 \x01(\x0b\x32,.google.ads.googleads.v25.resources.AssetSetH\x00\x12\x38\n\x06remove\x18\x03 \x01(\tB&\xfa\x41#\n!googleads.googleapis.com/AssetSetH\x00\x42\x0b\n\toperation\"\x96\x01\n\x17MutateAssetSetsResponse\x12H\n\x07results\x18\x01 \x03(\x0b\x32\x37.google.ads.googleads.v25.services.MutateAssetSetResult\x12\x31\n\x15partial_failure_error\x18\x02 \x01(\x0b\x32\x12.google.rpc.Status\"\x96\x01\n\x14MutateAssetSetResult\x12=\n\rresource_name\x18\x01 \x01(\tB&\xfa\x41#\n!googleads.googleapis.com/AssetSet\x12?\n\tasset_set\x18\x02 \x01(\x0b\x32,.google.ads.googleads.v25.resources.AssetSet2\xb8\x02\n\x0f\x41ssetSetService\x12\xdd\x01\n\x0fMutateAssetSets\x12\x39.google.ads.googleads.v25.services.MutateAssetSetsRequest\x1a:.google.ads.googleads.v25.services.MutateAssetSetsResponse\"S\xda\x41\x16\x63ustomer_id,operations\x82\xd3\xe4\x93\x02\x34\"//v25/customers/{customer_id=*}/assetSets:mutate:\x01*\x1a\x45\xca\x41\x18googleads.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/adwordsB\x80\x02\n%com.google.ads.googleads.v25.servicesB\x14\x41ssetSetServiceProtoP\x01ZIgoogle.golang.org/genproto/googleapis/ads/googleads/v25/services;services\xa2\x02\x03GAA\xaa\x02!Google.Ads.GoogleAds.V25.Services\xca\x02!Google\\Ads\\GoogleAds\\V25\\Services\xea\x02%Google::Ads::GoogleAds::V25::Servicesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Services + MutateAssetSetsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.MutateAssetSetsRequest").msgclass + AssetSetOperation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.AssetSetOperation").msgclass + MutateAssetSetsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.MutateAssetSetsResponse").msgclass + MutateAssetSetResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.MutateAssetSetResult").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/asset_set_service_services_pb.rb b/lib/google/ads/google_ads/v25/services/asset_set_service_services_pb.rb new file mode 100644 index 000000000..51013a33a --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/asset_set_service_services_pb.rb @@ -0,0 +1,50 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/ads/googleads/v25/services/asset_set_service.proto for package 'Google.Ads.GoogleAds.V25.Services' +# Original file comments: +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +require 'grpc' +require 'google/ads/google_ads/v25/services/asset_set_service_pb' + +module Google + module Ads + module GoogleAds + module V25 + module Services + module AssetSetService + # Proto file describing the AssetSet service. + # + # Service to manage asset set + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.ads.googleads.v25.services.AssetSetService' + + # Creates, updates or removes asset sets. Operation statuses are + # returned. + rpc :MutateAssetSets, ::Google::Ads::GoogleAds::V25::Services::MutateAssetSetsRequest, ::Google::Ads::GoogleAds::V25::Services::MutateAssetSetsResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/audience_insights_service.rb b/lib/google/ads/google_ads/v25/services/audience_insights_service.rb new file mode 100644 index 000000000..92229d03c --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/audience_insights_service.rb @@ -0,0 +1,52 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/ads/google_ads/version" + +require "google/ads/google_ads/v25/services/audience_insights_service/credentials" +require "google/ads/google_ads/v25/services/audience_insights_service/client" + +module Google + module Ads + module GoogleAds + module V25 + module Services + ## + # Audience Insights Service helps users find information about groups of + # people and how they can be reached with Google Ads. Accessible to + # allowlisted customers only. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/ads/google_ads/v25/services/audience_insights_service" + # client = ::Google::Ads::GoogleAds::V25::Services::AudienceInsightsService::Client.new + # + module AudienceInsightsService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "audience_insights_service", "helpers.rb" +require "google/ads/google_ads/v25/services/audience_insights_service/helpers" if ::File.file? helper_path diff --git a/lib/google/ads/google_ads/v25/services/audience_insights_service/client.rb b/lib/google/ads/google_ads/v25/services/audience_insights_service/client.rb new file mode 100644 index 000000000..0f7c683ee --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/audience_insights_service/client.rb @@ -0,0 +1,1326 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# require "google/ads/google_ads/error" +require "google/ads/google_ads/v25/services/audience_insights_service_pb" + +module Google + module Ads + module GoogleAds + module V25 + module Services + module AudienceInsightsService + ## + # Client for the AudienceInsightsService service. + # + # Audience Insights Service helps users find information about groups of + # people and how they can be reached with Google Ads. Accessible to + # allowlisted customers only. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "googleads.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :audience_insights_service_stub + + ## + # Configure the AudienceInsightsService Client class. + # + # See {::Google::Ads::GoogleAds::V25::Services::AudienceInsightsService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all AudienceInsightsService clients + # ::Google::Ads::GoogleAds::V25::Services::AudienceInsightsService::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + default_config = Client::Configuration.new + + default_config.timeout = 14_400.0 + default_config.retry_policy = { + initial_delay: 5.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the AudienceInsightsService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Ads::GoogleAds::V25::Services::AudienceInsightsService::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @audience_insights_service_stub.universe_domain + end + + ## + # Create a new AudienceInsightsService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Ads::GoogleAds::V25::Services::AudienceInsightsService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Ads::GoogleAds::V25::Services::AudienceInsightsService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the AudienceInsightsService client. + # @yieldparam config [Client::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/ads/google_ads/v25/services/audience_insights_service_services_pb" + + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @audience_insights_service_stub = ::Gapic::ServiceStub.new( + ::Google::Ads::GoogleAds::V25::Services::AudienceInsightsService::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool, + logger: @config.logger + ) + + @audience_insights_service_stub.stub_logger&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @audience_insights_service_stub.logger + end + + # Service calls + + ## + # Creates a saved report that can be viewed in the Insights Finder tool. + # + # List of thrown errors: + # [AuthenticationError]() + # [AuthorizationError]() + # [FieldError]() + # [HeaderError]() + # [InternalError]() + # [QuotaError]() + # [RangeError]() + # [RequestError]() + # + # @overload generate_insights_finder_report(request, options = nil) + # Pass arguments to `generate_insights_finder_report` via a request object, either of type + # {::Google::Ads::GoogleAds::V25::Services::GenerateInsightsFinderReportRequest} or an equivalent Hash. + # + # @param request [::Google::Ads::GoogleAds::V25::Services::GenerateInsightsFinderReportRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload generate_insights_finder_report(customer_id: nil, baseline_audience: nil, specific_audience: nil, customer_insights_group: nil, insights_application_info: nil) + # Pass arguments to `generate_insights_finder_report` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param customer_id [::String] + # Required. The ID of the customer. + # @param baseline_audience [::Google::Ads::GoogleAds::V25::Services::InsightsAudience, ::Hash] + # Required. A baseline audience for this report, typically all people in a + # region. + # @param specific_audience [::Google::Ads::GoogleAds::V25::Services::InsightsAudience, ::Hash] + # Required. The specific audience of interest for this report. The insights + # in the report will be based on attributes more prevalent in this audience + # than in the report's baseline audience. + # @param customer_insights_group [::String] + # The name of the customer being planned for. This is a user-defined value. + # @param insights_application_info [::Google::Ads::GoogleAds::V25::Common::AdditionalApplicationInfo, ::Hash] + # Optional. Additional information on the application issuing the request. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Ads::GoogleAds::V25::Services::GenerateInsightsFinderReportResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Ads::GoogleAds::V25::Services::GenerateInsightsFinderReportResponse] + # + # @raise [Google::Ads::GoogleAds::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/ads/google_ads/v25/services" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Ads::GoogleAds::V25::Services::AudienceInsightsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Ads::GoogleAds::V25::Services::GenerateInsightsFinderReportRequest.new + # + # # Call the generate_insights_finder_report method. + # result = client.generate_insights_finder_report request + # + # # The returned object is of type Google::Ads::GoogleAds::V25::Services::GenerateInsightsFinderReportResponse. + # p result + # + def generate_insights_finder_report request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::GoogleAds::V25::Services::GenerateInsightsFinderReportRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.generate_insights_finder_report.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Ads::GoogleAds::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.customer_id + header_params["customer_id"] = request.customer_id + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.generate_insights_finder_report.timeout, + metadata: metadata, + retry_policy: @config.rpcs.generate_insights_finder_report.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @audience_insights_service_stub.call_rpc :generate_insights_finder_report, request, + options: options do |response, operation| + yield response, operation if block_given? + end + # rescue GRPC::BadStatus => grpc_error + # raise Google::Ads::GoogleAds::Error.new grpc_error.message + end + + ## + # Searches for audience attributes that can be used to generate insights. + # + # List of thrown errors: + # [AuthenticationError]() + # [AuthorizationError]() + # [FieldError]() + # [HeaderError]() + # [InternalError]() + # [QuotaError]() + # [RangeError]() + # [RequestError]() + # + # @overload list_audience_insights_attributes(request, options = nil) + # Pass arguments to `list_audience_insights_attributes` via a request object, either of type + # {::Google::Ads::GoogleAds::V25::Services::ListAudienceInsightsAttributesRequest} or an equivalent Hash. + # + # @param request [::Google::Ads::GoogleAds::V25::Services::ListAudienceInsightsAttributesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_audience_insights_attributes(customer_id: nil, dimensions: nil, query_text: nil, customer_insights_group: nil, insights_application_info: nil, location_country_filters: nil, youtube_reach_location: nil, knowledge_graph_entity_search_options: nil) + # Pass arguments to `list_audience_insights_attributes` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param customer_id [::String] + # Required. The ID of the customer. + # @param dimensions [::Array<::Google::Ads::GoogleAds::V25::Enums::AudienceInsightsDimensionEnum::AudienceInsightsDimension>] + # Required. The types of attributes to be returned. Supported + # dimensions are CATEGORY, KNOWLEDGE_GRAPH, DEVICE, + # GEO_TARGET_COUNTRY, SUB_COUNTRY_LOCATION, YOUTUBE_LINEUP, + # AFFINITY_USER_INTEREST, IN_MARKET_USER_INTEREST, LIFE_EVENT_USER_INTEREST, + # PARENTAL_STATUS, INCOME_RANGE, AGE_RANGE, GENDER, and USER_LIST. + # @param query_text [::String] + # Required. A free text query. If the requested dimensions include + # Attributes CATEGORY or KNOWLEDGE_GRAPH, then the attributes returned for + # those dimensions will match or be related to this string. For other + # dimensions, this field is ignored and all available attributes are + # returned. Example: "Millennials interested in the World Cup and soccer." + # @param customer_insights_group [::String] + # The name of the customer being planned for. This is a user-defined value. + # @param insights_application_info [::Google::Ads::GoogleAds::V25::Common::AdditionalApplicationInfo, ::Hash] + # Optional. Additional information on the application issuing the request. + # @param location_country_filters [::Array<::Google::Ads::GoogleAds::V25::Common::LocationInfo, ::Hash>] + # If SUB_COUNTRY_LOCATION attributes are one of the requested dimensions and + # this field is present, then the SUB_COUNTRY_LOCATION attributes returned + # will be located in these countries. If this field is absent, then location + # attributes are not filtered by country. Setting this field when + # SUB_COUNTRY_LOCATION attributes are not requested will return an error. + # @param youtube_reach_location [::Google::Ads::GoogleAds::V25::Common::LocationInfo, ::Hash] + # If present, potential YouTube reach estimates within the specified market + # will be returned for attributes for which they are available. Reach is + # only available for the AGE_RANGE, GENDER, AFFINITY_USER_INTEREST and + # IN_MARKET_USER_INTEREST dimensions, and may not be available for every + # attribute of those dimensions in every market. + # @param knowledge_graph_entity_search_options [::Google::Ads::GoogleAds::V25::Services::KnowledgeGraphEntitySearchOptions, ::Hash] + # Optional. Additional search options for Knowledge Graph Entities. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Ads::GoogleAds::V25::Services::ListAudienceInsightsAttributesResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Ads::GoogleAds::V25::Services::ListAudienceInsightsAttributesResponse] + # + # @raise [Google::Ads::GoogleAds::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/ads/google_ads/v25/services" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Ads::GoogleAds::V25::Services::AudienceInsightsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Ads::GoogleAds::V25::Services::ListAudienceInsightsAttributesRequest.new + # + # # Call the list_audience_insights_attributes method. + # result = client.list_audience_insights_attributes request + # + # # The returned object is of type Google::Ads::GoogleAds::V25::Services::ListAudienceInsightsAttributesResponse. + # p result + # + def list_audience_insights_attributes request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::GoogleAds::V25::Services::ListAudienceInsightsAttributesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_audience_insights_attributes.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Ads::GoogleAds::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.customer_id + header_params["customer_id"] = request.customer_id + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_audience_insights_attributes.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_audience_insights_attributes.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @audience_insights_service_stub.call_rpc :list_audience_insights_attributes, request, + options: options do |response, operation| + yield response, operation if block_given? + end + # rescue GRPC::BadStatus => grpc_error + # raise Google::Ads::GoogleAds::Error.new grpc_error.message + end + + ## + # Lists date ranges for which audience insights data can be requested. + # + # List of thrown errors: + # [AuthenticationError]() + # [AuthorizationError]() + # [FieldError]() + # [HeaderError]() + # [InternalError]() + # [QuotaError]() + # [RangeError]() + # [RequestError]() + # + # @overload list_insights_eligible_dates(request, options = nil) + # Pass arguments to `list_insights_eligible_dates` via a request object, either of type + # {::Google::Ads::GoogleAds::V25::Services::ListInsightsEligibleDatesRequest} or an equivalent Hash. + # + # @param request [::Google::Ads::GoogleAds::V25::Services::ListInsightsEligibleDatesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_insights_eligible_dates(insights_application_info: nil) + # Pass arguments to `list_insights_eligible_dates` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param insights_application_info [::Google::Ads::GoogleAds::V25::Common::AdditionalApplicationInfo, ::Hash] + # Optional. Additional information on the application issuing the request. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Ads::GoogleAds::V25::Services::ListInsightsEligibleDatesResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Ads::GoogleAds::V25::Services::ListInsightsEligibleDatesResponse] + # + # @raise [Google::Ads::GoogleAds::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/ads/google_ads/v25/services" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Ads::GoogleAds::V25::Services::AudienceInsightsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Ads::GoogleAds::V25::Services::ListInsightsEligibleDatesRequest.new + # + # # Call the list_insights_eligible_dates method. + # result = client.list_insights_eligible_dates request + # + # # The returned object is of type Google::Ads::GoogleAds::V25::Services::ListInsightsEligibleDatesResponse. + # p result + # + def list_insights_eligible_dates request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::GoogleAds::V25::Services::ListInsightsEligibleDatesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_insights_eligible_dates.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Ads::GoogleAds::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_insights_eligible_dates.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_insights_eligible_dates.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @audience_insights_service_stub.call_rpc :list_insights_eligible_dates, request, + options: options do |response, operation| + yield response, operation if block_given? + end + # rescue GRPC::BadStatus => grpc_error + # raise Google::Ads::GoogleAds::Error.new grpc_error.message + end + + ## + # Returns a collection of attributes that are represented in an audience of + # interest, with metrics that compare each attribute's share of the audience + # with its share of a baseline audience. + # + # List of thrown errors: + # [AudienceInsightsError]() + # [AuthenticationError]() + # [AuthorizationError]() + # [FieldError]() + # [HeaderError]() + # [InternalError]() + # [QuotaError]() + # [RangeError]() + # [RequestError]() + # + # @overload generate_audience_composition_insights(request, options = nil) + # Pass arguments to `generate_audience_composition_insights` via a request object, either of type + # {::Google::Ads::GoogleAds::V25::Services::GenerateAudienceCompositionInsightsRequest} or an equivalent Hash. + # + # @param request [::Google::Ads::GoogleAds::V25::Services::GenerateAudienceCompositionInsightsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload generate_audience_composition_insights(customer_id: nil, audience: nil, baseline_audience: nil, data_month: nil, dimensions: nil, customer_insights_group: nil, insights_application_info: nil) + # Pass arguments to `generate_audience_composition_insights` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param customer_id [::String] + # Required. The ID of the customer. + # @param audience [::Google::Ads::GoogleAds::V25::Services::InsightsAudience, ::Hash] + # Required. The audience of interest for which insights are being requested. + # @param baseline_audience [::Google::Ads::GoogleAds::V25::Services::InsightsAudience, ::Hash] + # The baseline audience to which the audience of interest is being + # compared. + # @param data_month [::String] + # The one-month range of historical data to use for insights, in the format + # "yyyy-mm". If unset, insights will be returned for the last thirty days of + # data. + # @param dimensions [::Array<::Google::Ads::GoogleAds::V25::Enums::AudienceInsightsDimensionEnum::AudienceInsightsDimension>] + # Required. The audience dimensions for which composition insights should be + # returned. Supported dimensions are KNOWLEDGE_GRAPH, GEO_TARGET_COUNTRY, + # SUB_COUNTRY_LOCATION, YOUTUBE_CHANNEL, YOUTUBE_LINEUP, + # AFFINITY_USER_INTEREST, IN_MARKET_USER_INTEREST, LIFE_EVENT_USER_INTEREST, + # PARENTAL_STATUS, INCOME_RANGE, AGE_RANGE, GENDER, and USER_LIST. + # @param customer_insights_group [::String] + # The name of the customer being planned for. This is a user-defined value. + # @param insights_application_info [::Google::Ads::GoogleAds::V25::Common::AdditionalApplicationInfo, ::Hash] + # Optional. Additional information on the application issuing the request. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Ads::GoogleAds::V25::Services::GenerateAudienceCompositionInsightsResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Ads::GoogleAds::V25::Services::GenerateAudienceCompositionInsightsResponse] + # + # @raise [Google::Ads::GoogleAds::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/ads/google_ads/v25/services" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Ads::GoogleAds::V25::Services::AudienceInsightsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Ads::GoogleAds::V25::Services::GenerateAudienceCompositionInsightsRequest.new + # + # # Call the generate_audience_composition_insights method. + # result = client.generate_audience_composition_insights request + # + # # The returned object is of type Google::Ads::GoogleAds::V25::Services::GenerateAudienceCompositionInsightsResponse. + # p result + # + def generate_audience_composition_insights request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::GoogleAds::V25::Services::GenerateAudienceCompositionInsightsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.generate_audience_composition_insights.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Ads::GoogleAds::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.customer_id + header_params["customer_id"] = request.customer_id + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.generate_audience_composition_insights.timeout, + metadata: metadata, + retry_policy: @config.rpcs.generate_audience_composition_insights.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @audience_insights_service_stub.call_rpc :generate_audience_composition_insights, request, + options: options do |response, operation| + yield response, operation if block_given? + end + # rescue GRPC::BadStatus => grpc_error + # raise Google::Ads::GoogleAds::Error.new grpc_error.message + end + + ## + # Returns a collection of audience attributes using generative AI based on + # the provided audience description. + # + # List of thrown errors: + # [AudienceInsightsError]() + # [AuthenticationError]() + # [AuthorizationError]() + # [FieldError]() + # [HeaderError]() + # [InternalError]() + # [QuotaError]() + # [RequestError]() + # + # @overload generate_audience_definition(request, options = nil) + # Pass arguments to `generate_audience_definition` via a request object, either of type + # {::Google::Ads::GoogleAds::V25::Services::GenerateAudienceDefinitionRequest} or an equivalent Hash. + # + # @param request [::Google::Ads::GoogleAds::V25::Services::GenerateAudienceDefinitionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload generate_audience_definition(customer_id: nil, audience_description: nil, customer_insights_group: nil, insights_application_info: nil) + # Pass arguments to `generate_audience_definition` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param customer_id [::String] + # Required. The ID of the customer. + # @param audience_description [::Google::Ads::GoogleAds::V25::Services::InsightsAudienceDescription, ::Hash] + # Required. Provide a text description of an audience to get AI-generated + # structured suggestions. This can take around 5 or more seconds to complete + # Supported marketing objectives are: AWARENESS, CONSIDERATION and RESEARCH. + # Supported dimensions are: AGE_RANGE, GENDER, PARENTAL_STATUS, + # AFFINITY_USER_INTEREST, IN_MARKET_USER_INTEREST, LIFE_EVENT_USER_INTEREST, + # CATEGORY and KNOWLEDGE_GRAPH. + # @param customer_insights_group [::String] + # Optional. The name of the customer being planned for. This is a + # user-defined value. + # @param insights_application_info [::Google::Ads::GoogleAds::V25::Common::AdditionalApplicationInfo, ::Hash] + # Optional. Additional information on the application issuing the request. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Ads::GoogleAds::V25::Services::GenerateAudienceDefinitionResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Ads::GoogleAds::V25::Services::GenerateAudienceDefinitionResponse] + # + # @raise [Google::Ads::GoogleAds::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/ads/google_ads/v25/services" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Ads::GoogleAds::V25::Services::AudienceInsightsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Ads::GoogleAds::V25::Services::GenerateAudienceDefinitionRequest.new + # + # # Call the generate_audience_definition method. + # result = client.generate_audience_definition request + # + # # The returned object is of type Google::Ads::GoogleAds::V25::Services::GenerateAudienceDefinitionResponse. + # p result + # + def generate_audience_definition request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::GoogleAds::V25::Services::GenerateAudienceDefinitionRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.generate_audience_definition.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Ads::GoogleAds::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.customer_id + header_params["customer_id"] = request.customer_id + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.generate_audience_definition.timeout, + metadata: metadata, + retry_policy: @config.rpcs.generate_audience_definition.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @audience_insights_service_stub.call_rpc :generate_audience_definition, request, + options: options do |response, operation| + yield response, operation if block_given? + end + # rescue GRPC::BadStatus => grpc_error + # raise Google::Ads::GoogleAds::Error.new grpc_error.message + end + + ## + # Returns a collection of targeting insights (e.g. targetable audiences) that + # are relevant to the requested audience. + # + # List of thrown errors: + # [AudienceInsightsError]() + # [AuthenticationError]() + # [AuthorizationError]() + # [FieldError]() + # [HeaderError]() + # [InternalError]() + # [QuotaError]() + # [RangeError]() + # [RequestError]() + # + # @overload generate_suggested_targeting_insights(request, options = nil) + # Pass arguments to `generate_suggested_targeting_insights` via a request object, either of type + # {::Google::Ads::GoogleAds::V25::Services::GenerateSuggestedTargetingInsightsRequest} or an equivalent Hash. + # + # @param request [::Google::Ads::GoogleAds::V25::Services::GenerateSuggestedTargetingInsightsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload generate_suggested_targeting_insights(customer_id: nil, customer_insights_group: nil, insights_application_info: nil, audience_definition: nil, audience_description: nil) + # Pass arguments to `generate_suggested_targeting_insights` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param customer_id [::String] + # Required. The ID of the customer. + # @param customer_insights_group [::String] + # Optional. The name of the customer being planned for. This is a + # user-defined value. + # @param insights_application_info [::Google::Ads::GoogleAds::V25::Common::AdditionalApplicationInfo, ::Hash] + # Optional. Additional information on the application issuing the request. + # @param audience_definition [::Google::Ads::GoogleAds::V25::Services::InsightsAudienceDefinition, ::Hash] + # Provide a seed audience to get suggestions for. + # + # Note: The following parameters are mutually exclusive: `audience_definition`, `audience_description`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. + # @param audience_description [::Google::Ads::GoogleAds::V25::Services::InsightsAudienceDescription, ::Hash] + # Provide a text description of an audience to get AI-generated targeting + # suggestions. This can take around 5 or more seconds to complete. + # Supported marketing objectives are: AWARENESS and CONSIDERATION. + # Supported dimensions are: AGE_RANGE, GENDER, PARENTAL_STATUS, + # AFFINITY_USER_INTEREST, IN_MARKET_USER_INTEREST and + # LIFE_EVENT_USER_INTEREST. + # + # Note: The following parameters are mutually exclusive: `audience_description`, `audience_definition`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Ads::GoogleAds::V25::Services::GenerateSuggestedTargetingInsightsResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Ads::GoogleAds::V25::Services::GenerateSuggestedTargetingInsightsResponse] + # + # @raise [Google::Ads::GoogleAds::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/ads/google_ads/v25/services" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Ads::GoogleAds::V25::Services::AudienceInsightsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Ads::GoogleAds::V25::Services::GenerateSuggestedTargetingInsightsRequest.new + # + # # Call the generate_suggested_targeting_insights method. + # result = client.generate_suggested_targeting_insights request + # + # # The returned object is of type Google::Ads::GoogleAds::V25::Services::GenerateSuggestedTargetingInsightsResponse. + # p result + # + def generate_suggested_targeting_insights request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::GoogleAds::V25::Services::GenerateSuggestedTargetingInsightsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.generate_suggested_targeting_insights.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Ads::GoogleAds::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.customer_id + header_params["customer_id"] = request.customer_id + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.generate_suggested_targeting_insights.timeout, + metadata: metadata, + retry_policy: @config.rpcs.generate_suggested_targeting_insights.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @audience_insights_service_stub.call_rpc :generate_suggested_targeting_insights, request, + options: options do |response, operation| + yield response, operation if block_given? + end + # rescue GRPC::BadStatus => grpc_error + # raise Google::Ads::GoogleAds::Error.new grpc_error.message + end + + ## + # Returns a collection of audience attributes along with estimates of the + # overlap between their potential YouTube reach and that of a given input + # attribute. + # + # List of thrown errors: + # [AudienceInsightsError]() + # [AuthenticationError]() + # [AuthorizationError]() + # [FieldError]() + # [HeaderError]() + # [InternalError]() + # [QuotaError]() + # [RangeError]() + # [RequestError]() + # + # @overload generate_audience_overlap_insights(request, options = nil) + # Pass arguments to `generate_audience_overlap_insights` via a request object, either of type + # {::Google::Ads::GoogleAds::V25::Services::GenerateAudienceOverlapInsightsRequest} or an equivalent Hash. + # + # @param request [::Google::Ads::GoogleAds::V25::Services::GenerateAudienceOverlapInsightsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload generate_audience_overlap_insights(customer_id: nil, country_location: nil, primary_attribute: nil, dimensions: nil, customer_insights_group: nil, insights_application_info: nil) + # Pass arguments to `generate_audience_overlap_insights` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param customer_id [::String] + # Required. The ID of the customer. + # @param country_location [::Google::Ads::GoogleAds::V25::Common::LocationInfo, ::Hash] + # Required. The country in which to calculate the sizes and overlaps of + # audiences. + # @param primary_attribute [::Google::Ads::GoogleAds::V25::Common::AudienceInsightsAttribute, ::Hash] + # Required. The audience attribute that should be intersected with all other + # eligible audiences. This must be an Affinity or In-Market UserInterest, an + # AgeRange or a Gender. + # @param dimensions [::Array<::Google::Ads::GoogleAds::V25::Enums::AudienceInsightsDimensionEnum::AudienceInsightsDimension>] + # Required. The types of attributes of which to calculate the overlap with + # the primary_attribute. The values must be a subset of + # AFFINITY_USER_INTEREST, IN_MARKET_USER_INTEREST, AGE_RANGE and GENDER. + # @param customer_insights_group [::String] + # The name of the customer being planned for. This is a user-defined value. + # @param insights_application_info [::Google::Ads::GoogleAds::V25::Common::AdditionalApplicationInfo, ::Hash] + # Optional. Additional information on the application issuing the request. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Ads::GoogleAds::V25::Services::GenerateAudienceOverlapInsightsResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Ads::GoogleAds::V25::Services::GenerateAudienceOverlapInsightsResponse] + # + # @raise [Google::Ads::GoogleAds::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/ads/google_ads/v25/services" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Ads::GoogleAds::V25::Services::AudienceInsightsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Ads::GoogleAds::V25::Services::GenerateAudienceOverlapInsightsRequest.new + # + # # Call the generate_audience_overlap_insights method. + # result = client.generate_audience_overlap_insights request + # + # # The returned object is of type Google::Ads::GoogleAds::V25::Services::GenerateAudienceOverlapInsightsResponse. + # p result + # + def generate_audience_overlap_insights request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::GoogleAds::V25::Services::GenerateAudienceOverlapInsightsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.generate_audience_overlap_insights.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Ads::GoogleAds::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.customer_id + header_params["customer_id"] = request.customer_id + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.generate_audience_overlap_insights.timeout, + metadata: metadata, + retry_policy: @config.rpcs.generate_audience_overlap_insights.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @audience_insights_service_stub.call_rpc :generate_audience_overlap_insights, request, + options: options do |response, operation| + yield response, operation if block_given? + end + # rescue GRPC::BadStatus => grpc_error + # raise Google::Ads::GoogleAds::Error.new grpc_error.message + end + + ## + # Returns potential reach metrics for targetable audiences. + # + # This method helps answer questions like "How many Men aged 18+ interested + # in Camping can be reached on YouTube?" + # + # List of thrown errors: + # [AudienceInsightsError]() + # [AuthenticationError]() + # [AuthorizationError]() + # [FieldError]() + # [HeaderError]() + # [InternalError]() + # [QuotaError]() + # [RangeError]() + # [RequestError]() + # + # @overload generate_targeting_suggestion_metrics(request, options = nil) + # Pass arguments to `generate_targeting_suggestion_metrics` via a request object, either of type + # {::Google::Ads::GoogleAds::V25::Services::GenerateTargetingSuggestionMetricsRequest} or an equivalent Hash. + # + # @param request [::Google::Ads::GoogleAds::V25::Services::GenerateTargetingSuggestionMetricsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload generate_targeting_suggestion_metrics(customer_id: nil, audiences: nil, customer_insights_group: nil, insights_application_info: nil) + # Pass arguments to `generate_targeting_suggestion_metrics` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param customer_id [::String] + # Required. The ID of the customer. + # @param audiences [::Array<::Google::Ads::GoogleAds::V25::Services::InsightsAudience, ::Hash>] + # Required. Audiences to request metrics for. + # @param customer_insights_group [::String] + # Optional. The name of the customer being planned for. This is a + # user-defined value. + # @param insights_application_info [::Google::Ads::GoogleAds::V25::Common::AdditionalApplicationInfo, ::Hash] + # Optional. Additional information on the application issuing the request. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Ads::GoogleAds::V25::Services::GenerateTargetingSuggestionMetricsResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Ads::GoogleAds::V25::Services::GenerateTargetingSuggestionMetricsResponse] + # + # @raise [Google::Ads::GoogleAds::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/ads/google_ads/v25/services" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Ads::GoogleAds::V25::Services::AudienceInsightsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Ads::GoogleAds::V25::Services::GenerateTargetingSuggestionMetricsRequest.new + # + # # Call the generate_targeting_suggestion_metrics method. + # result = client.generate_targeting_suggestion_metrics request + # + # # The returned object is of type Google::Ads::GoogleAds::V25::Services::GenerateTargetingSuggestionMetricsResponse. + # p result + # + def generate_targeting_suggestion_metrics request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::GoogleAds::V25::Services::GenerateTargetingSuggestionMetricsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.generate_targeting_suggestion_metrics.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Ads::GoogleAds::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.customer_id + header_params["customer_id"] = request.customer_id + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.generate_targeting_suggestion_metrics.timeout, + metadata: metadata, + retry_policy: @config.rpcs.generate_targeting_suggestion_metrics.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @audience_insights_service_stub.call_rpc :generate_targeting_suggestion_metrics, request, + options: options do |response, operation| + yield response, operation if block_given? + end + # rescue GRPC::BadStatus => grpc_error + # raise Google::Ads::GoogleAds::Error.new grpc_error.message + end + + ## + # Configuration class for the AudienceInsightsService API. + # + # This class represents the configuration for AudienceInsightsService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Ads::GoogleAds::V25::Services::AudienceInsightsService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # generate_insights_finder_report to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Ads::GoogleAds::V25::Services::AudienceInsightsService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.generate_insights_finder_report.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Ads::GoogleAds::V25::Services::AudienceInsightsService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.generate_insights_finder_report.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Ads::GoogleAds::V25::Services::AudienceInsightsService::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "googleads.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, + ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the AudienceInsightsService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `generate_insights_finder_report` + # @return [::Gapic::Config::Method] + # + attr_reader :generate_insights_finder_report + ## + # RPC-specific configuration for `list_audience_insights_attributes` + # @return [::Gapic::Config::Method] + # + attr_reader :list_audience_insights_attributes + ## + # RPC-specific configuration for `list_insights_eligible_dates` + # @return [::Gapic::Config::Method] + # + attr_reader :list_insights_eligible_dates + ## + # RPC-specific configuration for `generate_audience_composition_insights` + # @return [::Gapic::Config::Method] + # + attr_reader :generate_audience_composition_insights + ## + # RPC-specific configuration for `generate_audience_definition` + # @return [::Gapic::Config::Method] + # + attr_reader :generate_audience_definition + ## + # RPC-specific configuration for `generate_suggested_targeting_insights` + # @return [::Gapic::Config::Method] + # + attr_reader :generate_suggested_targeting_insights + ## + # RPC-specific configuration for `generate_audience_overlap_insights` + # @return [::Gapic::Config::Method] + # + attr_reader :generate_audience_overlap_insights + ## + # RPC-specific configuration for `generate_targeting_suggestion_metrics` + # @return [::Gapic::Config::Method] + # + attr_reader :generate_targeting_suggestion_metrics + + # @private + def initialize parent_rpcs = nil + generate_insights_finder_report_config = parent_rpcs.generate_insights_finder_report if parent_rpcs.respond_to? :generate_insights_finder_report + @generate_insights_finder_report = ::Gapic::Config::Method.new generate_insights_finder_report_config + list_audience_insights_attributes_config = parent_rpcs.list_audience_insights_attributes if parent_rpcs.respond_to? :list_audience_insights_attributes + @list_audience_insights_attributes = ::Gapic::Config::Method.new list_audience_insights_attributes_config + list_insights_eligible_dates_config = parent_rpcs.list_insights_eligible_dates if parent_rpcs.respond_to? :list_insights_eligible_dates + @list_insights_eligible_dates = ::Gapic::Config::Method.new list_insights_eligible_dates_config + generate_audience_composition_insights_config = parent_rpcs.generate_audience_composition_insights if parent_rpcs.respond_to? :generate_audience_composition_insights + @generate_audience_composition_insights = ::Gapic::Config::Method.new generate_audience_composition_insights_config + generate_audience_definition_config = parent_rpcs.generate_audience_definition if parent_rpcs.respond_to? :generate_audience_definition + @generate_audience_definition = ::Gapic::Config::Method.new generate_audience_definition_config + generate_suggested_targeting_insights_config = parent_rpcs.generate_suggested_targeting_insights if parent_rpcs.respond_to? :generate_suggested_targeting_insights + @generate_suggested_targeting_insights = ::Gapic::Config::Method.new generate_suggested_targeting_insights_config + generate_audience_overlap_insights_config = parent_rpcs.generate_audience_overlap_insights if parent_rpcs.respond_to? :generate_audience_overlap_insights + @generate_audience_overlap_insights = ::Gapic::Config::Method.new generate_audience_overlap_insights_config + generate_targeting_suggestion_metrics_config = parent_rpcs.generate_targeting_suggestion_metrics if parent_rpcs.respond_to? :generate_targeting_suggestion_metrics + @generate_targeting_suggestion_metrics = ::Gapic::Config::Method.new generate_targeting_suggestion_metrics_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/audience_insights_service/credentials.rb b/lib/google/ads/google_ads/v25/services/audience_insights_service/credentials.rb new file mode 100644 index 000000000..29e3842b0 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/audience_insights_service/credentials.rb @@ -0,0 +1,38 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Ads + module GoogleAds + module V25 + module Services + module AudienceInsightsService + # Credentials for the AudienceInsightsService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/adwords" + ] + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/audience_insights_service_pb.rb b/lib/google/ads/google_ads/v25/services/audience_insights_service_pb.rb new file mode 100644 index 000000000..f0264401e --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/audience_insights_service_pb.rb @@ -0,0 +1,62 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/services/audience_insights_service.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/common/additional_application_info_pb' +require 'google/ads/google_ads/v25/common/audience_insights_attribute_pb' +require 'google/ads/google_ads/v25/common/criteria_pb' +require 'google/ads/google_ads/v25/common/dates_pb' +require 'google/ads/google_ads/v25/enums/audience_insights_dimension_pb' +require 'google/ads/google_ads/v25/enums/audience_insights_marketing_objective_pb' +require 'google/ads/google_ads/v25/enums/insights_knowledge_graph_entity_capabilities_pb' +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' + + +descriptor_data = "\nAgoogle/ads/googleads/v25/services/audience_insights_service.proto\x12!google.ads.googleads.v25.services\x1a\x41google/ads/googleads/v25/common/additional_application_info.proto\x1a\x41google/ads/googleads/v25/common/audience_insights_attribute.proto\x1a.google/ads/googleads/v25/common/criteria.proto\x1a+google/ads/googleads/v25/common/dates.proto\x1a@google/ads/googleads/v25/enums/audience_insights_dimension.proto\x1aJgoogle/ads/googleads/v25/enums/audience_insights_marketing_objective.proto\x1aQgoogle/ads/googleads/v25/enums/insights_knowledge_graph_entity_capabilities.proto\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\"\xee\x02\n#GenerateInsightsFinderReportRequest\x12\x18\n\x0b\x63ustomer_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12S\n\x11\x62\x61seline_audience\x18\x06 \x01(\x0b\x32\x33.google.ads.googleads.v25.services.InsightsAudienceB\x03\xe0\x41\x02\x12S\n\x11specific_audience\x18\x07 \x01(\x0b\x32\x33.google.ads.googleads.v25.services.InsightsAudienceB\x03\xe0\x41\x02\x12\x1f\n\x17\x63ustomer_insights_group\x18\x04 \x01(\t\x12\x62\n\x19insights_application_info\x18\x05 \x01(\x0b\x32:.google.ads.googleads.v25.common.AdditionalApplicationInfoB\x03\xe0\x41\x01\"@\n$GenerateInsightsFinderReportResponse\x12\x18\n\x10saved_report_url\x18\x01 \x01(\t\"\xed\x03\n*GenerateAudienceCompositionInsightsRequest\x12\x18\n\x0b\x63ustomer_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12J\n\x08\x61udience\x18\x02 \x01(\x0b\x32\x33.google.ads.googleads.v25.services.InsightsAudienceB\x03\xe0\x41\x02\x12N\n\x11\x62\x61seline_audience\x18\x06 \x01(\x0b\x32\x33.google.ads.googleads.v25.services.InsightsAudience\x12\x12\n\ndata_month\x18\x03 \x01(\t\x12p\n\ndimensions\x18\x04 \x03(\x0e\x32W.google.ads.googleads.v25.enums.AudienceInsightsDimensionEnum.AudienceInsightsDimensionB\x03\xe0\x41\x02\x12\x1f\n\x17\x63ustomer_insights_group\x18\x05 \x01(\t\x12\x62\n\x19insights_application_info\x18\x07 \x01(\x0b\x32:.google.ads.googleads.v25.common.AdditionalApplicationInfoB\x03\xe0\x41\x01\"~\n+GenerateAudienceCompositionInsightsResponse\x12O\n\x08sections\x18\x01 \x03(\x0b\x32=.google.ads.googleads.v25.services.AudienceCompositionSection\"\x9f\x03\n)GenerateSuggestedTargetingInsightsRequest\x12\x18\n\x0b\x63ustomer_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12$\n\x17\x63ustomer_insights_group\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x62\n\x19insights_application_info\x18\x08 \x01(\x0b\x32:.google.ads.googleads.v25.common.AdditionalApplicationInfoB\x03\xe0\x41\x01\x12\\\n\x13\x61udience_definition\x18\x06 \x01(\x0b\x32=.google.ads.googleads.v25.services.InsightsAudienceDefinitionH\x00\x12^\n\x14\x61udience_description\x18\x07 \x01(\x0b\x32>.google.ads.googleads.v25.services.InsightsAudienceDescriptionH\x00\x42\x10\n\x0e\x61udience_input\"\x80\x01\n*GenerateSuggestedTargetingInsightsResponse\x12R\n\x0bsuggestions\x18\x01 \x03(\x0b\x32=.google.ads.googleads.v25.services.TargetingSuggestionMetrics\"\xe4\x03\n\x1aTargetingSuggestionMetrics\x12U\n\tlocations\x18\t \x03(\x0b\x32\x42.google.ads.googleads.v25.common.AudienceInsightsAttributeMetadata\x12\x41\n\nage_ranges\x18\x02 \x03(\x0b\x32-.google.ads.googleads.v25.common.AgeRangeInfo\x12;\n\x06gender\x18\x03 \x01(\x0b\x32+.google.ads.googleads.v25.common.GenderInfo\x12L\n\x0fparental_status\x18\x08 \x01(\x0b\x32\x33.google.ads.googleads.v25.common.ParentalStatusInfo\x12_\n\x0euser_interests\x18\x0b \x03(\x0b\x32G.google.ads.googleads.v25.common.AudienceInsightsAttributeMetadataGroup\x12\x10\n\x08\x63overage\x18\x05 \x01(\x01\x12\r\n\x05index\x18\x06 \x01(\x01\x12\x1f\n\x17potential_youtube_reach\x18\x07 \x01(\x03\"\xeb\x04\n%ListAudienceInsightsAttributesRequest\x12\x18\n\x0b\x63ustomer_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12p\n\ndimensions\x18\x02 \x03(\x0e\x32W.google.ads.googleads.v25.enums.AudienceInsightsDimensionEnum.AudienceInsightsDimensionB\x03\xe0\x41\x02\x12\x17\n\nquery_text\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x1f\n\x17\x63ustomer_insights_group\x18\x04 \x01(\t\x12\x62\n\x19insights_application_info\x18\x07 \x01(\x0b\x32:.google.ads.googleads.v25.common.AdditionalApplicationInfoB\x03\xe0\x41\x01\x12O\n\x18location_country_filters\x18\x05 \x03(\x0b\x32-.google.ads.googleads.v25.common.LocationInfo\x12M\n\x16youtube_reach_location\x18\x06 \x01(\x0b\x32-.google.ads.googleads.v25.common.LocationInfo\x12x\n%knowledge_graph_entity_search_options\x18\x08 \x01(\x0b\x32\x44.google.ads.googleads.v25.services.KnowledgeGraphEntitySearchOptionsB\x03\xe0\x41\x01\"\xec\x02\n!KnowledgeGraphEntitySearchOptions\x12\'\n\x1aget_all_creator_attributes\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01\x12m\n\rsearch_filter\x18\x02 \x01(\x0b\x32Q.google.ads.googleads.v25.services.KnowledgeGraphEntitySearchOptions.SearchFilterB\x03\xe0\x41\x01\x1a\xae\x01\n\x0cSearchFilter\x12\x9d\x01\n\x19\x65ntity_capability_filters\x18\x01 \x03(\x0e\x32u.google.ads.googleads.v25.enums.InsightsKnowledgeGraphEntityCapabilitiesEnum.InsightsKnowledgeGraphEntityCapabilitiesB\x03\xe0\x41\x01\"\x80\x01\n&ListAudienceInsightsAttributesResponse\x12V\n\nattributes\x18\x02 \x03(\x0b\x32\x42.google.ads.googleads.v25.common.AudienceInsightsAttributeMetadata\"\x86\x01\n ListInsightsEligibleDatesRequest\x12\x62\n\x19insights_application_info\x18\x01 \x01(\x0b\x32:.google.ads.googleads.v25.common.AdditionalApplicationInfoB\x03\xe0\x41\x01\"~\n!ListInsightsEligibleDatesResponse\x12\x13\n\x0b\x64\x61ta_months\x18\x01 \x03(\t\x12\x44\n\x10last_thirty_days\x18\x02 \x01(\x0b\x32*.google.ads.googleads.v25.common.DateRange\"\xe3\x03\n&GenerateAudienceOverlapInsightsRequest\x12\x18\n\x0b\x63ustomer_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12L\n\x10\x63ountry_location\x18\x02 \x01(\x0b\x32-.google.ads.googleads.v25.common.LocationInfoB\x03\xe0\x41\x02\x12Z\n\x11primary_attribute\x18\x06 \x01(\x0b\x32:.google.ads.googleads.v25.common.AudienceInsightsAttributeB\x03\xe0\x41\x02\x12p\n\ndimensions\x18\x04 \x03(\x0e\x32W.google.ads.googleads.v25.enums.AudienceInsightsDimensionEnum.AudienceInsightsDimensionB\x03\xe0\x41\x02\x12\x1f\n\x17\x63ustomer_insights_group\x18\x05 \x01(\t\x12\x62\n\x19insights_application_info\x18\x07 \x01(\x0b\x32:.google.ads.googleads.v25.common.AdditionalApplicationInfoB\x03\xe0\x41\x01\"\xe7\x01\n\'GenerateAudienceOverlapInsightsResponse\x12\x66\n\x1aprimary_attribute_metadata\x18\x03 \x01(\x0b\x32\x42.google.ads.googleads.v25.common.AudienceInsightsAttributeMetadata\x12T\n\x11\x64imension_results\x18\x02 \x03(\x0b\x32\x39.google.ads.googleads.v25.services.DimensionOverlapResult\"\xcb\x01\n\x16\x44imensionOverlapResult\x12j\n\tdimension\x18\x01 \x01(\x0e\x32W.google.ads.googleads.v25.enums.AudienceInsightsDimensionEnum.AudienceInsightsDimension\x12\x45\n\x05items\x18\x02 \x03(\x0b\x32\x36.google.ads.googleads.v25.services.AudienceOverlapItem\"\xa3\x01\n\x13\x41udienceOverlapItem\x12^\n\x12\x61ttribute_metadata\x18\x03 \x01(\x0b\x32\x42.google.ads.googleads.v25.common.AudienceInsightsAttributeMetadata\x12,\n$potential_youtube_reach_intersection\x18\x02 \x01(\x03\"\x9c\x02\n)GenerateTargetingSuggestionMetricsRequest\x12\x18\n\x0b\x63ustomer_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12K\n\taudiences\x18\x05 \x03(\x0b\x32\x33.google.ads.googleads.v25.services.InsightsAudienceB\x03\xe0\x41\x02\x12$\n\x17\x63ustomer_insights_group\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x62\n\x19insights_application_info\x18\x04 \x01(\x0b\x32:.google.ads.googleads.v25.common.AdditionalApplicationInfoB\x03\xe0\x41\x01\"\x80\x01\n*GenerateTargetingSuggestionMetricsResponse\x12R\n\x0bsuggestions\x18\x01 \x03(\x0b\x32=.google.ads.googleads.v25.services.TargetingSuggestionMetrics\"\xaa\x02\n!GenerateAudienceDefinitionRequest\x12\x18\n\x0b\x63ustomer_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x61\n\x14\x61udience_description\x18\x02 \x01(\x0b\x32>.google.ads.googleads.v25.services.InsightsAudienceDescriptionB\x03\xe0\x41\x02\x12$\n\x17\x63ustomer_insights_group\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x62\n\x19insights_application_info\x18\x04 \x01(\x0b\x32:.google.ads.googleads.v25.common.AdditionalApplicationInfoB\x03\xe0\x41\x01\"\xf4\x01\n\"GenerateAudienceDefinitionResponse\x12\x65\n\x19high_relevance_attributes\x18\x01 \x03(\x0b\x32\x42.google.ads.googleads.v25.common.AudienceInsightsAttributeMetadata\x12g\n\x1bmedium_relevance_attributes\x18\x02 \x03(\x0b\x32\x42.google.ads.googleads.v25.common.AudienceInsightsAttributeMetadata\"\x8e\x01\n\x1a\x41udienceInsightsDimensions\x12p\n\ndimensions\x18\x01 \x03(\x0e\x32W.google.ads.googleads.v25.enums.AudienceInsightsDimensionEnum.AudienceInsightsDimensionB\x03\xe0\x41\x02\"\xd6\x01\n\x1aInsightsAudienceDefinition\x12J\n\x08\x61udience\x18\x01 \x01(\x0b\x32\x33.google.ads.googleads.v25.services.InsightsAudienceB\x03\xe0\x41\x02\x12S\n\x11\x62\x61seline_audience\x18\x02 \x01(\x0b\x32\x33.google.ads.googleads.v25.services.InsightsAudienceB\x03\xe0\x41\x01\x12\x17\n\ndata_month\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\x92\x03\n\x1bInsightsAudienceDescription\x12M\n\x11\x63ountry_locations\x18\x01 \x03(\x0b\x32-.google.ads.googleads.v25.common.LocationInfoB\x03\xe0\x41\x02\x12!\n\x14\x61udience_description\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x8d\x01\n\x13marketing_objective\x18\x04 \x01(\x0e\x32i.google.ads.googleads.v25.enums.AudienceInsightsMarketingObjectiveEnum.AudienceInsightsMarketingObjectiveB\x03\xe0\x41\x01H\x00\x12\x61\n\x13\x61udience_dimensions\x18\x05 \x01(\x0b\x32=.google.ads.googleads.v25.services.AudienceInsightsDimensionsB\x03\xe0\x41\x01H\x00\x42\x0e\n\x0coutput_types\"\xb8\x05\n\x10InsightsAudience\x12M\n\x11\x63ountry_locations\x18\x01 \x03(\x0b\x32-.google.ads.googleads.v25.common.LocationInfoB\x03\xe0\x41\x02\x12L\n\x15sub_country_locations\x18\x02 \x03(\x0b\x32-.google.ads.googleads.v25.common.LocationInfo\x12;\n\x06gender\x18\x03 \x01(\x0b\x32+.google.ads.googleads.v25.common.GenderInfo\x12\x41\n\nage_ranges\x18\x04 \x03(\x0b\x32-.google.ads.googleads.v25.common.AgeRangeInfo\x12L\n\x0fparental_status\x18\x05 \x01(\x0b\x32\x33.google.ads.googleads.v25.common.ParentalStatusInfo\x12G\n\rincome_ranges\x18\x06 \x03(\x0b\x32\x30.google.ads.googleads.v25.common.IncomeRangeInfo\x12H\n\x07lineups\x18\n \x03(\x0b\x32\x37.google.ads.googleads.v25.common.AudienceInsightsLineup\x12@\n\tuser_list\x18\x0b \x01(\x0b\x32-.google.ads.googleads.v25.common.UserListInfo\x12\x64\n\x1btopic_audience_combinations\x18\x0c \x03(\x0b\x32?.google.ads.googleads.v25.common.InsightsAudienceAttributeGroup\"\xc7\x02\n\x1a\x41udienceCompositionSection\x12j\n\tdimension\x18\x01 \x01(\x0e\x32W.google.ads.googleads.v25.enums.AudienceInsightsDimensionEnum.AudienceInsightsDimension\x12W\n\x0etop_attributes\x18\x03 \x03(\x0b\x32?.google.ads.googleads.v25.services.AudienceCompositionAttribute\x12\x64\n\x14\x63lustered_attributes\x18\x04 \x03(\x0b\x32\x46.google.ads.googleads.v25.services.AudienceCompositionAttributeCluster\"\xf0\x01\n#AudienceCompositionAttributeCluster\x12\x1c\n\x14\x63luster_display_name\x18\x01 \x01(\t\x12V\n\x0f\x63luster_metrics\x18\x03 \x01(\x0b\x32=.google.ads.googleads.v25.services.AudienceCompositionMetrics\x12S\n\nattributes\x18\x04 \x03(\x0b\x32?.google.ads.googleads.v25.services.AudienceCompositionAttribute\"s\n\x1a\x41udienceCompositionMetrics\x12\x1f\n\x17\x62\x61seline_audience_share\x18\x01 \x01(\x01\x12\x16\n\x0e\x61udience_share\x18\x02 \x01(\x01\x12\r\n\x05index\x18\x03 \x01(\x01\x12\r\n\x05score\x18\x04 \x01(\x01\"\xce\x01\n\x1c\x41udienceCompositionAttribute\x12^\n\x12\x61ttribute_metadata\x18\x03 \x01(\x0b\x32\x42.google.ads.googleads.v25.common.AudienceInsightsAttributeMetadata\x12N\n\x07metrics\x18\x02 \x01(\x0b\x32=.google.ads.googleads.v25.services.AudienceCompositionMetrics2\xe5\x12\n\x17\x41udienceInsightsService\x12\xa9\x02\n\x1cGenerateInsightsFinderReport\x12\x46.google.ads.googleads.v25.services.GenerateInsightsFinderReportRequest\x1aG.google.ads.googleads.v25.services.GenerateInsightsFinderReportResponse\"x\xda\x41/customer_id,baseline_audience,specific_audience\x82\xd3\xe4\x93\x02@\";/v25/customers/{customer_id=*}:generateInsightsFinderReport:\x01*\x12\xa5\x02\n\x1eListAudienceInsightsAttributes\x12H.google.ads.googleads.v25.services.ListAudienceInsightsAttributesRequest\x1aI.google.ads.googleads.v25.services.ListAudienceInsightsAttributesResponse\"n\xda\x41!customer_id,dimensions,query_text\x82\xd3\xe4\x93\x02\x44\"?/v25/customers/{customer_id=*}:searchAudienceInsightsAttributes:\x01*\x12\xe2\x01\n\x19ListInsightsEligibleDates\x12\x43.google.ads.googleads.v25.services.ListInsightsEligibleDatesRequest\x1a\x44.google.ads.googleads.v25.services.ListInsightsEligibleDatesResponse\":\x82\xd3\xe4\x93\x02\x34\"//v25/audienceInsights:listInsightsEligibleDates:\x01*\x12\xb5\x02\n#GenerateAudienceCompositionInsights\x12M.google.ads.googleads.v25.services.GenerateAudienceCompositionInsightsRequest\x1aN.google.ads.googleads.v25.services.GenerateAudienceCompositionInsightsResponse\"o\xda\x41\x1f\x63ustomer_id,audience,dimensions\x82\xd3\xe4\x93\x02G\"B/v25/customers/{customer_id=*}:generateAudienceCompositionInsights:\x01*\x12\x92\x02\n\x1aGenerateAudienceDefinition\x12\x44.google.ads.googleads.v25.services.GenerateAudienceDefinitionRequest\x1a\x45.google.ads.googleads.v25.services.GenerateAudienceDefinitionResponse\"g\xda\x41 customer_id,audience_description\x82\xd3\xe4\x93\x02>\"9/v25/customers/{customer_id=*}:generateAudienceDefinition:\x01*\x12\x8f\x02\n\"GenerateSuggestedTargetingInsights\x12L.google.ads.googleads.v25.services.GenerateSuggestedTargetingInsightsRequest\x1aM.google.ads.googleads.v25.services.GenerateSuggestedTargetingInsightsResponse\"L\x82\xd3\xe4\x93\x02\x46\"A/v25/customers/{customer_id=*}:generateSuggestedTargetingInsights:\x01*\x12\xc0\x02\n\x1fGenerateAudienceOverlapInsights\x12I.google.ads.googleads.v25.services.GenerateAudienceOverlapInsightsRequest\x1aJ.google.ads.googleads.v25.services.GenerateAudienceOverlapInsightsResponse\"\x85\x01\xda\x41\x39\x63ustomer_id,country_location,primary_attribute,dimensions\x82\xd3\xe4\x93\x02\x43\">/v25/customers/{customer_id=*}:generateAudienceOverlapInsights:\x01*\x12\xa7\x02\n\"GenerateTargetingSuggestionMetrics\x12L.google.ads.googleads.v25.services.GenerateTargetingSuggestionMetricsRequest\x1aM.google.ads.googleads.v25.services.GenerateTargetingSuggestionMetricsResponse\"d\xda\x41\x15\x63ustomer_id,audiences\x82\xd3\xe4\x93\x02\x46\"A/v25/customers/{customer_id=*}:generateTargetingSuggestionMetrics:\x01*\x1a\x45\xca\x41\x18googleads.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/adwordsB\x88\x02\n%com.google.ads.googleads.v25.servicesB\x1c\x41udienceInsightsServiceProtoP\x01ZIgoogle.golang.org/genproto/googleapis/ads/googleads/v25/services;services\xa2\x02\x03GAA\xaa\x02!Google.Ads.GoogleAds.V25.Services\xca\x02!Google\\Ads\\GoogleAds\\V25\\Services\xea\x02%Google::Ads::GoogleAds::V25::Servicesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Services + GenerateInsightsFinderReportRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.GenerateInsightsFinderReportRequest").msgclass + GenerateInsightsFinderReportResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.GenerateInsightsFinderReportResponse").msgclass + GenerateAudienceCompositionInsightsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.GenerateAudienceCompositionInsightsRequest").msgclass + GenerateAudienceCompositionInsightsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.GenerateAudienceCompositionInsightsResponse").msgclass + GenerateSuggestedTargetingInsightsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.GenerateSuggestedTargetingInsightsRequest").msgclass + GenerateSuggestedTargetingInsightsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.GenerateSuggestedTargetingInsightsResponse").msgclass + TargetingSuggestionMetrics = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.TargetingSuggestionMetrics").msgclass + ListAudienceInsightsAttributesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.ListAudienceInsightsAttributesRequest").msgclass + KnowledgeGraphEntitySearchOptions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.KnowledgeGraphEntitySearchOptions").msgclass + KnowledgeGraphEntitySearchOptions::SearchFilter = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.KnowledgeGraphEntitySearchOptions.SearchFilter").msgclass + ListAudienceInsightsAttributesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.ListAudienceInsightsAttributesResponse").msgclass + ListInsightsEligibleDatesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.ListInsightsEligibleDatesRequest").msgclass + ListInsightsEligibleDatesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.ListInsightsEligibleDatesResponse").msgclass + GenerateAudienceOverlapInsightsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.GenerateAudienceOverlapInsightsRequest").msgclass + GenerateAudienceOverlapInsightsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.GenerateAudienceOverlapInsightsResponse").msgclass + DimensionOverlapResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.DimensionOverlapResult").msgclass + AudienceOverlapItem = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.AudienceOverlapItem").msgclass + GenerateTargetingSuggestionMetricsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.GenerateTargetingSuggestionMetricsRequest").msgclass + GenerateTargetingSuggestionMetricsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.GenerateTargetingSuggestionMetricsResponse").msgclass + GenerateAudienceDefinitionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.GenerateAudienceDefinitionRequest").msgclass + GenerateAudienceDefinitionResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.GenerateAudienceDefinitionResponse").msgclass + AudienceInsightsDimensions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.AudienceInsightsDimensions").msgclass + InsightsAudienceDefinition = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.InsightsAudienceDefinition").msgclass + InsightsAudienceDescription = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.InsightsAudienceDescription").msgclass + InsightsAudience = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.InsightsAudience").msgclass + AudienceCompositionSection = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.AudienceCompositionSection").msgclass + AudienceCompositionAttributeCluster = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.AudienceCompositionAttributeCluster").msgclass + AudienceCompositionMetrics = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.AudienceCompositionMetrics").msgclass + AudienceCompositionAttribute = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.AudienceCompositionAttribute").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/audience_insights_service_services_pb.rb b/lib/google/ads/google_ads/v25/services/audience_insights_service_services_pb.rb new file mode 100644 index 000000000..a62cdf6ff --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/audience_insights_service_services_pb.rb @@ -0,0 +1,158 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/ads/googleads/v25/services/audience_insights_service.proto for package 'Google.Ads.GoogleAds.V25.Services' +# Original file comments: +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +require 'grpc' +require 'google/ads/google_ads/v25/services/audience_insights_service_pb' + +module Google + module Ads + module GoogleAds + module V25 + module Services + module AudienceInsightsService + # Proto file describing the audience insights service. + # + # Audience Insights Service helps users find information about groups of + # people and how they can be reached with Google Ads. Accessible to + # allowlisted customers only. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.ads.googleads.v25.services.AudienceInsightsService' + + # Creates a saved report that can be viewed in the Insights Finder tool. + # + # List of thrown errors: + # [AuthenticationError]() + # [AuthorizationError]() + # [FieldError]() + # [HeaderError]() + # [InternalError]() + # [QuotaError]() + # [RangeError]() + # [RequestError]() + rpc :GenerateInsightsFinderReport, ::Google::Ads::GoogleAds::V25::Services::GenerateInsightsFinderReportRequest, ::Google::Ads::GoogleAds::V25::Services::GenerateInsightsFinderReportResponse + # Searches for audience attributes that can be used to generate insights. + # + # List of thrown errors: + # [AuthenticationError]() + # [AuthorizationError]() + # [FieldError]() + # [HeaderError]() + # [InternalError]() + # [QuotaError]() + # [RangeError]() + # [RequestError]() + rpc :ListAudienceInsightsAttributes, ::Google::Ads::GoogleAds::V25::Services::ListAudienceInsightsAttributesRequest, ::Google::Ads::GoogleAds::V25::Services::ListAudienceInsightsAttributesResponse + # Lists date ranges for which audience insights data can be requested. + # + # List of thrown errors: + # [AuthenticationError]() + # [AuthorizationError]() + # [FieldError]() + # [HeaderError]() + # [InternalError]() + # [QuotaError]() + # [RangeError]() + # [RequestError]() + rpc :ListInsightsEligibleDates, ::Google::Ads::GoogleAds::V25::Services::ListInsightsEligibleDatesRequest, ::Google::Ads::GoogleAds::V25::Services::ListInsightsEligibleDatesResponse + # Returns a collection of attributes that are represented in an audience of + # interest, with metrics that compare each attribute's share of the audience + # with its share of a baseline audience. + # + # List of thrown errors: + # [AudienceInsightsError]() + # [AuthenticationError]() + # [AuthorizationError]() + # [FieldError]() + # [HeaderError]() + # [InternalError]() + # [QuotaError]() + # [RangeError]() + # [RequestError]() + rpc :GenerateAudienceCompositionInsights, ::Google::Ads::GoogleAds::V25::Services::GenerateAudienceCompositionInsightsRequest, ::Google::Ads::GoogleAds::V25::Services::GenerateAudienceCompositionInsightsResponse + # Returns a collection of audience attributes using generative AI based on + # the provided audience description. + # + # List of thrown errors: + # [AudienceInsightsError]() + # [AuthenticationError]() + # [AuthorizationError]() + # [FieldError]() + # [HeaderError]() + # [InternalError]() + # [QuotaError]() + # [RequestError]() + rpc :GenerateAudienceDefinition, ::Google::Ads::GoogleAds::V25::Services::GenerateAudienceDefinitionRequest, ::Google::Ads::GoogleAds::V25::Services::GenerateAudienceDefinitionResponse + # Returns a collection of targeting insights (e.g. targetable audiences) that + # are relevant to the requested audience. + # + # List of thrown errors: + # [AudienceInsightsError]() + # [AuthenticationError]() + # [AuthorizationError]() + # [FieldError]() + # [HeaderError]() + # [InternalError]() + # [QuotaError]() + # [RangeError]() + # [RequestError]() + rpc :GenerateSuggestedTargetingInsights, ::Google::Ads::GoogleAds::V25::Services::GenerateSuggestedTargetingInsightsRequest, ::Google::Ads::GoogleAds::V25::Services::GenerateSuggestedTargetingInsightsResponse + # Returns a collection of audience attributes along with estimates of the + # overlap between their potential YouTube reach and that of a given input + # attribute. + # + # List of thrown errors: + # [AudienceInsightsError]() + # [AuthenticationError]() + # [AuthorizationError]() + # [FieldError]() + # [HeaderError]() + # [InternalError]() + # [QuotaError]() + # [RangeError]() + # [RequestError]() + rpc :GenerateAudienceOverlapInsights, ::Google::Ads::GoogleAds::V25::Services::GenerateAudienceOverlapInsightsRequest, ::Google::Ads::GoogleAds::V25::Services::GenerateAudienceOverlapInsightsResponse + # Returns potential reach metrics for targetable audiences. + # + # This method helps answer questions like "How many Men aged 18+ interested + # in Camping can be reached on YouTube?" + # + # List of thrown errors: + # [AudienceInsightsError]() + # [AuthenticationError]() + # [AuthorizationError]() + # [FieldError]() + # [HeaderError]() + # [InternalError]() + # [QuotaError]() + # [RangeError]() + # [RequestError]() + rpc :GenerateTargetingSuggestionMetrics, ::Google::Ads::GoogleAds::V25::Services::GenerateTargetingSuggestionMetricsRequest, ::Google::Ads::GoogleAds::V25::Services::GenerateTargetingSuggestionMetricsResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/audience_service.rb b/lib/google/ads/google_ads/v25/services/audience_service.rb new file mode 100644 index 000000000..e020eba50 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/audience_service.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/ads/google_ads/version" + +require "google/ads/google_ads/v25/services/audience_service/credentials" +require "google/ads/google_ads/v25/services/audience_service/paths" +require "google/ads/google_ads/v25/services/audience_service/client" + +module Google + module Ads + module GoogleAds + module V25 + module Services + ## + # Service to manage audiences. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/ads/google_ads/v25/services/audience_service" + # client = ::Google::Ads::GoogleAds::V25::Services::AudienceService::Client.new + # + module AudienceService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "audience_service", "helpers.rb" +require "google/ads/google_ads/v25/services/audience_service/helpers" if ::File.file? helper_path diff --git a/lib/google/ads/google_ads/v25/services/audience_service/client.rb b/lib/google/ads/google_ads/v25/services/audience_service/client.rb new file mode 100644 index 000000000..ded4a4506 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/audience_service/client.rb @@ -0,0 +1,492 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# require "google/ads/google_ads/error" +require "google/ads/google_ads/v25/services/audience_service_pb" + +module Google + module Ads + module GoogleAds + module V25 + module Services + module AudienceService + ## + # Client for the AudienceService service. + # + # Service to manage audiences. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "googleads.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :audience_service_stub + + ## + # Configure the AudienceService Client class. + # + # See {::Google::Ads::GoogleAds::V25::Services::AudienceService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all AudienceService clients + # ::Google::Ads::GoogleAds::V25::Services::AudienceService::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + default_config = Client::Configuration.new + + default_config.timeout = 14_400.0 + default_config.retry_policy = { + initial_delay: 5.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the AudienceService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Ads::GoogleAds::V25::Services::AudienceService::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @audience_service_stub.universe_domain + end + + ## + # Create a new AudienceService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Ads::GoogleAds::V25::Services::AudienceService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Ads::GoogleAds::V25::Services::AudienceService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the AudienceService client. + # @yieldparam config [Client::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/ads/google_ads/v25/services/audience_service_services_pb" + + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @audience_service_stub = ::Gapic::ServiceStub.new( + ::Google::Ads::GoogleAds::V25::Services::AudienceService::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool, + logger: @config.logger + ) + + @audience_service_stub.stub_logger&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @audience_service_stub.logger + end + + # Service calls + + ## + # Creates audiences. Operation statuses are returned. + # + # List of thrown errors: + # [AudienceError]() + # + # @overload mutate_audiences(request, options = nil) + # Pass arguments to `mutate_audiences` via a request object, either of type + # {::Google::Ads::GoogleAds::V25::Services::MutateAudiencesRequest} or an equivalent Hash. + # + # @param request [::Google::Ads::GoogleAds::V25::Services::MutateAudiencesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload mutate_audiences(customer_id: nil, operations: nil, partial_failure: nil, validate_only: nil, response_content_type: nil) + # Pass arguments to `mutate_audiences` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param customer_id [::String] + # Required. The ID of the customer whose audiences are being modified. + # @param operations [::Array<::Google::Ads::GoogleAds::V25::Services::AudienceOperation, ::Hash>] + # Required. The list of operations to perform on individual audiences. + # @param partial_failure [::Boolean] + # 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. + # @param validate_only [::Boolean] + # If true, the request is validated but not executed. Only errors are + # returned, not results. + # @param response_content_type [::Google::Ads::GoogleAds::V25::Enums::ResponseContentTypeEnum::ResponseContentType] + # The response content type setting. Determines whether the mutable resource + # or just the resource name should be returned post mutation. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Ads::GoogleAds::V25::Services::MutateAudiencesResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Ads::GoogleAds::V25::Services::MutateAudiencesResponse] + # + # @raise [Google::Ads::GoogleAds::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/ads/google_ads/v25/services" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Ads::GoogleAds::V25::Services::AudienceService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Ads::GoogleAds::V25::Services::MutateAudiencesRequest.new + # + # # Call the mutate_audiences method. + # result = client.mutate_audiences request + # + # # The returned object is of type Google::Ads::GoogleAds::V25::Services::MutateAudiencesResponse. + # p result + # + def mutate_audiences request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::GoogleAds::V25::Services::MutateAudiencesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.mutate_audiences.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Ads::GoogleAds::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.customer_id + header_params["customer_id"] = request.customer_id + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.mutate_audiences.timeout, + metadata: metadata, + retry_policy: @config.rpcs.mutate_audiences.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @audience_service_stub.call_rpc :mutate_audiences, request, options: options do |response, operation| + yield response, operation if block_given? + end + # rescue GRPC::BadStatus => grpc_error + # raise Google::Ads::GoogleAds::Error.new grpc_error.message + end + + ## + # Configuration class for the AudienceService API. + # + # This class represents the configuration for AudienceService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Ads::GoogleAds::V25::Services::AudienceService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # mutate_audiences to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Ads::GoogleAds::V25::Services::AudienceService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.mutate_audiences.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Ads::GoogleAds::V25::Services::AudienceService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.mutate_audiences.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Ads::GoogleAds::V25::Services::AudienceService::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "googleads.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, + ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the AudienceService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `mutate_audiences` + # @return [::Gapic::Config::Method] + # + attr_reader :mutate_audiences + + # @private + def initialize parent_rpcs = nil + mutate_audiences_config = parent_rpcs.mutate_audiences if parent_rpcs.respond_to? :mutate_audiences + @mutate_audiences = ::Gapic::Config::Method.new mutate_audiences_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/audience_service/credentials.rb b/lib/google/ads/google_ads/v25/services/audience_service/credentials.rb new file mode 100644 index 000000000..0ce02b4d1 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/audience_service/credentials.rb @@ -0,0 +1,38 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Ads + module GoogleAds + module V25 + module Services + module AudienceService + # Credentials for the AudienceService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/adwords" + ] + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/audience_service/paths.rb b/lib/google/ads/google_ads/v25/services/audience_service/paths.rb new file mode 100644 index 000000000..356fb2108 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/audience_service/paths.rb @@ -0,0 +1,103 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Ads + module GoogleAds + module V25 + module Services + module AudienceService + # Path helper methods for the AudienceService API. + module Paths + ## + # Create a fully-qualified AssetGroup resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/assetGroups/{asset_group_id}` + # + # @param customer_id [String] + # @param asset_group_id [String] + # + # @return [::String] + def asset_group_path customer_id:, asset_group_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/assetGroups/#{asset_group_id}" + end + + ## + # Create a fully-qualified Audience resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/audiences/{audience_id}` + # + # @param customer_id [String] + # @param audience_id [String] + # + # @return [::String] + def audience_path customer_id:, audience_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/audiences/#{audience_id}" + end + + ## + # Create a fully-qualified DetailedDemographic resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/detailedDemographics/{detailed_demographic_id}` + # + # @param customer_id [String] + # @param detailed_demographic_id [String] + # + # @return [::String] + def detailed_demographic_path customer_id:, detailed_demographic_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/detailedDemographics/#{detailed_demographic_id}" + end + + ## + # Create a fully-qualified LifeEvent resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/lifeEvents/{life_event_id}` + # + # @param customer_id [String] + # @param life_event_id [String] + # + # @return [::String] + def life_event_path customer_id:, life_event_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/lifeEvents/#{life_event_id}" + end + + extend self + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/audience_service_pb.rb b/lib/google/ads/google_ads/v25/services/audience_service_pb.rb new file mode 100644 index 000000000..8e6ad6a36 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/audience_service_pb.rb @@ -0,0 +1,35 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/services/audience_service.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/enums/response_content_type_pb' +require 'google/ads/google_ads/v25/resources/audience_pb' +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/field_mask_pb' +require 'google/rpc/status_pb' + + +descriptor_data = "\n8google/ads/googleads/v25/services/audience_service.proto\x12!google.ads.googleads.v25.services\x1a:google/ads/googleads/v25/enums/response_content_type.proto\x1a\x31google/ads/googleads/v25/resources/audience.proto\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\x1a\x17google/rpc/status.proto\"\x9d\x02\n\x16MutateAudiencesRequest\x12\x18\n\x0b\x63ustomer_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12M\n\noperations\x18\x02 \x03(\x0b\x32\x34.google.ads.googleads.v25.services.AudienceOperationB\x03\xe0\x41\x02\x12\x17\n\x0fpartial_failure\x18\x03 \x01(\x08\x12\x15\n\rvalidate_only\x18\x04 \x01(\x08\x12j\n\x15response_content_type\x18\x05 \x01(\x0e\x32K.google.ads.googleads.v25.enums.ResponseContentTypeEnum.ResponseContentType\"\x96\x01\n\x17MutateAudiencesResponse\x12H\n\x07results\x18\x01 \x03(\x0b\x32\x37.google.ads.googleads.v25.services.MutateAudienceResult\x12\x31\n\x15partial_failure_error\x18\x02 \x01(\x0b\x32\x12.google.rpc.Status\"\xd1\x01\n\x11\x41udienceOperation\x12/\n\x0bupdate_mask\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\x12>\n\x06\x63reate\x18\x01 \x01(\x0b\x32,.google.ads.googleads.v25.resources.AudienceH\x00\x12>\n\x06update\x18\x02 \x01(\x0b\x32,.google.ads.googleads.v25.resources.AudienceH\x00\x42\x0b\n\toperation\"\x95\x01\n\x14MutateAudienceResult\x12=\n\rresource_name\x18\x01 \x01(\tB&\xfa\x41#\n!googleads.googleapis.com/Audience\x12>\n\x08\x61udience\x18\x02 \x01(\x0b\x32,.google.ads.googleads.v25.resources.Audience2\xb8\x02\n\x0f\x41udienceService\x12\xdd\x01\n\x0fMutateAudiences\x12\x39.google.ads.googleads.v25.services.MutateAudiencesRequest\x1a:.google.ads.googleads.v25.services.MutateAudiencesResponse\"S\xda\x41\x16\x63ustomer_id,operations\x82\xd3\xe4\x93\x02\x34\"//v25/customers/{customer_id=*}/audiences:mutate:\x01*\x1a\x45\xca\x41\x18googleads.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/adwordsB\x80\x02\n%com.google.ads.googleads.v25.servicesB\x14\x41udienceServiceProtoP\x01ZIgoogle.golang.org/genproto/googleapis/ads/googleads/v25/services;services\xa2\x02\x03GAA\xaa\x02!Google.Ads.GoogleAds.V25.Services\xca\x02!Google\\Ads\\GoogleAds\\V25\\Services\xea\x02%Google::Ads::GoogleAds::V25::Servicesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Services + MutateAudiencesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.MutateAudiencesRequest").msgclass + MutateAudiencesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.MutateAudiencesResponse").msgclass + AudienceOperation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.AudienceOperation").msgclass + MutateAudienceResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.MutateAudienceResult").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/audience_service_services_pb.rb b/lib/google/ads/google_ads/v25/services/audience_service_services_pb.rb new file mode 100644 index 000000000..f85092749 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/audience_service_services_pb.rb @@ -0,0 +1,52 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/ads/googleads/v25/services/audience_service.proto for package 'Google.Ads.GoogleAds.V25.Services' +# Original file comments: +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +require 'grpc' +require 'google/ads/google_ads/v25/services/audience_service_pb' + +module Google + module Ads + module GoogleAds + module V25 + module Services + module AudienceService + # Proto file describing the Audience service. + # + # Service to manage audiences. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.ads.googleads.v25.services.AudienceService' + + # Creates audiences. Operation statuses are returned. + # + # List of thrown errors: + # [AudienceError]() + rpc :MutateAudiences, ::Google::Ads::GoogleAds::V25::Services::MutateAudiencesRequest, ::Google::Ads::GoogleAds::V25::Services::MutateAudiencesResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/automatically_created_asset_removal_service.rb b/lib/google/ads/google_ads/v25/services/automatically_created_asset_removal_service.rb new file mode 100644 index 000000000..6b83a99f7 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/automatically_created_asset_removal_service.rb @@ -0,0 +1,50 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/ads/google_ads/version" + +require "google/ads/google_ads/v25/services/automatically_created_asset_removal_service/credentials" +require "google/ads/google_ads/v25/services/automatically_created_asset_removal_service/client" + +module Google + module Ads + module GoogleAds + module V25 + module Services + ## + # Service to remove automatically created assets. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/ads/google_ads/v25/services/automatically_created_asset_removal_service" + # client = ::Google::Ads::GoogleAds::V25::Services::AutomaticallyCreatedAssetRemovalService::Client.new + # + module AutomaticallyCreatedAssetRemovalService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "automatically_created_asset_removal_service", "helpers.rb" +require "google/ads/google_ads/v25/services/automatically_created_asset_removal_service/helpers" if ::File.file? helper_path diff --git a/lib/google/ads/google_ads/v25/services/automatically_created_asset_removal_service/client.rb b/lib/google/ads/google_ads/v25/services/automatically_created_asset_removal_service/client.rb new file mode 100644 index 000000000..dcdf1119c --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/automatically_created_asset_removal_service/client.rb @@ -0,0 +1,493 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# require "google/ads/google_ads/error" +require "google/ads/google_ads/v25/services/automatically_created_asset_removal_service_pb" + +module Google + module Ads + module GoogleAds + module V25 + module Services + module AutomaticallyCreatedAssetRemovalService + ## + # Client for the AutomaticallyCreatedAssetRemovalService service. + # + # Service to remove automatically created assets. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "googleads.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :automatically_created_asset_removal_service_stub + + ## + # Configure the AutomaticallyCreatedAssetRemovalService Client class. + # + # See {::Google::Ads::GoogleAds::V25::Services::AutomaticallyCreatedAssetRemovalService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all AutomaticallyCreatedAssetRemovalService clients + # ::Google::Ads::GoogleAds::V25::Services::AutomaticallyCreatedAssetRemovalService::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + default_config = Client::Configuration.new + + default_config.timeout = 14_400.0 + default_config.retry_policy = { + initial_delay: 5.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the AutomaticallyCreatedAssetRemovalService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Ads::GoogleAds::V25::Services::AutomaticallyCreatedAssetRemovalService::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @automatically_created_asset_removal_service_stub.universe_domain + end + + ## + # Create a new AutomaticallyCreatedAssetRemovalService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Ads::GoogleAds::V25::Services::AutomaticallyCreatedAssetRemovalService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Ads::GoogleAds::V25::Services::AutomaticallyCreatedAssetRemovalService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the AutomaticallyCreatedAssetRemovalService client. + # @yieldparam config [Client::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/ads/google_ads/v25/services/automatically_created_asset_removal_service_services_pb" + + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @automatically_created_asset_removal_service_stub = ::Gapic::ServiceStub.new( + ::Google::Ads::GoogleAds::V25::Services::AutomaticallyCreatedAssetRemovalService::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool, + logger: @config.logger + ) + + @automatically_created_asset_removal_service_stub.stub_logger&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @automatically_created_asset_removal_service_stub.logger + end + + # Service calls + + ## + # Removes automatically created assets from a campaign. + # + # List of thrown errors: + # [AuthenticationError]() + # [AuthorizationError]() + # [ContextError]() + # [FieldError]() + # [InternalError]() + # [MutateError]() + # [PartialFailureError]() + # [QuotaError]() + # [RequestError]() + # + # @overload remove_campaign_automatically_created_asset(request, options = nil) + # Pass arguments to `remove_campaign_automatically_created_asset` via a request object, either of type + # {::Google::Ads::GoogleAds::V25::Services::RemoveCampaignAutomaticallyCreatedAssetRequest} or an equivalent Hash. + # + # @param request [::Google::Ads::GoogleAds::V25::Services::RemoveCampaignAutomaticallyCreatedAssetRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload remove_campaign_automatically_created_asset(customer_id: nil, operations: nil, partial_failure: nil) + # Pass arguments to `remove_campaign_automatically_created_asset` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param customer_id [::String] + # Required. The ID of the customer whose assets are being removed. + # @param operations [::Array<::Google::Ads::GoogleAds::V25::Services::RemoveCampaignAutomaticallyCreatedAssetOperation, ::Hash>] + # Required. The list of operations. + # @param partial_failure [::Boolean] + # Required. 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. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Ads::GoogleAds::V25::Services::RemoveCampaignAutomaticallyCreatedAssetResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Ads::GoogleAds::V25::Services::RemoveCampaignAutomaticallyCreatedAssetResponse] + # + # @raise [Google::Ads::GoogleAds::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/ads/google_ads/v25/services" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Ads::GoogleAds::V25::Services::AutomaticallyCreatedAssetRemovalService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Ads::GoogleAds::V25::Services::RemoveCampaignAutomaticallyCreatedAssetRequest.new + # + # # Call the remove_campaign_automatically_created_asset method. + # result = client.remove_campaign_automatically_created_asset request + # + # # The returned object is of type Google::Ads::GoogleAds::V25::Services::RemoveCampaignAutomaticallyCreatedAssetResponse. + # p result + # + def remove_campaign_automatically_created_asset request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::GoogleAds::V25::Services::RemoveCampaignAutomaticallyCreatedAssetRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.remove_campaign_automatically_created_asset.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Ads::GoogleAds::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.customer_id + header_params["customer_id"] = request.customer_id + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.remove_campaign_automatically_created_asset.timeout, + metadata: metadata, + retry_policy: @config.rpcs.remove_campaign_automatically_created_asset.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @automatically_created_asset_removal_service_stub.call_rpc :remove_campaign_automatically_created_asset, + request, options: options do |response, operation| + yield response, operation if block_given? + end + # rescue GRPC::BadStatus => grpc_error + # raise Google::Ads::GoogleAds::Error.new grpc_error.message + end + + ## + # Configuration class for the AutomaticallyCreatedAssetRemovalService API. + # + # This class represents the configuration for AutomaticallyCreatedAssetRemovalService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Ads::GoogleAds::V25::Services::AutomaticallyCreatedAssetRemovalService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # remove_campaign_automatically_created_asset to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Ads::GoogleAds::V25::Services::AutomaticallyCreatedAssetRemovalService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.remove_campaign_automatically_created_asset.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Ads::GoogleAds::V25::Services::AutomaticallyCreatedAssetRemovalService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.remove_campaign_automatically_created_asset.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Ads::GoogleAds::V25::Services::AutomaticallyCreatedAssetRemovalService::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "googleads.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, + ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the AutomaticallyCreatedAssetRemovalService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `remove_campaign_automatically_created_asset` + # @return [::Gapic::Config::Method] + # + attr_reader :remove_campaign_automatically_created_asset + + # @private + def initialize parent_rpcs = nil + remove_campaign_automatically_created_asset_config = parent_rpcs.remove_campaign_automatically_created_asset if parent_rpcs.respond_to? :remove_campaign_automatically_created_asset + @remove_campaign_automatically_created_asset = ::Gapic::Config::Method.new remove_campaign_automatically_created_asset_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/automatically_created_asset_removal_service/credentials.rb b/lib/google/ads/google_ads/v25/services/automatically_created_asset_removal_service/credentials.rb new file mode 100644 index 000000000..8378ed2ff --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/automatically_created_asset_removal_service/credentials.rb @@ -0,0 +1,38 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Ads + module GoogleAds + module V25 + module Services + module AutomaticallyCreatedAssetRemovalService + # Credentials for the AutomaticallyCreatedAssetRemovalService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/adwords" + ] + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/automatically_created_asset_removal_service_pb.rb b/lib/google/ads/google_ads/v25/services/automatically_created_asset_removal_service_pb.rb new file mode 100644 index 000000000..b02f77d71 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/automatically_created_asset_removal_service_pb.rb @@ -0,0 +1,31 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/services/automatically_created_asset_removal_service.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/enums/asset_field_type_pb' +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/rpc/status_pb' + + +descriptor_data = "\nSgoogle/ads/googleads/v25/services/automatically_created_asset_removal_service.proto\x12!google.ads.googleads.v25.services\x1a\x35google/ads/googleads/v25/enums/asset_field_type.proto\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x17google/rpc/status.proto\"\xd6\x01\n.RemoveCampaignAutomaticallyCreatedAssetRequest\x12\x18\n\x0b\x63ustomer_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12l\n\noperations\x18\x02 \x03(\x0b\x32S.google.ads.googleads.v25.services.RemoveCampaignAutomaticallyCreatedAssetOperationB\x03\xe0\x41\x02\x12\x1c\n\x0fpartial_failure\x18\x03 \x01(\x08\x42\x03\xe0\x41\x02\"\xb9\x01\n0RemoveCampaignAutomaticallyCreatedAssetOperation\x12\x15\n\x08\x63\x61mpaign\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x12\n\x05\x61sset\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12Z\n\nfield_type\x18\x03 \x01(\x0e\x32\x41.google.ads.googleads.v25.enums.AssetFieldTypeEnum.AssetFieldTypeB\x03\xe0\x41\x02\"d\n/RemoveCampaignAutomaticallyCreatedAssetResponse\x12\x31\n\x15partial_failure_error\x18\x01 \x01(\x0b\x32\x12.google.rpc.Status2\xbf\x03\n\'AutomaticallyCreatedAssetRemovalService\x12\xcc\x02\n\'RemoveCampaignAutomaticallyCreatedAsset\x12Q.google.ads.googleads.v25.services.RemoveCampaignAutomaticallyCreatedAssetRequest\x1aR.google.ads.googleads.v25.services.RemoveCampaignAutomaticallyCreatedAssetResponse\"z\xda\x41&customer_id,operations,partial_failure\x82\xd3\xe4\x93\x02K\"F/v25/customers/{customer_id=*}:removeCampaignAutomaticallyCreatedAsset:\x01*\x1a\x45\xca\x41\x18googleads.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/adwordsB\x98\x02\n%com.google.ads.googleads.v25.servicesB,AutomaticallyCreatedAssetRemovalServiceProtoP\x01ZIgoogle.golang.org/genproto/googleapis/ads/googleads/v25/services;services\xa2\x02\x03GAA\xaa\x02!Google.Ads.GoogleAds.V25.Services\xca\x02!Google\\Ads\\GoogleAds\\V25\\Services\xea\x02%Google::Ads::GoogleAds::V25::Servicesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Services + RemoveCampaignAutomaticallyCreatedAssetRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.RemoveCampaignAutomaticallyCreatedAssetRequest").msgclass + RemoveCampaignAutomaticallyCreatedAssetOperation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.RemoveCampaignAutomaticallyCreatedAssetOperation").msgclass + RemoveCampaignAutomaticallyCreatedAssetResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.RemoveCampaignAutomaticallyCreatedAssetResponse").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/automatically_created_asset_removal_service_services_pb.rb b/lib/google/ads/google_ads/v25/services/automatically_created_asset_removal_service_services_pb.rb new file mode 100644 index 000000000..73a31e75d --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/automatically_created_asset_removal_service_services_pb.rb @@ -0,0 +1,58 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/ads/googleads/v25/services/automatically_created_asset_removal_service.proto for package 'Google.Ads.GoogleAds.V25.Services' +# Original file comments: +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +require 'grpc' +require 'google/ads/google_ads/v25/services/automatically_created_asset_removal_service_pb' + +module Google + module Ads + module GoogleAds + module V25 + module Services + module AutomaticallyCreatedAssetRemovalService + # Service to remove automatically created assets. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.ads.googleads.v25.services.AutomaticallyCreatedAssetRemovalService' + + # Removes automatically created assets from a campaign. + # + # List of thrown errors: + # [AuthenticationError]() + # [AuthorizationError]() + # [ContextError]() + # [FieldError]() + # [InternalError]() + # [MutateError]() + # [PartialFailureError]() + # [QuotaError]() + # [RequestError]() + rpc :RemoveCampaignAutomaticallyCreatedAsset, ::Google::Ads::GoogleAds::V25::Services::RemoveCampaignAutomaticallyCreatedAssetRequest, ::Google::Ads::GoogleAds::V25::Services::RemoveCampaignAutomaticallyCreatedAssetResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/batch_job_service.rb b/lib/google/ads/google_ads/v25/services/batch_job_service.rb new file mode 100644 index 000000000..a03a59805 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/batch_job_service.rb @@ -0,0 +1,52 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/ads/google_ads/version" + +require "google/ads/google_ads/v25/services/batch_job_service/credentials" +require "google/ads/google_ads/v25/services/batch_job_service/paths" +require "google/ads/google_ads/v25/services/batch_job_service/operations" +require "google/ads/google_ads/v25/services/batch_job_service/client" + +module Google + module Ads + module GoogleAds + module V25 + module Services + ## + # Service to manage batch jobs. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/ads/google_ads/v25/services/batch_job_service" + # client = ::Google::Ads::GoogleAds::V25::Services::BatchJobService::Client.new + # + module BatchJobService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "batch_job_service", "helpers.rb" +require "google/ads/google_ads/v25/services/batch_job_service/helpers" if ::File.file? helper_path diff --git a/lib/google/ads/google_ads/v25/services/batch_job_service/client.rb b/lib/google/ads/google_ads/v25/services/batch_job_service/client.rb new file mode 100644 index 000000000..86c6c1cf1 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/batch_job_service/client.rb @@ -0,0 +1,861 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# require "google/ads/google_ads/error" +require "google/ads/google_ads/v25/services/batch_job_service_pb" + +module Google + module Ads + module GoogleAds + module V25 + module Services + module BatchJobService + ## + # Client for the BatchJobService service. + # + # Service to manage batch jobs. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "googleads.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :batch_job_service_stub + + ## + # Configure the BatchJobService Client class. + # + # See {::Google::Ads::GoogleAds::V25::Services::BatchJobService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all BatchJobService clients + # ::Google::Ads::GoogleAds::V25::Services::BatchJobService::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + default_config = Client::Configuration.new + + default_config.timeout = 14_400.0 + default_config.retry_policy = { + initial_delay: 5.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the BatchJobService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Ads::GoogleAds::V25::Services::BatchJobService::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @batch_job_service_stub.universe_domain + end + + ## + # Create a new BatchJobService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Ads::GoogleAds::V25::Services::BatchJobService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Ads::GoogleAds::V25::Services::BatchJobService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the BatchJobService client. + # @yieldparam config [Client::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/ads/google_ads/v25/services/batch_job_service_services_pb" + + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_client = Operations.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @config.endpoint + config.universe_domain = @config.universe_domain + end + + @batch_job_service_stub = ::Gapic::ServiceStub.new( + ::Google::Ads::GoogleAds::V25::Services::BatchJobService::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool, + logger: @config.logger + ) + + @batch_job_service_stub.stub_logger&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Ads::GoogleAds::V25::Services::BatchJobService::Operations] + # + attr_reader :operations_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @batch_job_service_stub.logger + end + + # Service calls + + ## + # Mutates a batch job. + # + # List of thrown errors: + # [AuthenticationError]() + # [AuthorizationError]() + # [HeaderError]() + # [InternalError]() + # [QuotaError]() + # [RequestError]() + # [ResourceCountLimitExceededError]() + # + # @overload mutate_batch_job(request, options = nil) + # Pass arguments to `mutate_batch_job` via a request object, either of type + # {::Google::Ads::GoogleAds::V25::Services::MutateBatchJobRequest} or an equivalent Hash. + # + # @param request [::Google::Ads::GoogleAds::V25::Services::MutateBatchJobRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload mutate_batch_job(customer_id: nil, operation: nil) + # Pass arguments to `mutate_batch_job` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param customer_id [::String] + # Required. The ID of the customer for which to create a batch job. + # @param operation [::Google::Ads::GoogleAds::V25::Services::BatchJobOperation, ::Hash] + # Required. The operation to perform on an individual batch job. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Ads::GoogleAds::V25::Services::MutateBatchJobResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Ads::GoogleAds::V25::Services::MutateBatchJobResponse] + # + # @raise [Google::Ads::GoogleAds::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/ads/google_ads/v25/services" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Ads::GoogleAds::V25::Services::BatchJobService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Ads::GoogleAds::V25::Services::MutateBatchJobRequest.new + # + # # Call the mutate_batch_job method. + # result = client.mutate_batch_job request + # + # # The returned object is of type Google::Ads::GoogleAds::V25::Services::MutateBatchJobResponse. + # p result + # + def mutate_batch_job request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::GoogleAds::V25::Services::MutateBatchJobRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.mutate_batch_job.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Ads::GoogleAds::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.customer_id + header_params["customer_id"] = request.customer_id + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.mutate_batch_job.timeout, + metadata: metadata, + retry_policy: @config.rpcs.mutate_batch_job.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @batch_job_service_stub.call_rpc :mutate_batch_job, request, options: options do |response, operation| + yield response, operation if block_given? + end + # rescue GRPC::BadStatus => grpc_error + # raise Google::Ads::GoogleAds::Error.new grpc_error.message + end + + ## + # Returns the results of the batch job. The job must be done. + # Supports standard list paging. + # + # List of thrown errors: + # [AuthenticationError]() + # [AuthorizationError]() + # [BatchJobError]() + # [HeaderError]() + # [InternalError]() + # [QuotaError]() + # [RequestError]() + # + # @overload list_batch_job_results(request, options = nil) + # Pass arguments to `list_batch_job_results` via a request object, either of type + # {::Google::Ads::GoogleAds::V25::Services::ListBatchJobResultsRequest} or an equivalent Hash. + # + # @param request [::Google::Ads::GoogleAds::V25::Services::ListBatchJobResultsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_batch_job_results(resource_name: nil, page_token: nil, page_size: nil, response_content_type: nil) + # Pass arguments to `list_batch_job_results` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param resource_name [::String] + # Required. The resource name of the batch job whose results are being + # listed. + # @param page_token [::String] + # 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. + # @param page_size [::Integer] + # Number of elements to retrieve in a single page. + # The default and the page_size limit is 1000. + # A value of 0 or an unset page size will be defaulted to 1000. + # A page size less than 0 or greater than 1000 will result in an + # INVALID_PAGE_SIZE error. + # @param response_content_type [::Google::Ads::GoogleAds::V25::Enums::ResponseContentTypeEnum::ResponseContentType] + # The response content type setting. Determines whether the mutable resource + # or just the resource name should be returned. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Ads::GoogleAds::V25::Services::BatchJobResult>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Ads::GoogleAds::V25::Services::BatchJobResult>] + # + # @raise [Google::Ads::GoogleAds::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/ads/google_ads/v25/services" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Ads::GoogleAds::V25::Services::BatchJobService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Ads::GoogleAds::V25::Services::ListBatchJobResultsRequest.new + # + # # Call the list_batch_job_results method. + # result = client.list_batch_job_results request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Ads::GoogleAds::V25::Services::BatchJobResult. + # p item + # end + # + def list_batch_job_results request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::GoogleAds::V25::Services::ListBatchJobResultsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_batch_job_results.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Ads::GoogleAds::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.resource_name + header_params["resource_name"] = request.resource_name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_batch_job_results.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_batch_job_results.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @batch_job_service_stub.call_rpc :list_batch_job_results, request, + options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @batch_job_service_stub, :list_batch_job_results, request, + response, operation, options + yield response, operation if block_given? + throw :response, response + end + # rescue GRPC::BadStatus => grpc_error + # raise Google::Ads::GoogleAds::Error.new grpc_error.message + end + + ## + # Runs the batch job. + # + # The Operation.metadata field type is BatchJobMetadata. When finished, the + # long running operation will not contain errors or a response. Instead, use + # ListBatchJobResults to get the results of the job. + # + # List of thrown errors: + # [AuthenticationError]() + # [AuthorizationError]() + # [BatchJobError]() + # [HeaderError]() + # [InternalError]() + # [QuotaError]() + # [RequestError]() + # + # @overload run_batch_job(request, options = nil) + # Pass arguments to `run_batch_job` via a request object, either of type + # {::Google::Ads::GoogleAds::V25::Services::RunBatchJobRequest} or an equivalent Hash. + # + # @param request [::Google::Ads::GoogleAds::V25::Services::RunBatchJobRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload run_batch_job(resource_name: nil) + # Pass arguments to `run_batch_job` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param resource_name [::String] + # Required. The resource name of the BatchJob to run. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [Google::Ads::GoogleAds::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/ads/google_ads/v25/services" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Ads::GoogleAds::V25::Services::BatchJobService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Ads::GoogleAds::V25::Services::RunBatchJobRequest.new + # + # # Call the run_batch_job method. + # result = client.run_batch_job request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def run_batch_job request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::GoogleAds::V25::Services::RunBatchJobRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.run_batch_job.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Ads::GoogleAds::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.resource_name + header_params["resource_name"] = request.resource_name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.run_batch_job.timeout, + metadata: metadata, + retry_policy: @config.rpcs.run_batch_job.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @batch_job_service_stub.call_rpc :run_batch_job, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + # rescue GRPC::BadStatus => grpc_error + # raise Google::Ads::GoogleAds::Error.new grpc_error.message + end + + ## + # Add operations to the batch job. + # + # List of thrown errors: + # [AuthenticationError]() + # [AuthorizationError]() + # [BatchJobError]() + # [HeaderError]() + # [InternalError]() + # [QuotaError]() + # [RequestError]() + # [ResourceCountLimitExceededError]() + # + # @overload add_batch_job_operations(request, options = nil) + # Pass arguments to `add_batch_job_operations` via a request object, either of type + # {::Google::Ads::GoogleAds::V25::Services::AddBatchJobOperationsRequest} or an equivalent Hash. + # + # @param request [::Google::Ads::GoogleAds::V25::Services::AddBatchJobOperationsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload add_batch_job_operations(resource_name: nil, sequence_token: nil, mutate_operations: nil) + # Pass arguments to `add_batch_job_operations` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param resource_name [::String] + # Required. The resource name of the batch job. + # @param sequence_token [::String] + # A token used to enforce sequencing. + # + # The first AddBatchJobOperations request for a batch job should not set + # sequence_token. Subsequent requests must set sequence_token to the value of + # next_sequence_token received in the previous AddBatchJobOperations + # response. + # @param mutate_operations [::Array<::Google::Ads::GoogleAds::V25::Services::MutateOperation, ::Hash>] + # Required. The list of mutates being added. + # + # Operations can use negative integers as temp ids to signify dependencies + # between entities created in this batch job. 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". + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Ads::GoogleAds::V25::Services::AddBatchJobOperationsResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Ads::GoogleAds::V25::Services::AddBatchJobOperationsResponse] + # + # @raise [Google::Ads::GoogleAds::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/ads/google_ads/v25/services" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Ads::GoogleAds::V25::Services::BatchJobService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Ads::GoogleAds::V25::Services::AddBatchJobOperationsRequest.new + # + # # Call the add_batch_job_operations method. + # result = client.add_batch_job_operations request + # + # # The returned object is of type Google::Ads::GoogleAds::V25::Services::AddBatchJobOperationsResponse. + # p result + # + def add_batch_job_operations request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::GoogleAds::V25::Services::AddBatchJobOperationsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.add_batch_job_operations.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Ads::GoogleAds::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.resource_name + header_params["resource_name"] = request.resource_name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.add_batch_job_operations.timeout, + metadata: metadata, + retry_policy: @config.rpcs.add_batch_job_operations.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @batch_job_service_stub.call_rpc :add_batch_job_operations, request, + options: options do |response, operation| + yield response, operation if block_given? + end + # rescue GRPC::BadStatus => grpc_error + # raise Google::Ads::GoogleAds::Error.new grpc_error.message + end + + ## + # Configuration class for the BatchJobService API. + # + # This class represents the configuration for BatchJobService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Ads::GoogleAds::V25::Services::BatchJobService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # mutate_batch_job to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Ads::GoogleAds::V25::Services::BatchJobService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.mutate_batch_job.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Ads::GoogleAds::V25::Services::BatchJobService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.mutate_batch_job.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Ads::GoogleAds::V25::Services::BatchJobService::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "googleads.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, + ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the BatchJobService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `mutate_batch_job` + # @return [::Gapic::Config::Method] + # + attr_reader :mutate_batch_job + ## + # RPC-specific configuration for `list_batch_job_results` + # @return [::Gapic::Config::Method] + # + attr_reader :list_batch_job_results + ## + # RPC-specific configuration for `run_batch_job` + # @return [::Gapic::Config::Method] + # + attr_reader :run_batch_job + ## + # RPC-specific configuration for `add_batch_job_operations` + # @return [::Gapic::Config::Method] + # + attr_reader :add_batch_job_operations + + # @private + def initialize parent_rpcs = nil + mutate_batch_job_config = parent_rpcs.mutate_batch_job if parent_rpcs.respond_to? :mutate_batch_job + @mutate_batch_job = ::Gapic::Config::Method.new mutate_batch_job_config + list_batch_job_results_config = parent_rpcs.list_batch_job_results if parent_rpcs.respond_to? :list_batch_job_results + @list_batch_job_results = ::Gapic::Config::Method.new list_batch_job_results_config + run_batch_job_config = parent_rpcs.run_batch_job if parent_rpcs.respond_to? :run_batch_job + @run_batch_job = ::Gapic::Config::Method.new run_batch_job_config + add_batch_job_operations_config = parent_rpcs.add_batch_job_operations if parent_rpcs.respond_to? :add_batch_job_operations + @add_batch_job_operations = ::Gapic::Config::Method.new add_batch_job_operations_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/batch_job_service/credentials.rb b/lib/google/ads/google_ads/v25/services/batch_job_service/credentials.rb new file mode 100644 index 000000000..436630329 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/batch_job_service/credentials.rb @@ -0,0 +1,38 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Ads + module GoogleAds + module V25 + module Services + module BatchJobService + # Credentials for the BatchJobService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/adwords" + ] + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/batch_job_service/operations.rb b/lib/google/ads/google_ads/v25/services/batch_job_service/operations.rb new file mode 100644 index 000000000..3b28228c9 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/batch_job_service/operations.rb @@ -0,0 +1,855 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/operation" +require "google/longrunning/operations_pb" + +module Google + module Ads + module GoogleAds + module V25 + module Services + module BatchJobService + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "googleads.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the BatchJobService Operations API. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def self.configure + @configure ||= Operations::Configuration.new + yield @configure if block_given? + @configure + end + + ## + # Configure the BatchJobService Operations instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Operations.configure}. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @operations_stub.universe_domain + end + + ## + # Create a new Operations client object. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Operations::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/longrunning/operations_services_pb" + + # Create the configuration object + @config = Configuration.new Operations.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + credentials ||= Credentials.default scope: @config.scope + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_stub = ::Gapic::ServiceStub.new( + ::Google::Longrunning::Operations::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool + ) + + # Used by an LRO wrapper for some methods of this service + @operations_client = self + end + + # Service calls + + ## + # Lists operations that match the specified filter in the request. If the + # server doesn't support this method, it returns `UNIMPLEMENTED`. + # + # @overload list_operations(request, options = nil) + # Pass arguments to `list_operations` via a request object, either of type + # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::ListOperationsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_operations(name: nil, filter: nil, page_size: nil, page_token: nil, return_partial_success: nil) + # Pass arguments to `list_operations` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation's parent resource. + # @param filter [::String] + # The standard list filter. + # @param page_size [::Integer] + # The standard list page size. + # @param page_token [::String] + # The standard list page token. + # @param return_partial_success [::Boolean] + # When set to `true`, operations that are reachable are returned as normal, + # and those that are unreachable are returned in the + # [ListOperationsResponse.unreachable] field. + # + # This can only be `true` when reading across collections e.g. when `parent` + # is set to `"projects/example/locations/-"`. + # + # This field is not by default supported and will result in an + # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in + # service or product specific documentation. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Gapic::Operation>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Gapic::Operation>] + # + # @raise [Google::Ads::GoogleAds::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::ListOperationsRequest.new + # + # # Call the list_operations method. + # result = client.list_operations request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Longrunning::Operation. + # p item + # end + # + def list_operations request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_operations.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Ads::GoogleAds::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_operations.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_operations.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :list_operations, request, options: options do |response, operation| + wrap_lro_operation = ->(op_response) { ::Gapic::Operation.new op_response, @operations_client } + response = ::Gapic::PagedEnumerable.new @operations_stub, :list_operations, request, response, + operation, options, format_resource: wrap_lro_operation + yield response, operation if block_given? + throw :response, response + end + # rescue GRPC::BadStatus => grpc_error + # raise Google::Ads::GoogleAds::Error.new grpc_error.message + end + + ## + # 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. + # + # @overload get_operation(request, options = nil) + # Pass arguments to `get_operation` via a request object, either of type + # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::GetOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_operation(name: nil) + # Pass arguments to `get_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [Google::Ads::GoogleAds::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::GetOperationRequest.new + # + # # Call the get_operation method. + # result = client.get_operation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def get_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Ads::GoogleAds::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :get_operation, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + # rescue GRPC::BadStatus => grpc_error + # raise Google::Ads::GoogleAds::Error.new grpc_error.message + end + + ## + # 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`. + # + # @overload delete_operation(request, options = nil) + # Pass arguments to `delete_operation` via a request object, either of type + # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::DeleteOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_operation(name: nil) + # Pass arguments to `delete_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to be deleted. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [Google::Ads::GoogleAds::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::DeleteOperationRequest.new + # + # # Call the delete_operation method. + # result = client.delete_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Ads::GoogleAds::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :delete_operation, request, options: options do |response, operation| + yield response, operation if block_given? + end + # rescue GRPC::BadStatus => grpc_error + # raise Google::Ads::GoogleAds::Error.new grpc_error.message + end + + ## + # 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 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 {::Google::Longrunning::Operation#error Operation.error} value with a + # {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to + # `Code.CANCELLED`. + # + # @overload cancel_operation(request, options = nil) + # Pass arguments to `cancel_operation` via a request object, either of type + # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::CancelOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload cancel_operation(name: nil) + # Pass arguments to `cancel_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to be cancelled. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [Google::Ads::GoogleAds::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::CancelOperationRequest.new + # + # # Call the cancel_operation method. + # result = client.cancel_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def cancel_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.cancel_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Ads::GoogleAds::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.cancel_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :cancel_operation, request, options: options do |response, operation| + yield response, operation if block_given? + end + # rescue GRPC::BadStatus => grpc_error + # raise Google::Ads::GoogleAds::Error.new grpc_error.message + end + + ## + # Waits until the specified long-running operation 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. + # + # @overload wait_operation(request, options = nil) + # Pass arguments to `wait_operation` via a request object, either of type + # {::Google::Longrunning::WaitOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::WaitOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload wait_operation(name: nil, timeout: nil) + # Pass arguments to `wait_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to wait on. + # @param timeout [::Google::Protobuf::Duration, ::Hash] + # 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. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [Google::Ads::GoogleAds::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::WaitOperationRequest.new + # + # # Call the wait_operation method. + # result = client.wait_operation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def wait_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::WaitOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.wait_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Ads::GoogleAds::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.wait_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :wait_operation, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + # rescue GRPC::BadStatus => grpc_error + # raise Google::Ads::GoogleAds::Error.new grpc_error.message + end + + ## + # Configuration class for the Operations API. + # + # This class represents the configuration for Operations, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Longrunning::Operations::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_operations to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Longrunning::Operations::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Longrunning::Operations::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Longrunning::Operations::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "googleads.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, + ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the Operations API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_operations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_operations + ## + # RPC-specific configuration for `get_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :get_operation + ## + # RPC-specific configuration for `delete_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_operation + ## + # RPC-specific configuration for `cancel_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :cancel_operation + ## + # RPC-specific configuration for `wait_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :wait_operation + + # @private + def initialize parent_rpcs = nil + list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations + @list_operations = ::Gapic::Config::Method.new list_operations_config + get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation + @get_operation = ::Gapic::Config::Method.new get_operation_config + delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation + @delete_operation = ::Gapic::Config::Method.new delete_operation_config + cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation + @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config + wait_operation_config = parent_rpcs.wait_operation if parent_rpcs.respond_to? :wait_operation + @wait_operation = ::Gapic::Config::Method.new wait_operation_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/batch_job_service/paths.rb b/lib/google/ads/google_ads/v25/services/batch_job_service/paths.rb new file mode 100644 index 000000000..0da60941c --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/batch_job_service/paths.rb @@ -0,0 +1,1373 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Ads + module GoogleAds + module V25 + module Services + module BatchJobService + # Path helper methods for the BatchJobService API. + module Paths + ## + # Create a fully-qualified AccessibleBiddingStrategy resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/accessibleBiddingStrategies/{bidding_strategy_id}` + # + # @param customer_id [String] + # @param bidding_strategy_id [String] + # + # @return [::String] + def accessible_bidding_strategy_path customer_id:, bidding_strategy_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/accessibleBiddingStrategies/#{bidding_strategy_id}" + end + + ## + # Create a fully-qualified Ad resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/ads/{ad_id}` + # + # @param customer_id [String] + # @param ad_id [String] + # + # @return [::String] + def ad_path customer_id:, ad_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/ads/#{ad_id}" + end + + ## + # Create a fully-qualified AdGroup resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/adGroups/{ad_group_id}` + # + # @param customer_id [String] + # @param ad_group_id [String] + # + # @return [::String] + def ad_group_path customer_id:, ad_group_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/adGroups/#{ad_group_id}" + end + + ## + # Create a fully-qualified AdGroupAd resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/adGroupAds/{ad_group_id}~{ad_id}` + # + # @param customer_id [String] + # @param ad_group_id [String] + # @param ad_id [String] + # + # @return [::String] + def ad_group_ad_path customer_id:, ad_group_id:, ad_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + raise ::ArgumentError, "ad_group_id cannot contain /" if ad_group_id.to_s.include? "/" + + "customers/#{customer_id}/adGroupAds/#{ad_group_id}~#{ad_id}" + end + + ## + # Create a fully-qualified AdGroupAdLabel resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/adGroupAdLabels/{ad_group_id}~{ad_id}~{label_id}` + # + # @param customer_id [String] + # @param ad_group_id [String] + # @param ad_id [String] + # @param label_id [String] + # + # @return [::String] + def ad_group_ad_label_path customer_id:, ad_group_id:, ad_id:, label_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + raise ::ArgumentError, "ad_group_id cannot contain /" if ad_group_id.to_s.include? "/" + raise ::ArgumentError, "ad_id cannot contain /" if ad_id.to_s.include? "/" + + "customers/#{customer_id}/adGroupAdLabels/#{ad_group_id}~#{ad_id}~#{label_id}" + end + + ## + # Create a fully-qualified AdGroupAsset resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/adGroupAssets/{ad_group_id}~{asset_id}~{field_type}` + # + # @param customer_id [String] + # @param ad_group_id [String] + # @param asset_id [String] + # @param field_type [String] + # + # @return [::String] + def ad_group_asset_path customer_id:, ad_group_id:, asset_id:, field_type: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + raise ::ArgumentError, "ad_group_id cannot contain /" if ad_group_id.to_s.include? "/" + raise ::ArgumentError, "asset_id cannot contain /" if asset_id.to_s.include? "/" + + "customers/#{customer_id}/adGroupAssets/#{ad_group_id}~#{asset_id}~#{field_type}" + end + + ## + # Create a fully-qualified AdGroupBidModifier resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/adGroupBidModifiers/{ad_group_id}~{criterion_id}` + # + # @param customer_id [String] + # @param ad_group_id [String] + # @param criterion_id [String] + # + # @return [::String] + def ad_group_bid_modifier_path customer_id:, ad_group_id:, criterion_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + raise ::ArgumentError, "ad_group_id cannot contain /" if ad_group_id.to_s.include? "/" + + "customers/#{customer_id}/adGroupBidModifiers/#{ad_group_id}~#{criterion_id}" + end + + ## + # Create a fully-qualified AdGroupCriterion resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/adGroupCriteria/{ad_group_id}~{criterion_id}` + # + # @param customer_id [String] + # @param ad_group_id [String] + # @param criterion_id [String] + # + # @return [::String] + def ad_group_criterion_path customer_id:, ad_group_id:, criterion_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + raise ::ArgumentError, "ad_group_id cannot contain /" if ad_group_id.to_s.include? "/" + + "customers/#{customer_id}/adGroupCriteria/#{ad_group_id}~#{criterion_id}" + end + + ## + # Create a fully-qualified AdGroupCriterionCustomizer resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/adGroupCriterionCustomizers/{ad_group_id}~{criterion_id}~{customizer_attribute_id}` + # + # @param customer_id [String] + # @param ad_group_id [String] + # @param criterion_id [String] + # @param customizer_attribute_id [String] + # + # @return [::String] + def ad_group_criterion_customizer_path customer_id:, ad_group_id:, criterion_id:, customizer_attribute_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + raise ::ArgumentError, "ad_group_id cannot contain /" if ad_group_id.to_s.include? "/" + raise ::ArgumentError, "criterion_id cannot contain /" if criterion_id.to_s.include? "/" + + "customers/#{customer_id}/adGroupCriterionCustomizers/#{ad_group_id}~#{criterion_id}~#{customizer_attribute_id}" + end + + ## + # Create a fully-qualified AdGroupCriterionLabel resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/adGroupCriterionLabels/{ad_group_id}~{criterion_id}~{label_id}` + # + # @param customer_id [String] + # @param ad_group_id [String] + # @param criterion_id [String] + # @param label_id [String] + # + # @return [::String] + def ad_group_criterion_label_path customer_id:, ad_group_id:, criterion_id:, label_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + raise ::ArgumentError, "ad_group_id cannot contain /" if ad_group_id.to_s.include? "/" + raise ::ArgumentError, "criterion_id cannot contain /" if criterion_id.to_s.include? "/" + + "customers/#{customer_id}/adGroupCriterionLabels/#{ad_group_id}~#{criterion_id}~#{label_id}" + end + + ## + # Create a fully-qualified AdGroupCustomizer resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/adGroupCustomizers/{ad_group_id}~{customizer_attribute_id}` + # + # @param customer_id [String] + # @param ad_group_id [String] + # @param customizer_attribute_id [String] + # + # @return [::String] + def ad_group_customizer_path customer_id:, ad_group_id:, customizer_attribute_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + raise ::ArgumentError, "ad_group_id cannot contain /" if ad_group_id.to_s.include? "/" + + "customers/#{customer_id}/adGroupCustomizers/#{ad_group_id}~#{customizer_attribute_id}" + end + + ## + # Create a fully-qualified AdGroupLabel resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/adGroupLabels/{ad_group_id}~{label_id}` + # + # @param customer_id [String] + # @param ad_group_id [String] + # @param label_id [String] + # + # @return [::String] + def ad_group_label_path customer_id:, ad_group_id:, label_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + raise ::ArgumentError, "ad_group_id cannot contain /" if ad_group_id.to_s.include? "/" + + "customers/#{customer_id}/adGroupLabels/#{ad_group_id}~#{label_id}" + end + + ## + # Create a fully-qualified AdParameter resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/adParameters/{ad_group_id}~{criterion_id}~{parameter_index}` + # + # @param customer_id [String] + # @param ad_group_id [String] + # @param criterion_id [String] + # @param parameter_index [String] + # + # @return [::String] + def ad_parameter_path customer_id:, ad_group_id:, criterion_id:, parameter_index: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + raise ::ArgumentError, "ad_group_id cannot contain /" if ad_group_id.to_s.include? "/" + raise ::ArgumentError, "criterion_id cannot contain /" if criterion_id.to_s.include? "/" + + "customers/#{customer_id}/adParameters/#{ad_group_id}~#{criterion_id}~#{parameter_index}" + end + + ## + # Create a fully-qualified Asset resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/assets/{asset_id}` + # + # @param customer_id [String] + # @param asset_id [String] + # + # @return [::String] + def asset_path customer_id:, asset_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/assets/#{asset_id}" + end + + ## + # Create a fully-qualified AssetGroup resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/assetGroups/{asset_group_id}` + # + # @param customer_id [String] + # @param asset_group_id [String] + # + # @return [::String] + def asset_group_path customer_id:, asset_group_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/assetGroups/#{asset_group_id}" + end + + ## + # Create a fully-qualified AssetGroupAsset resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/assetGroupAssets/{asset_group_id}~{asset_id}~{field_type}` + # + # @param customer_id [String] + # @param asset_group_id [String] + # @param asset_id [String] + # @param field_type [String] + # + # @return [::String] + def asset_group_asset_path customer_id:, asset_group_id:, asset_id:, field_type: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + raise ::ArgumentError, "asset_group_id cannot contain /" if asset_group_id.to_s.include? "/" + raise ::ArgumentError, "asset_id cannot contain /" if asset_id.to_s.include? "/" + + "customers/#{customer_id}/assetGroupAssets/#{asset_group_id}~#{asset_id}~#{field_type}" + end + + ## + # Create a fully-qualified AssetGroupListingGroupFilter resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/assetGroupListingGroupFilters/{asset_group_id}~{listing_group_filter_id}` + # + # @param customer_id [String] + # @param asset_group_id [String] + # @param listing_group_filter_id [String] + # + # @return [::String] + def asset_group_listing_group_filter_path customer_id:, asset_group_id:, listing_group_filter_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + raise ::ArgumentError, "asset_group_id cannot contain /" if asset_group_id.to_s.include? "/" + + "customers/#{customer_id}/assetGroupListingGroupFilters/#{asset_group_id}~#{listing_group_filter_id}" + end + + ## + # Create a fully-qualified AssetGroupSignal resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/assetGroupSignals/{asset_group_id}~{criterion_id}` + # + # @param customer_id [String] + # @param asset_group_id [String] + # @param criterion_id [String] + # + # @return [::String] + def asset_group_signal_path customer_id:, asset_group_id:, criterion_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + raise ::ArgumentError, "asset_group_id cannot contain /" if asset_group_id.to_s.include? "/" + + "customers/#{customer_id}/assetGroupSignals/#{asset_group_id}~#{criterion_id}" + end + + ## + # Create a fully-qualified AssetSet resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/assetSets/{asset_set_id}` + # + # @param customer_id [String] + # @param asset_set_id [String] + # + # @return [::String] + def asset_set_path customer_id:, asset_set_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/assetSets/#{asset_set_id}" + end + + ## + # Create a fully-qualified AssetSetAsset resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/assetSetAssets/{asset_set_id}~{asset_id}` + # + # @param customer_id [String] + # @param asset_set_id [String] + # @param asset_id [String] + # + # @return [::String] + def asset_set_asset_path customer_id:, asset_set_id:, asset_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + raise ::ArgumentError, "asset_set_id cannot contain /" if asset_set_id.to_s.include? "/" + + "customers/#{customer_id}/assetSetAssets/#{asset_set_id}~#{asset_id}" + end + + ## + # Create a fully-qualified Audience resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/audiences/{audience_id}` + # + # @param customer_id [String] + # @param audience_id [String] + # + # @return [::String] + def audience_path customer_id:, audience_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/audiences/#{audience_id}" + end + + ## + # Create a fully-qualified BatchJob resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/batchJobs/{batch_job_id}` + # + # @param customer_id [String] + # @param batch_job_id [String] + # + # @return [::String] + def batch_job_path customer_id:, batch_job_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/batchJobs/#{batch_job_id}" + end + + ## + # Create a fully-qualified BiddingDataExclusion resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/biddingDataExclusions/{seasonality_event_id}` + # + # @param customer_id [String] + # @param seasonality_event_id [String] + # + # @return [::String] + def bidding_data_exclusion_path customer_id:, seasonality_event_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/biddingDataExclusions/#{seasonality_event_id}" + end + + ## + # Create a fully-qualified BiddingSeasonalityAdjustment resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/biddingSeasonalityAdjustments/{seasonality_event_id}` + # + # @param customer_id [String] + # @param seasonality_event_id [String] + # + # @return [::String] + def bidding_seasonality_adjustment_path customer_id:, seasonality_event_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/biddingSeasonalityAdjustments/#{seasonality_event_id}" + end + + ## + # Create a fully-qualified BiddingStrategy resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/biddingStrategies/{bidding_strategy_id}` + # + # @param customer_id [String] + # @param bidding_strategy_id [String] + # + # @return [::String] + def bidding_strategy_path customer_id:, bidding_strategy_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/biddingStrategies/#{bidding_strategy_id}" + end + + ## + # Create a fully-qualified Campaign resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/campaigns/{campaign_id}` + # + # @param customer_id [String] + # @param campaign_id [String] + # + # @return [::String] + def campaign_path customer_id:, campaign_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/campaigns/#{campaign_id}" + end + + ## + # Create a fully-qualified CampaignAsset resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/campaignAssets/{campaign_id}~{asset_id}~{field_type}` + # + # @param customer_id [String] + # @param campaign_id [String] + # @param asset_id [String] + # @param field_type [String] + # + # @return [::String] + def campaign_asset_path customer_id:, campaign_id:, asset_id:, field_type: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + raise ::ArgumentError, "campaign_id cannot contain /" if campaign_id.to_s.include? "/" + raise ::ArgumentError, "asset_id cannot contain /" if asset_id.to_s.include? "/" + + "customers/#{customer_id}/campaignAssets/#{campaign_id}~#{asset_id}~#{field_type}" + end + + ## + # Create a fully-qualified CampaignAssetSet resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/campaignAssetSets/{campaign_id}~{asset_set_id}` + # + # @param customer_id [String] + # @param campaign_id [String] + # @param asset_set_id [String] + # + # @return [::String] + def campaign_asset_set_path customer_id:, campaign_id:, asset_set_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + raise ::ArgumentError, "campaign_id cannot contain /" if campaign_id.to_s.include? "/" + + "customers/#{customer_id}/campaignAssetSets/#{campaign_id}~#{asset_set_id}" + end + + ## + # Create a fully-qualified CampaignBidModifier resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/campaignBidModifiers/{campaign_id}~{criterion_id}` + # + # @param customer_id [String] + # @param campaign_id [String] + # @param criterion_id [String] + # + # @return [::String] + def campaign_bid_modifier_path customer_id:, campaign_id:, criterion_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + raise ::ArgumentError, "campaign_id cannot contain /" if campaign_id.to_s.include? "/" + + "customers/#{customer_id}/campaignBidModifiers/#{campaign_id}~#{criterion_id}" + end + + ## + # Create a fully-qualified CampaignBudget resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/campaignBudgets/{campaign_budget_id}` + # + # @param customer_id [String] + # @param campaign_budget_id [String] + # + # @return [::String] + def campaign_budget_path customer_id:, campaign_budget_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/campaignBudgets/#{campaign_budget_id}" + end + + ## + # Create a fully-qualified CampaignConversionGoal resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/campaignConversionGoals/{campaign_id}~{category}~{source}` + # + # @param customer_id [String] + # @param campaign_id [String] + # @param category [String] + # @param source [String] + # + # @return [::String] + def campaign_conversion_goal_path customer_id:, campaign_id:, category:, source: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + raise ::ArgumentError, "campaign_id cannot contain /" if campaign_id.to_s.include? "/" + raise ::ArgumentError, "category cannot contain /" if category.to_s.include? "/" + + "customers/#{customer_id}/campaignConversionGoals/#{campaign_id}~#{category}~#{source}" + end + + ## + # Create a fully-qualified CampaignCriterion resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/campaignCriteria/{campaign_id}~{criterion_id}` + # + # @param customer_id [String] + # @param campaign_id [String] + # @param criterion_id [String] + # + # @return [::String] + def campaign_criterion_path customer_id:, campaign_id:, criterion_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + raise ::ArgumentError, "campaign_id cannot contain /" if campaign_id.to_s.include? "/" + + "customers/#{customer_id}/campaignCriteria/#{campaign_id}~#{criterion_id}" + end + + ## + # Create a fully-qualified CampaignCustomizer resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/campaignCustomizers/{campaign_id}~{customizer_attribute_id}` + # + # @param customer_id [String] + # @param campaign_id [String] + # @param customizer_attribute_id [String] + # + # @return [::String] + def campaign_customizer_path customer_id:, campaign_id:, customizer_attribute_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + raise ::ArgumentError, "campaign_id cannot contain /" if campaign_id.to_s.include? "/" + + "customers/#{customer_id}/campaignCustomizers/#{campaign_id}~#{customizer_attribute_id}" + end + + ## + # Create a fully-qualified CampaignDraft resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/campaignDrafts/{base_campaign_id}~{draft_id}` + # + # @param customer_id [String] + # @param base_campaign_id [String] + # @param draft_id [String] + # + # @return [::String] + def campaign_draft_path customer_id:, base_campaign_id:, draft_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + raise ::ArgumentError, "base_campaign_id cannot contain /" if base_campaign_id.to_s.include? "/" + + "customers/#{customer_id}/campaignDrafts/#{base_campaign_id}~#{draft_id}" + end + + ## + # Create a fully-qualified CampaignGroup resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/campaignGroups/{campaign_group_id}` + # + # @param customer_id [String] + # @param campaign_group_id [String] + # + # @return [::String] + def campaign_group_path customer_id:, campaign_group_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/campaignGroups/#{campaign_group_id}" + end + + ## + # Create a fully-qualified CampaignLabel resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/campaignLabels/{campaign_id}~{label_id}` + # + # @param customer_id [String] + # @param campaign_id [String] + # @param label_id [String] + # + # @return [::String] + def campaign_label_path customer_id:, campaign_id:, label_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + raise ::ArgumentError, "campaign_id cannot contain /" if campaign_id.to_s.include? "/" + + "customers/#{customer_id}/campaignLabels/#{campaign_id}~#{label_id}" + end + + ## + # Create a fully-qualified CampaignSharedSet resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/campaignSharedSets/{campaign_id}~{shared_set_id}` + # + # @param customer_id [String] + # @param campaign_id [String] + # @param shared_set_id [String] + # + # @return [::String] + def campaign_shared_set_path customer_id:, campaign_id:, shared_set_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + raise ::ArgumentError, "campaign_id cannot contain /" if campaign_id.to_s.include? "/" + + "customers/#{customer_id}/campaignSharedSets/#{campaign_id}~#{shared_set_id}" + end + + ## + # Create a fully-qualified CarrierConstant resource string. + # + # The resource will be in the following format: + # + # `carrierConstants/{criterion_id}` + # + # @param criterion_id [String] + # + # @return [::String] + def carrier_constant_path criterion_id: + "carrierConstants/#{criterion_id}" + end + + ## + # Create a fully-qualified CombinedAudience resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/combinedAudiences/{combined_audience_id}` + # + # @param customer_id [String] + # @param combined_audience_id [String] + # + # @return [::String] + def combined_audience_path customer_id:, combined_audience_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/combinedAudiences/#{combined_audience_id}" + end + + ## + # Create a fully-qualified ConversionAction resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/conversionActions/{conversion_action_id}` + # + # @param customer_id [String] + # @param conversion_action_id [String] + # + # @return [::String] + def conversion_action_path customer_id:, conversion_action_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/conversionActions/#{conversion_action_id}" + end + + ## + # Create a fully-qualified ConversionCustomVariable resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/conversionCustomVariables/{conversion_custom_variable_id}` + # + # @param customer_id [String] + # @param conversion_custom_variable_id [String] + # + # @return [::String] + def conversion_custom_variable_path customer_id:, conversion_custom_variable_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/conversionCustomVariables/#{conversion_custom_variable_id}" + end + + ## + # Create a fully-qualified ConversionGoalCampaignConfig resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/conversionGoalCampaignConfigs/{campaign_id}` + # + # @param customer_id [String] + # @param campaign_id [String] + # + # @return [::String] + def conversion_goal_campaign_config_path customer_id:, campaign_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/conversionGoalCampaignConfigs/#{campaign_id}" + end + + ## + # Create a fully-qualified ConversionValueRule resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/conversionValueRules/{conversion_value_rule_id}` + # + # @param customer_id [String] + # @param conversion_value_rule_id [String] + # + # @return [::String] + def conversion_value_rule_path customer_id:, conversion_value_rule_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/conversionValueRules/#{conversion_value_rule_id}" + end + + ## + # Create a fully-qualified ConversionValueRuleSet resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/conversionValueRuleSets/{conversion_value_rule_set_id}` + # + # @param customer_id [String] + # @param conversion_value_rule_set_id [String] + # + # @return [::String] + def conversion_value_rule_set_path customer_id:, conversion_value_rule_set_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/conversionValueRuleSets/#{conversion_value_rule_set_id}" + end + + ## + # Create a fully-qualified CustomConversionGoal resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/customConversionGoals/{goal_id}` + # + # @param customer_id [String] + # @param goal_id [String] + # + # @return [::String] + def custom_conversion_goal_path customer_id:, goal_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/customConversionGoals/#{goal_id}" + end + + ## + # Create a fully-qualified Customer resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}` + # + # @param customer_id [String] + # + # @return [::String] + def customer_path customer_id: + "customers/#{customer_id}" + end + + ## + # Create a fully-qualified CustomerAsset resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/customerAssets/{asset_id}~{field_type}` + # + # @param customer_id [String] + # @param asset_id [String] + # @param field_type [String] + # + # @return [::String] + def customer_asset_path customer_id:, asset_id:, field_type: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + raise ::ArgumentError, "asset_id cannot contain /" if asset_id.to_s.include? "/" + + "customers/#{customer_id}/customerAssets/#{asset_id}~#{field_type}" + end + + ## + # Create a fully-qualified CustomerConversionGoal resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/customerConversionGoals/{category}~{source}` + # + # @param customer_id [String] + # @param category [String] + # @param source [String] + # + # @return [::String] + def customer_conversion_goal_path customer_id:, category:, source: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + raise ::ArgumentError, "category cannot contain /" if category.to_s.include? "/" + + "customers/#{customer_id}/customerConversionGoals/#{category}~#{source}" + end + + ## + # Create a fully-qualified CustomerCustomizer resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/customerCustomizers/{customizer_attribute_id}` + # + # @param customer_id [String] + # @param customizer_attribute_id [String] + # + # @return [::String] + def customer_customizer_path customer_id:, customizer_attribute_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/customerCustomizers/#{customizer_attribute_id}" + end + + ## + # Create a fully-qualified CustomerLabel resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/customerLabels/{label_id}` + # + # @param customer_id [String] + # @param label_id [String] + # + # @return [::String] + def customer_label_path customer_id:, label_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/customerLabels/#{label_id}" + end + + ## + # Create a fully-qualified CustomerNegativeCriterion resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/customerNegativeCriteria/{criterion_id}` + # + # @param customer_id [String] + # @param criterion_id [String] + # + # @return [::String] + def customer_negative_criterion_path customer_id:, criterion_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/customerNegativeCriteria/#{criterion_id}" + end + + ## + # Create a fully-qualified CustomizerAttribute resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/customizerAttributes/{customizer_attribute_id}` + # + # @param customer_id [String] + # @param customizer_attribute_id [String] + # + # @return [::String] + def customizer_attribute_path customer_id:, customizer_attribute_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/customizerAttributes/#{customizer_attribute_id}" + end + + ## + # Create a fully-qualified DetailedDemographic resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/detailedDemographics/{detailed_demographic_id}` + # + # @param customer_id [String] + # @param detailed_demographic_id [String] + # + # @return [::String] + def detailed_demographic_path customer_id:, detailed_demographic_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/detailedDemographics/#{detailed_demographic_id}" + end + + ## + # Create a fully-qualified Experiment resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/experiments/{trial_id}` + # + # @param customer_id [String] + # @param trial_id [String] + # + # @return [::String] + def experiment_path customer_id:, trial_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/experiments/#{trial_id}" + end + + ## + # Create a fully-qualified ExperimentArm resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/experimentArms/{trial_id}~{trial_arm_id}` + # + # @param customer_id [String] + # @param trial_id [String] + # @param trial_arm_id [String] + # + # @return [::String] + def experiment_arm_path customer_id:, trial_id:, trial_arm_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + raise ::ArgumentError, "trial_id cannot contain /" if trial_id.to_s.include? "/" + + "customers/#{customer_id}/experimentArms/#{trial_id}~#{trial_arm_id}" + end + + ## + # Create a fully-qualified GeoTargetConstant resource string. + # + # The resource will be in the following format: + # + # `geoTargetConstants/{criterion_id}` + # + # @param criterion_id [String] + # + # @return [::String] + def geo_target_constant_path criterion_id: + "geoTargetConstants/#{criterion_id}" + end + + ## + # Create a fully-qualified KeywordPlan resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/keywordPlans/{keyword_plan_id}` + # + # @param customer_id [String] + # @param keyword_plan_id [String] + # + # @return [::String] + def keyword_plan_path customer_id:, keyword_plan_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/keywordPlans/#{keyword_plan_id}" + end + + ## + # Create a fully-qualified KeywordPlanAdGroup resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/keywordPlanAdGroups/{keyword_plan_ad_group_id}` + # + # @param customer_id [String] + # @param keyword_plan_ad_group_id [String] + # + # @return [::String] + def keyword_plan_ad_group_path customer_id:, keyword_plan_ad_group_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/keywordPlanAdGroups/#{keyword_plan_ad_group_id}" + end + + ## + # Create a fully-qualified KeywordPlanAdGroupKeyword resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/keywordPlanAdGroupKeywords/{keyword_plan_ad_group_keyword_id}` + # + # @param customer_id [String] + # @param keyword_plan_ad_group_keyword_id [String] + # + # @return [::String] + def keyword_plan_ad_group_keyword_path customer_id:, keyword_plan_ad_group_keyword_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/keywordPlanAdGroupKeywords/#{keyword_plan_ad_group_keyword_id}" + end + + ## + # Create a fully-qualified KeywordPlanCampaign resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/keywordPlanCampaigns/{keyword_plan_campaign_id}` + # + # @param customer_id [String] + # @param keyword_plan_campaign_id [String] + # + # @return [::String] + def keyword_plan_campaign_path customer_id:, keyword_plan_campaign_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/keywordPlanCampaigns/#{keyword_plan_campaign_id}" + end + + ## + # Create a fully-qualified KeywordPlanCampaignKeyword resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/keywordPlanCampaignKeywords/{keyword_plan_campaign_keyword_id}` + # + # @param customer_id [String] + # @param keyword_plan_campaign_keyword_id [String] + # + # @return [::String] + def keyword_plan_campaign_keyword_path customer_id:, keyword_plan_campaign_keyword_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/keywordPlanCampaignKeywords/#{keyword_plan_campaign_keyword_id}" + end + + ## + # Create a fully-qualified KeywordThemeConstant resource string. + # + # The resource will be in the following format: + # + # `keywordThemeConstants/{express_category_id}~{express_sub_category_id}` + # + # @param express_category_id [String] + # @param express_sub_category_id [String] + # + # @return [::String] + def keyword_theme_constant_path express_category_id:, express_sub_category_id: + raise ::ArgumentError, "express_category_id cannot contain /" if express_category_id.to_s.include? "/" + + "keywordThemeConstants/#{express_category_id}~#{express_sub_category_id}" + end + + ## + # Create a fully-qualified Label resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/labels/{label_id}` + # + # @param customer_id [String] + # @param label_id [String] + # + # @return [::String] + def label_path customer_id:, label_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/labels/#{label_id}" + end + + ## + # Create a fully-qualified LanguageConstant resource string. + # + # The resource will be in the following format: + # + # `languageConstants/{criterion_id}` + # + # @param criterion_id [String] + # + # @return [::String] + def language_constant_path criterion_id: + "languageConstants/#{criterion_id}" + end + + ## + # Create a fully-qualified LifeEvent resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/lifeEvents/{life_event_id}` + # + # @param customer_id [String] + # @param life_event_id [String] + # + # @return [::String] + def life_event_path customer_id:, life_event_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/lifeEvents/#{life_event_id}" + end + + ## + # Create a fully-qualified MobileAppCategoryConstant resource string. + # + # The resource will be in the following format: + # + # `mobileAppCategoryConstants/{mobile_app_category_id}` + # + # @param mobile_app_category_id [String] + # + # @return [::String] + def mobile_app_category_constant_path mobile_app_category_id: + "mobileAppCategoryConstants/#{mobile_app_category_id}" + end + + ## + # Create a fully-qualified MobileDeviceConstant resource string. + # + # The resource will be in the following format: + # + # `mobileDeviceConstants/{criterion_id}` + # + # @param criterion_id [String] + # + # @return [::String] + def mobile_device_constant_path criterion_id: + "mobileDeviceConstants/#{criterion_id}" + end + + ## + # Create a fully-qualified OperatingSystemVersionConstant resource string. + # + # The resource will be in the following format: + # + # `operatingSystemVersionConstants/{criterion_id}` + # + # @param criterion_id [String] + # + # @return [::String] + def operating_system_version_constant_path criterion_id: + "operatingSystemVersionConstants/#{criterion_id}" + end + + ## + # Create a fully-qualified RecommendationSubscription resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/recommendationSubscriptions/{recommendation_type}` + # + # @param customer_id [String] + # @param recommendation_type [String] + # + # @return [::String] + def recommendation_subscription_path customer_id:, recommendation_type: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/recommendationSubscriptions/#{recommendation_type}" + end + + ## + # Create a fully-qualified RemarketingAction resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/remarketingActions/{remarketing_action_id}` + # + # @param customer_id [String] + # @param remarketing_action_id [String] + # + # @return [::String] + def remarketing_action_path customer_id:, remarketing_action_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/remarketingActions/#{remarketing_action_id}" + end + + ## + # Create a fully-qualified SharedCriterion resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/sharedCriteria/{shared_set_id}~{criterion_id}` + # + # @param customer_id [String] + # @param shared_set_id [String] + # @param criterion_id [String] + # + # @return [::String] + def shared_criterion_path customer_id:, shared_set_id:, criterion_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + raise ::ArgumentError, "shared_set_id cannot contain /" if shared_set_id.to_s.include? "/" + + "customers/#{customer_id}/sharedCriteria/#{shared_set_id}~#{criterion_id}" + end + + ## + # Create a fully-qualified SharedSet resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/sharedSets/{shared_set_id}` + # + # @param customer_id [String] + # @param shared_set_id [String] + # + # @return [::String] + def shared_set_path customer_id:, shared_set_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/sharedSets/#{shared_set_id}" + end + + ## + # Create a fully-qualified SmartCampaignSetting resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/smartCampaignSettings/{campaign_id}` + # + # @param customer_id [String] + # @param campaign_id [String] + # + # @return [::String] + def smart_campaign_setting_path customer_id:, campaign_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/smartCampaignSettings/#{campaign_id}" + end + + ## + # Create a fully-qualified TopicConstant resource string. + # + # The resource will be in the following format: + # + # `topicConstants/{topic_id}` + # + # @param topic_id [String] + # + # @return [::String] + def topic_constant_path topic_id: + "topicConstants/#{topic_id}" + end + + ## + # Create a fully-qualified UserInterest resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/userInterests/{user_interest_id}` + # + # @param customer_id [String] + # @param user_interest_id [String] + # + # @return [::String] + def user_interest_path customer_id:, user_interest_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/userInterests/#{user_interest_id}" + end + + ## + # Create a fully-qualified UserList resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/userLists/{user_list_id}` + # + # @param customer_id [String] + # @param user_list_id [String] + # + # @return [::String] + def user_list_path customer_id:, user_list_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/userLists/#{user_list_id}" + end + + extend self + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/batch_job_service_pb.rb b/lib/google/ads/google_ads/v25/services/batch_job_service_pb.rb new file mode 100644 index 000000000..dd4b2839d --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/batch_job_service_pb.rb @@ -0,0 +1,43 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/services/batch_job_service.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/enums/response_content_type_pb' +require 'google/ads/google_ads/v25/resources/batch_job_pb' +require 'google/ads/google_ads/v25/services/google_ads_service_pb' +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/longrunning/operations_pb' +require 'google/protobuf/empty_pb' +require 'google/rpc/status_pb' + + +descriptor_data = "\n9google/ads/googleads/v25/services/batch_job_service.proto\x12!google.ads.googleads.v25.services\x1a:google/ads/googleads/v25/enums/response_content_type.proto\x1a\x32google/ads/googleads/v25/resources/batch_job.proto\x1a:google/ads/googleads/v25/services/google_ads_service.proto\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a\x17google/rpc/status.proto\"\x7f\n\x15MutateBatchJobRequest\x12\x18\n\x0b\x63ustomer_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12L\n\toperation\x18\x02 \x01(\x0b\x32\x34.google.ads.googleads.v25.services.BatchJobOperationB\x03\xe0\x41\x02\"\x9a\x01\n\x11\x42\x61tchJobOperation\x12>\n\x06\x63reate\x18\x01 \x01(\x0b\x32,.google.ads.googleads.v25.resources.BatchJobH\x00\x12\x38\n\x06remove\x18\x04 \x01(\tB&\xfa\x41#\n!googleads.googleapis.com/BatchJobH\x00\x42\x0b\n\toperation\"a\n\x16MutateBatchJobResponse\x12G\n\x06result\x18\x01 \x01(\x0b\x32\x37.google.ads.googleads.v25.services.MutateBatchJobResult\"U\n\x14MutateBatchJobResult\x12=\n\rresource_name\x18\x01 \x01(\tB&\xfa\x41#\n!googleads.googleapis.com/BatchJob\"V\n\x12RunBatchJobRequest\x12@\n\rresource_name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!googleads.googleapis.com/BatchJob\"\xcc\x01\n\x1c\x41\x64\x64\x42\x61tchJobOperationsRequest\x12@\n\rresource_name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!googleads.googleapis.com/BatchJob\x12\x16\n\x0esequence_token\x18\x02 \x01(\t\x12R\n\x11mutate_operations\x18\x03 \x03(\x0b\x32\x32.google.ads.googleads.v25.services.MutateOperationB\x03\xe0\x41\x02\"V\n\x1d\x41\x64\x64\x42\x61tchJobOperationsResponse\x12\x18\n\x10total_operations\x18\x01 \x01(\x03\x12\x1b\n\x13next_sequence_token\x18\x02 \x01(\t\"\xf1\x01\n\x1aListBatchJobResultsRequest\x12@\n\rresource_name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!googleads.googleapis.com/BatchJob\x12\x12\n\npage_token\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x03 \x01(\x05\x12j\n\x15response_content_type\x18\x04 \x01(\x0e\x32K.google.ads.googleads.v25.enums.ResponseContentTypeEnum.ResponseContentType\"z\n\x1bListBatchJobResultsResponse\x12\x42\n\x07results\x18\x01 \x03(\x0b\x32\x31.google.ads.googleads.v25.services.BatchJobResult\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xac\x01\n\x0e\x42\x61tchJobResult\x12\x17\n\x0foperation_index\x18\x01 \x01(\x03\x12]\n\x19mutate_operation_response\x18\x02 \x01(\x0b\x32:.google.ads.googleads.v25.services.MutateOperationResponse\x12\"\n\x06status\x18\x03 \x01(\x0b\x32\x12.google.rpc.Status2\xe1\x08\n\x0f\x42\x61tchJobService\x12\xd9\x01\n\x0eMutateBatchJob\x12\x38.google.ads.googleads.v25.services.MutateBatchJobRequest\x1a\x39.google.ads.googleads.v25.services.MutateBatchJobResponse\"R\xda\x41\x15\x63ustomer_id,operation\x82\xd3\xe4\x93\x02\x34\"//v25/customers/{customer_id=*}/batchJobs:mutate:\x01*\x12\xe6\x01\n\x13ListBatchJobResults\x12=.google.ads.googleads.v25.services.ListBatchJobResultsRequest\x1a>.google.ads.googleads.v25.services.ListBatchJobResultsResponse\"P\xda\x41\rresource_name\x82\xd3\xe4\x93\x02:\x12\x38/v25/{resource_name=customers/*/batchJobs/*}:listResults\x12\x89\x02\n\x0bRunBatchJob\x12\x35.google.ads.googleads.v25.services.RunBatchJobRequest\x1a\x1d.google.longrunning.Operation\"\xa3\x01\xca\x41U\n\x15google.protobuf.Empty\x12 grpc_error + # raise Google::Ads::GoogleAds::Error.new grpc_error.message + end + + ## + # Returns the list of locations that support benchmarks (for example, + # countries). + # + # List of thrown errors: + # [AuthenticationError]() + # [AuthorizationError]() + # [FieldError]() + # [HeaderError]() + # [InternalError]() + # [QuotaError]() + # [RequestError]() + # + # @overload list_benchmarks_locations(request, options = nil) + # Pass arguments to `list_benchmarks_locations` via a request object, either of type + # {::Google::Ads::GoogleAds::V25::Services::ListBenchmarksLocationsRequest} or an equivalent Hash. + # + # @param request [::Google::Ads::GoogleAds::V25::Services::ListBenchmarksLocationsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_benchmarks_locations(application_info: nil) + # Pass arguments to `list_benchmarks_locations` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param application_info [::Google::Ads::GoogleAds::V25::Common::AdditionalApplicationInfo, ::Hash] + # Additional information on the application issuing the request. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Ads::GoogleAds::V25::Services::ListBenchmarksLocationsResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Ads::GoogleAds::V25::Services::ListBenchmarksLocationsResponse] + # + # @raise [Google::Ads::GoogleAds::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/ads/google_ads/v25/services" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Ads::GoogleAds::V25::Services::BenchmarksService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Ads::GoogleAds::V25::Services::ListBenchmarksLocationsRequest.new + # + # # Call the list_benchmarks_locations method. + # result = client.list_benchmarks_locations request + # + # # The returned object is of type Google::Ads::GoogleAds::V25::Services::ListBenchmarksLocationsResponse. + # p result + # + def list_benchmarks_locations request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::GoogleAds::V25::Services::ListBenchmarksLocationsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_benchmarks_locations.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Ads::GoogleAds::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_benchmarks_locations.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_benchmarks_locations.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @benchmarks_service_stub.call_rpc :list_benchmarks_locations, request, + options: options do |response, operation| + yield response, operation if block_given? + end + # rescue GRPC::BadStatus => grpc_error + # raise Google::Ads::GoogleAds::Error.new grpc_error.message + end + + ## + # Returns the list of products that supports benchmarks. + # + # List of thrown errors: + # [AuthenticationError]() + # [AuthorizationError]() + # [FieldError]() + # [HeaderError]() + # [InternalError]() + # [QuotaError]() + # [RequestError]() + # + # @overload list_benchmarks_products(request, options = nil) + # Pass arguments to `list_benchmarks_products` via a request object, either of type + # {::Google::Ads::GoogleAds::V25::Services::ListBenchmarksProductsRequest} or an equivalent Hash. + # + # @param request [::Google::Ads::GoogleAds::V25::Services::ListBenchmarksProductsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_benchmarks_products(application_info: nil) + # Pass arguments to `list_benchmarks_products` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param application_info [::Google::Ads::GoogleAds::V25::Common::AdditionalApplicationInfo, ::Hash] + # Additional information on the application issuing the request. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Ads::GoogleAds::V25::Services::ListBenchmarksProductsResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Ads::GoogleAds::V25::Services::ListBenchmarksProductsResponse] + # + # @raise [Google::Ads::GoogleAds::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/ads/google_ads/v25/services" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Ads::GoogleAds::V25::Services::BenchmarksService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Ads::GoogleAds::V25::Services::ListBenchmarksProductsRequest.new + # + # # Call the list_benchmarks_products method. + # result = client.list_benchmarks_products request + # + # # The returned object is of type Google::Ads::GoogleAds::V25::Services::ListBenchmarksProductsResponse. + # p result + # + def list_benchmarks_products request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::GoogleAds::V25::Services::ListBenchmarksProductsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_benchmarks_products.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Ads::GoogleAds::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_benchmarks_products.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_benchmarks_products.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @benchmarks_service_stub.call_rpc :list_benchmarks_products, request, + options: options do |response, operation| + yield response, operation if block_given? + end + # rescue GRPC::BadStatus => grpc_error + # raise Google::Ads::GoogleAds::Error.new grpc_error.message + end + + ## + # Returns the list of benchmarks sources (for example, Industry Verticals). + # + # List of thrown errors: + # [AuthenticationError]() + # [AuthorizationError]() + # [FieldError]() + # [HeaderError]() + # [InternalError]() + # [QuotaError]() + # [RequestError]() + # + # @overload list_benchmarks_sources(request, options = nil) + # Pass arguments to `list_benchmarks_sources` via a request object, either of type + # {::Google::Ads::GoogleAds::V25::Services::ListBenchmarksSourcesRequest} or an equivalent Hash. + # + # @param request [::Google::Ads::GoogleAds::V25::Services::ListBenchmarksSourcesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_benchmarks_sources(benchmarks_sources: nil, application_info: nil) + # Pass arguments to `list_benchmarks_sources` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param benchmarks_sources [::Array<::Google::Ads::GoogleAds::V25::Enums::BenchmarksSourceTypeEnum::BenchmarksSourceType>] + # Required. The types of benchmarks sources to be returned + # @param application_info [::Google::Ads::GoogleAds::V25::Common::AdditionalApplicationInfo, ::Hash] + # Additional information on the application issuing the request. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Ads::GoogleAds::V25::Services::ListBenchmarksSourcesResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Ads::GoogleAds::V25::Services::ListBenchmarksSourcesResponse] + # + # @raise [Google::Ads::GoogleAds::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/ads/google_ads/v25/services" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Ads::GoogleAds::V25::Services::BenchmarksService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Ads::GoogleAds::V25::Services::ListBenchmarksSourcesRequest.new + # + # # Call the list_benchmarks_sources method. + # result = client.list_benchmarks_sources request + # + # # The returned object is of type Google::Ads::GoogleAds::V25::Services::ListBenchmarksSourcesResponse. + # p result + # + def list_benchmarks_sources request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::GoogleAds::V25::Services::ListBenchmarksSourcesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_benchmarks_sources.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Ads::GoogleAds::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_benchmarks_sources.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_benchmarks_sources.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @benchmarks_service_stub.call_rpc :list_benchmarks_sources, request, + options: options do |response, operation| + yield response, operation if block_given? + end + # rescue GRPC::BadStatus => grpc_error + # raise Google::Ads::GoogleAds::Error.new grpc_error.message + end + + ## + # Returns YouTube advertisement metrics for the given client against industry + # benchmarks. + # + # List of thrown errors: + # [AuthenticationError]() + # [AuthorizationError]() + # [BenchmarksError]() + # [FieldError]() + # [HeaderError]() + # [InternalError]() + # [QuotaError]() + # [RangeError]() + # [RequestError]() + # + # @overload generate_benchmarks_metrics(request, options = nil) + # Pass arguments to `generate_benchmarks_metrics` via a request object, either of type + # {::Google::Ads::GoogleAds::V25::Services::GenerateBenchmarksMetricsRequest} or an equivalent Hash. + # + # @param request [::Google::Ads::GoogleAds::V25::Services::GenerateBenchmarksMetricsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload generate_benchmarks_metrics(customer_id: nil, date_range: nil, location: nil, benchmarks_source: nil, product_filter: nil, breakdown_definition: nil, currency_code: nil, customer_benchmarks_group: nil, application_info: nil) + # Pass arguments to `generate_benchmarks_metrics` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param customer_id [::String] + # Required. The ID of the customer. Supply a client customer ID to generate + # metrics for the customer. A manager account customer ID will not return + # customer metrics since it does not have any associated direct ad campaigns. + # @param date_range [::Google::Ads::GoogleAds::V25::Common::DateRange, ::Hash] + # The date range to aggregate metrics over. If unset, data will be returned + # for the most recent quarter for which data is available. Dates can be + # retrieved using + # {::Google::Ads::GoogleAds::V25::Services::BenchmarksService::Client#list_benchmarks_available_dates BenchmarksService.ListBenchmarksAvailableDates}. + # @param location [::Google::Ads::GoogleAds::V25::Common::LocationInfo, ::Hash] + # Required. The location to generate benchmarks metrics for. + # @param benchmarks_source [::Google::Ads::GoogleAds::V25::Services::BenchmarksSource, ::Hash] + # Required. The source used to generate benchmarks metrics for. + # @param product_filter [::Google::Ads::GoogleAds::V25::Services::ProductFilter, ::Hash] + # Required. The products to aggregate metrics over. Product filter settings + # support a list of product IDs or a list of marketing objectives. + # @param breakdown_definition [::Google::Ads::GoogleAds::V25::Services::BreakdownDefinition, ::Hash] + # Optional. The set of dimensions to group metrics by. If multiple dimensions + # are selected, cross-dimension breakdowns are returned. + # @param currency_code [::String] + # Optional. The three-character ISO 4217 currency code. If unspecified, the + # default currency for monetary values is USD. + # @param customer_benchmarks_group [::String] + # The name of the customer being planned for. This is a user-defined value. + # @param application_info [::Google::Ads::GoogleAds::V25::Common::AdditionalApplicationInfo, ::Hash] + # Additional information on the application issuing the request. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Ads::GoogleAds::V25::Services::GenerateBenchmarksMetricsResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Ads::GoogleAds::V25::Services::GenerateBenchmarksMetricsResponse] + # + # @raise [Google::Ads::GoogleAds::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/ads/google_ads/v25/services" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Ads::GoogleAds::V25::Services::BenchmarksService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Ads::GoogleAds::V25::Services::GenerateBenchmarksMetricsRequest.new + # + # # Call the generate_benchmarks_metrics method. + # result = client.generate_benchmarks_metrics request + # + # # The returned object is of type Google::Ads::GoogleAds::V25::Services::GenerateBenchmarksMetricsResponse. + # p result + # + def generate_benchmarks_metrics request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::GoogleAds::V25::Services::GenerateBenchmarksMetricsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.generate_benchmarks_metrics.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Ads::GoogleAds::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.customer_id + header_params["customer_id"] = request.customer_id + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.generate_benchmarks_metrics.timeout, + metadata: metadata, + retry_policy: @config.rpcs.generate_benchmarks_metrics.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @benchmarks_service_stub.call_rpc :generate_benchmarks_metrics, request, + options: options do |response, operation| + yield response, operation if block_given? + end + # rescue GRPC::BadStatus => grpc_error + # raise Google::Ads::GoogleAds::Error.new grpc_error.message + end + + ## + # Configuration class for the BenchmarksService API. + # + # This class represents the configuration for BenchmarksService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Ads::GoogleAds::V25::Services::BenchmarksService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_benchmarks_available_dates to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Ads::GoogleAds::V25::Services::BenchmarksService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_benchmarks_available_dates.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Ads::GoogleAds::V25::Services::BenchmarksService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_benchmarks_available_dates.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Ads::GoogleAds::V25::Services::BenchmarksService::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "googleads.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, + ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the BenchmarksService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_benchmarks_available_dates` + # @return [::Gapic::Config::Method] + # + attr_reader :list_benchmarks_available_dates + ## + # RPC-specific configuration for `list_benchmarks_locations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_benchmarks_locations + ## + # RPC-specific configuration for `list_benchmarks_products` + # @return [::Gapic::Config::Method] + # + attr_reader :list_benchmarks_products + ## + # RPC-specific configuration for `list_benchmarks_sources` + # @return [::Gapic::Config::Method] + # + attr_reader :list_benchmarks_sources + ## + # RPC-specific configuration for `generate_benchmarks_metrics` + # @return [::Gapic::Config::Method] + # + attr_reader :generate_benchmarks_metrics + + # @private + def initialize parent_rpcs = nil + list_benchmarks_available_dates_config = parent_rpcs.list_benchmarks_available_dates if parent_rpcs.respond_to? :list_benchmarks_available_dates + @list_benchmarks_available_dates = ::Gapic::Config::Method.new list_benchmarks_available_dates_config + list_benchmarks_locations_config = parent_rpcs.list_benchmarks_locations if parent_rpcs.respond_to? :list_benchmarks_locations + @list_benchmarks_locations = ::Gapic::Config::Method.new list_benchmarks_locations_config + list_benchmarks_products_config = parent_rpcs.list_benchmarks_products if parent_rpcs.respond_to? :list_benchmarks_products + @list_benchmarks_products = ::Gapic::Config::Method.new list_benchmarks_products_config + list_benchmarks_sources_config = parent_rpcs.list_benchmarks_sources if parent_rpcs.respond_to? :list_benchmarks_sources + @list_benchmarks_sources = ::Gapic::Config::Method.new list_benchmarks_sources_config + generate_benchmarks_metrics_config = parent_rpcs.generate_benchmarks_metrics if parent_rpcs.respond_to? :generate_benchmarks_metrics + @generate_benchmarks_metrics = ::Gapic::Config::Method.new generate_benchmarks_metrics_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/benchmarks_service/credentials.rb b/lib/google/ads/google_ads/v25/services/benchmarks_service/credentials.rb new file mode 100644 index 000000000..e33c99730 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/benchmarks_service/credentials.rb @@ -0,0 +1,38 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Ads + module GoogleAds + module V25 + module Services + module BenchmarksService + # Credentials for the BenchmarksService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/adwords" + ] + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/benchmarks_service_pb.rb b/lib/google/ads/google_ads/v25/services/benchmarks_service_pb.rb new file mode 100644 index 000000000..c8b5f4d1d --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/benchmarks_service_pb.rb @@ -0,0 +1,56 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/services/benchmarks_service.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/common/additional_application_info_pb' +require 'google/ads/google_ads/v25/common/criteria_pb' +require 'google/ads/google_ads/v25/common/dates_pb' +require 'google/ads/google_ads/v25/enums/benchmarks_marketing_objective_pb' +require 'google/ads/google_ads/v25/enums/benchmarks_source_type_pb' +require 'google/ads/google_ads/v25/enums/benchmarks_time_granularity_pb' +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' + + +descriptor_data = "\n:google/ads/googleads/v25/services/benchmarks_service.proto\x12!google.ads.googleads.v25.services\x1a\x41google/ads/googleads/v25/common/additional_application_info.proto\x1a.google/ads/googleads/v25/common/criteria.proto\x1a+google/ads/googleads/v25/common/dates.proto\x1a\x43google/ads/googleads/v25/enums/benchmarks_marketing_objective.proto\x1a;google/ads/googleads/v25/enums/benchmarks_source_type.proto\x1a@google/ads/googleads/v25/enums/benchmarks_time_granularity.proto\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\"{\n#ListBenchmarksAvailableDatesRequest\x12T\n\x10\x61pplication_info\x18\x01 \x01(\x0b\x32:.google.ads.googleads.v25.common.AdditionalApplicationInfo\"k\n$ListBenchmarksAvailableDatesResponse\x12\x43\n\x0fsupported_dates\x18\x01 \x01(\x0b\x32*.google.ads.googleads.v25.common.DateRange\"v\n\x1eListBenchmarksLocationsRequest\x12T\n\x10\x61pplication_info\x18\x01 \x01(\x0b\x32:.google.ads.googleads.v25.common.AdditionalApplicationInfo\"v\n\x1fListBenchmarksLocationsResponse\x12S\n\x14\x62\x65nchmarks_locations\x18\x01 \x03(\x0b\x32\x35.google.ads.googleads.v25.services.BenchmarksLocation\"\x88\x01\n\x12\x42\x65nchmarksLocation\x12\x15\n\rlocation_name\x18\x01 \x01(\t\x12\x15\n\rlocation_type\x18\x02 \x01(\t\x12\x44\n\rlocation_info\x18\x03 \x01(\x0b\x32-.google.ads.googleads.v25.common.LocationInfo\"u\n\x1dListBenchmarksProductsRequest\x12T\n\x10\x61pplication_info\x18\x01 \x01(\x0b\x32:.google.ads.googleads.v25.common.AdditionalApplicationInfo\"{\n\x1eListBenchmarksProductsResponse\x12Y\n\x13\x62\x65nchmarks_products\x18\x01 \x03(\x0b\x32<.google.ads.googleads.v25.services.BenchmarksProductMetadata\"\xc3\x01\n\x19\x42\x65nchmarksProductMetadata\x12\x14\n\x0cproduct_name\x18\x01 \x01(\t\x12\x14\n\x0cproduct_code\x18\x02 \x01(\t\x12z\n\x13marketing_objective\x18\x03 \x01(\x0e\x32].google.ads.googleads.v25.enums.BenchmarksMarketingObjectiveEnum.BenchmarksMarketingObjective\"\xe4\x01\n\x1cListBenchmarksSourcesRequest\x12n\n\x12\x62\x65nchmarks_sources\x18\x01 \x03(\x0e\x32M.google.ads.googleads.v25.enums.BenchmarksSourceTypeEnum.BenchmarksSourceTypeB\x03\xe0\x41\x02\x12T\n\x10\x61pplication_info\x18\x02 \x01(\x0b\x32:.google.ads.googleads.v25.common.AdditionalApplicationInfo\"x\n\x1dListBenchmarksSourcesResponse\x12W\n\x12\x62\x65nchmarks_sources\x18\x01 \x03(\x0b\x32;.google.ads.googleads.v25.services.BenchmarksSourceMetadata\"\xfe\x01\n\x18\x42\x65nchmarksSourceMetadata\x12m\n\x16\x62\x65nchmarks_source_type\x18\x01 \x01(\x0e\x32M.google.ads.googleads.v25.enums.BenchmarksSourceTypeEnum.BenchmarksSourceType\x12Y\n\x16industry_vertical_info\x18\x02 \x01(\x0b\x32\x37.google.ads.googleads.v25.services.IndustryVerticalInfoH\x00\x42\x18\n\x16\x62\x65nchmarks_source_info\"y\n\x14IndustryVerticalInfo\x12\x1e\n\x16industry_vertical_name\x18\x01 \x01(\t\x12\x1c\n\x14industry_vertical_id\x18\x02 \x01(\x03\x12#\n\x1bparent_industry_vertical_id\x18\x03 \x01(\x03\"\xd6\x04\n GenerateBenchmarksMetricsRequest\x12\x18\n\x0b\x63ustomer_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12>\n\ndate_range\x18\x02 \x01(\x0b\x32*.google.ads.googleads.v25.common.DateRange\x12\x44\n\x08location\x18\x03 \x01(\x0b\x32-.google.ads.googleads.v25.common.LocationInfoB\x03\xe0\x41\x02\x12S\n\x11\x62\x65nchmarks_source\x18\x04 \x01(\x0b\x32\x33.google.ads.googleads.v25.services.BenchmarksSourceB\x03\xe0\x41\x02\x12M\n\x0eproduct_filter\x18\x05 \x01(\x0b\x32\x30.google.ads.googleads.v25.services.ProductFilterB\x03\xe0\x41\x02\x12Y\n\x14\x62reakdown_definition\x18\t \x01(\x0b\x32\x36.google.ads.googleads.v25.services.BreakdownDefinitionB\x03\xe0\x41\x01\x12\x1a\n\rcurrency_code\x18\x06 \x01(\tB\x03\xe0\x41\x01\x12!\n\x19\x63ustomer_benchmarks_group\x18\x07 \x01(\t\x12T\n\x10\x61pplication_info\x18\x08 \x01(\x0b\x32:.google.ads.googleads.v25.common.AdditionalApplicationInfo\"J\n\x10\x42\x65nchmarksSource\x12\x1e\n\x14industry_vertical_id\x18\x01 \x01(\x03H\x00\x42\x16\n\x14\x62\x65nchmarks_source_id\"\xae\x03\n\rProductFilter\x12T\n\x0cproduct_list\x18\x01 \x01(\x0b\x32<.google.ads.googleads.v25.services.ProductFilter.ProductListH\x00\x12k\n\x18marketing_objective_list\x18\x02 \x01(\x0b\x32G.google.ads.googleads.v25.services.ProductFilter.MarketingObjectiveListH\x00\x1a)\n\x0bProductList\x12\x1a\n\rproduct_codes\x18\x01 \x03(\tB\x03\xe0\x41\x02\x1a\x9b\x01\n\x16MarketingObjectiveList\x12\x80\x01\n\x14marketing_objectives\x18\x01 \x03(\x0e\x32].google.ads.googleads.v25.enums.BenchmarksMarketingObjectiveEnum.BenchmarksMarketingObjectiveB\x03\xe0\x41\x02\x42\x11\n\x0f\x66ilter_settings\"\x86\x01\n\x13\x42reakdownDefinition\x12o\n\x0e\x64\x61te_breakdown\x18\x01 \x01(\x0e\x32W.google.ads.googleads.v25.enums.BenchmarksTimeGranularityEnum.BenchmarksTimeGranularity\"\x91\x02\n!GenerateBenchmarksMetricsResponse\x12L\n\x10\x63ustomer_metrics\x18\x04 \x01(\x0b\x32\x32.google.ads.googleads.v25.services.CustomerMetrics\x12N\n\x1a\x61verage_benchmarks_metrics\x18\x02 \x01(\x0b\x32*.google.ads.googleads.v25.services.Metrics\x12N\n\x11\x62reakdown_metrics\x18\x03 \x03(\x0b\x32\x33.google.ads.googleads.v25.services.BreakdownMetrics\"\xf8\x01\n\x10\x42reakdownMetrics\x12\x46\n\rbreakdown_key\x18\x01 \x01(\x0b\x32/.google.ads.googleads.v25.services.BreakdownKey\x12L\n\x10\x63ustomer_metrics\x18\x04 \x01(\x0b\x32\x32.google.ads.googleads.v25.services.CustomerMetrics\x12N\n\x1a\x61verage_benchmarks_metrics\x18\x03 \x01(\x0b\x32*.google.ads.googleads.v25.services.Metrics\"I\n\x0c\x42reakdownKey\x12\x39\n\x05\x64\x61tes\x18\x01 \x01(\x0b\x32*.google.ads.googleads.v25.common.DateRange\"W\n\x07Metrics\x12L\n\x14\x61verage_rate_metrics\x18\x01 \x01(\x0b\x32..google.ads.googleads.v25.services.RateMetrics\"_\n\x0f\x43ustomerMetrics\x12L\n\x14\x61verage_rate_metrics\x18\x01 \x01(\x0b\x32..google.ads.googleads.v25.services.RateMetrics\"\xb9\x03\n\x0bRateMetrics\x12\x13\n\x0b\x61verage_cpm\x18\x01 \x01(\x01\x12\x1f\n\x17\x61verage_active_view_cpm\x18\x02 \x01(\x01\x12\x1c\n\x14trueview_average_cpv\x18\x03 \x01(\x01\x12\x13\n\x0b\x61verage_cpc\x18\x04 \x01(\x01\x12\x13\n\x0b\x61verage_cpi\x18\x05 \x01(\x01\x12\x13\n\x0b\x61verage_cpe\x18\x06 \x01(\x01\x12\x18\n\x10interaction_rate\x18\x07 \x01(\x01\x12\x17\n\x0f\x65ngagement_rate\x18\x08 \x01(\x01\x12\x1f\n\x17\x61\x63tive_view_viewability\x18\t \x01(\x01\x12\x1a\n\x12trueview_view_rate\x18\n \x01(\x01\x12\x1a\n\x12\x63lick_through_rate\x18\x0b \x01(\x01\x12!\n\x19video_completion_p25_rate\x18\x0c \x01(\x01\x12!\n\x19video_completion_p50_rate\x18\r \x01(\x01\x12!\n\x19video_completion_p75_rate\x18\x0e \x01(\x01\x12\"\n\x1avideo_completion_p100_rate\x18\x0f \x01(\x01\x32\xcd\t\n\x11\x42\x65nchmarksService\x12\xdd\x01\n\x1cListBenchmarksAvailableDates\x12\x46.google.ads.googleads.v25.services.ListBenchmarksAvailableDatesRequest\x1aG.google.ads.googleads.v25.services.ListBenchmarksAvailableDatesResponse\",\x82\xd3\xe4\x93\x02&\"!/v25:listBenchmarksAvailableDates:\x01*\x12\xc9\x01\n\x17ListBenchmarksLocations\x12\x41.google.ads.googleads.v25.services.ListBenchmarksLocationsRequest\x1a\x42.google.ads.googleads.v25.services.ListBenchmarksLocationsResponse\"\'\x82\xd3\xe4\x93\x02!\"\x1c/v25:listBenchmarksLocations:\x01*\x12\xc5\x01\n\x16ListBenchmarksProducts\x12@.google.ads.googleads.v25.services.ListBenchmarksProductsRequest\x1a\x41.google.ads.googleads.v25.services.ListBenchmarksProductsResponse\"&\x82\xd3\xe4\x93\x02 \"\x1b/v25:listBenchmarksProducts:\x01*\x12\xd6\x01\n\x15ListBenchmarksSources\x12?.google.ads.googleads.v25.services.ListBenchmarksSourcesRequest\x1a@.google.ads.googleads.v25.services.ListBenchmarksSourcesResponse\":\xda\x41\x12\x62\x65nchmarks_sources\x82\xd3\xe4\x93\x02\x1f\"\x1a/v25:listBenchmarksSources:\x01*\x12\xa3\x02\n\x19GenerateBenchmarksMetrics\x12\x43.google.ads.googleads.v25.services.GenerateBenchmarksMetricsRequest\x1a\x44.google.ads.googleads.v25.services.GenerateBenchmarksMetricsResponse\"{\xda\x41\x35\x63ustomer_id,location,benchmarks_source,product_filter\x82\xd3\xe4\x93\x02=\"8/v25/customers/{customer_id=*}:generateBenchmarksMetrics:\x01*\x1a\x45\xca\x41\x18googleads.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/adwordsB\x82\x02\n%com.google.ads.googleads.v25.servicesB\x16\x42\x65nchmarksServiceProtoP\x01ZIgoogle.golang.org/genproto/googleapis/ads/googleads/v25/services;services\xa2\x02\x03GAA\xaa\x02!Google.Ads.GoogleAds.V25.Services\xca\x02!Google\\Ads\\GoogleAds\\V25\\Services\xea\x02%Google::Ads::GoogleAds::V25::Servicesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Services + ListBenchmarksAvailableDatesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.ListBenchmarksAvailableDatesRequest").msgclass + ListBenchmarksAvailableDatesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.ListBenchmarksAvailableDatesResponse").msgclass + ListBenchmarksLocationsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.ListBenchmarksLocationsRequest").msgclass + ListBenchmarksLocationsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.ListBenchmarksLocationsResponse").msgclass + BenchmarksLocation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.BenchmarksLocation").msgclass + ListBenchmarksProductsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.ListBenchmarksProductsRequest").msgclass + ListBenchmarksProductsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.ListBenchmarksProductsResponse").msgclass + BenchmarksProductMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.BenchmarksProductMetadata").msgclass + ListBenchmarksSourcesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.ListBenchmarksSourcesRequest").msgclass + ListBenchmarksSourcesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.ListBenchmarksSourcesResponse").msgclass + BenchmarksSourceMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.BenchmarksSourceMetadata").msgclass + IndustryVerticalInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.IndustryVerticalInfo").msgclass + GenerateBenchmarksMetricsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.GenerateBenchmarksMetricsRequest").msgclass + BenchmarksSource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.BenchmarksSource").msgclass + ProductFilter = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.ProductFilter").msgclass + ProductFilter::ProductList = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.ProductFilter.ProductList").msgclass + ProductFilter::MarketingObjectiveList = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.ProductFilter.MarketingObjectiveList").msgclass + BreakdownDefinition = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.BreakdownDefinition").msgclass + GenerateBenchmarksMetricsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.GenerateBenchmarksMetricsResponse").msgclass + BreakdownMetrics = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.BreakdownMetrics").msgclass + BreakdownKey = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.BreakdownKey").msgclass + Metrics = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.Metrics").msgclass + CustomerMetrics = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.CustomerMetrics").msgclass + RateMetrics = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.RateMetrics").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/benchmarks_service_services_pb.rb b/lib/google/ads/google_ads/v25/services/benchmarks_service_services_pb.rb new file mode 100644 index 000000000..e029e4678 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/benchmarks_service_services_pb.rb @@ -0,0 +1,107 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/ads/googleads/v25/services/benchmarks_service.proto for package 'Google.Ads.GoogleAds.V25.Services' +# Original file comments: +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +require 'grpc' +require 'google/ads/google_ads/v25/services/benchmarks_service_pb' + +module Google + module Ads + module GoogleAds + module V25 + module Services + module BenchmarksService + # Proto file describing the benchmarks service. + # + # BenchmarksService helps users compare YouTube advertisement data against + # industry benchmarks. Accessible to allowlisted customers only. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.ads.googleads.v25.services.BenchmarksService' + + # Returns a date range that supports benchmarks. + # + # List of thrown errors: + # [AuthenticationError]() + # [AuthorizationError]() + # [FieldError]() + # [HeaderError]() + # [InternalError]() + # [QuotaError]() + # [RequestError]() + rpc :ListBenchmarksAvailableDates, ::Google::Ads::GoogleAds::V25::Services::ListBenchmarksAvailableDatesRequest, ::Google::Ads::GoogleAds::V25::Services::ListBenchmarksAvailableDatesResponse + # Returns the list of locations that support benchmarks (for example, + # countries). + # + # List of thrown errors: + # [AuthenticationError]() + # [AuthorizationError]() + # [FieldError]() + # [HeaderError]() + # [InternalError]() + # [QuotaError]() + # [RequestError]() + rpc :ListBenchmarksLocations, ::Google::Ads::GoogleAds::V25::Services::ListBenchmarksLocationsRequest, ::Google::Ads::GoogleAds::V25::Services::ListBenchmarksLocationsResponse + # Returns the list of products that supports benchmarks. + # + # List of thrown errors: + # [AuthenticationError]() + # [AuthorizationError]() + # [FieldError]() + # [HeaderError]() + # [InternalError]() + # [QuotaError]() + # [RequestError]() + rpc :ListBenchmarksProducts, ::Google::Ads::GoogleAds::V25::Services::ListBenchmarksProductsRequest, ::Google::Ads::GoogleAds::V25::Services::ListBenchmarksProductsResponse + # Returns the list of benchmarks sources (for example, Industry Verticals). + # + # List of thrown errors: + # [AuthenticationError]() + # [AuthorizationError]() + # [FieldError]() + # [HeaderError]() + # [InternalError]() + # [QuotaError]() + # [RequestError]() + rpc :ListBenchmarksSources, ::Google::Ads::GoogleAds::V25::Services::ListBenchmarksSourcesRequest, ::Google::Ads::GoogleAds::V25::Services::ListBenchmarksSourcesResponse + # Returns YouTube advertisement metrics for the given client against industry + # benchmarks. + # + # List of thrown errors: + # [AuthenticationError]() + # [AuthorizationError]() + # [BenchmarksError]() + # [FieldError]() + # [HeaderError]() + # [InternalError]() + # [QuotaError]() + # [RangeError]() + # [RequestError]() + rpc :GenerateBenchmarksMetrics, ::Google::Ads::GoogleAds::V25::Services::GenerateBenchmarksMetricsRequest, ::Google::Ads::GoogleAds::V25::Services::GenerateBenchmarksMetricsResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/bidding_data_exclusion_service.rb b/lib/google/ads/google_ads/v25/services/bidding_data_exclusion_service.rb new file mode 100644 index 000000000..f5d17040c --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/bidding_data_exclusion_service.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/ads/google_ads/version" + +require "google/ads/google_ads/v25/services/bidding_data_exclusion_service/credentials" +require "google/ads/google_ads/v25/services/bidding_data_exclusion_service/paths" +require "google/ads/google_ads/v25/services/bidding_data_exclusion_service/client" + +module Google + module Ads + module GoogleAds + module V25 + module Services + ## + # Service to manage bidding data exclusions. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/ads/google_ads/v25/services/bidding_data_exclusion_service" + # client = ::Google::Ads::GoogleAds::V25::Services::BiddingDataExclusionService::Client.new + # + module BiddingDataExclusionService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "bidding_data_exclusion_service", "helpers.rb" +require "google/ads/google_ads/v25/services/bidding_data_exclusion_service/helpers" if ::File.file? helper_path diff --git a/lib/google/ads/google_ads/v25/services/bidding_data_exclusion_service/client.rb b/lib/google/ads/google_ads/v25/services/bidding_data_exclusion_service/client.rb new file mode 100644 index 000000000..22f9034f6 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/bidding_data_exclusion_service/client.rb @@ -0,0 +1,492 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# require "google/ads/google_ads/error" +require "google/ads/google_ads/v25/services/bidding_data_exclusion_service_pb" + +module Google + module Ads + module GoogleAds + module V25 + module Services + module BiddingDataExclusionService + ## + # Client for the BiddingDataExclusionService service. + # + # Service to manage bidding data exclusions. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "googleads.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :bidding_data_exclusion_service_stub + + ## + # Configure the BiddingDataExclusionService Client class. + # + # See {::Google::Ads::GoogleAds::V25::Services::BiddingDataExclusionService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all BiddingDataExclusionService clients + # ::Google::Ads::GoogleAds::V25::Services::BiddingDataExclusionService::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + default_config = Client::Configuration.new + + default_config.timeout = 14_400.0 + default_config.retry_policy = { + initial_delay: 5.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the BiddingDataExclusionService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Ads::GoogleAds::V25::Services::BiddingDataExclusionService::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @bidding_data_exclusion_service_stub.universe_domain + end + + ## + # Create a new BiddingDataExclusionService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Ads::GoogleAds::V25::Services::BiddingDataExclusionService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Ads::GoogleAds::V25::Services::BiddingDataExclusionService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the BiddingDataExclusionService client. + # @yieldparam config [Client::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/ads/google_ads/v25/services/bidding_data_exclusion_service_services_pb" + + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @bidding_data_exclusion_service_stub = ::Gapic::ServiceStub.new( + ::Google::Ads::GoogleAds::V25::Services::BiddingDataExclusionService::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool, + logger: @config.logger + ) + + @bidding_data_exclusion_service_stub.stub_logger&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @bidding_data_exclusion_service_stub.logger + end + + # Service calls + + ## + # Creates, updates, or removes data exclusions. + # Operation statuses are returned. + # + # @overload mutate_bidding_data_exclusions(request, options = nil) + # Pass arguments to `mutate_bidding_data_exclusions` via a request object, either of type + # {::Google::Ads::GoogleAds::V25::Services::MutateBiddingDataExclusionsRequest} or an equivalent Hash. + # + # @param request [::Google::Ads::GoogleAds::V25::Services::MutateBiddingDataExclusionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload mutate_bidding_data_exclusions(customer_id: nil, operations: nil, partial_failure: nil, validate_only: nil, response_content_type: nil) + # Pass arguments to `mutate_bidding_data_exclusions` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param customer_id [::String] + # Required. ID of the customer whose data exclusions are being modified. + # @param operations [::Array<::Google::Ads::GoogleAds::V25::Services::BiddingDataExclusionOperation, ::Hash>] + # Required. The list of operations to perform on individual data exclusions. + # @param partial_failure [::Boolean] + # 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. + # @param validate_only [::Boolean] + # If true, the request is validated but not executed. Only errors are + # returned, not results. + # @param response_content_type [::Google::Ads::GoogleAds::V25::Enums::ResponseContentTypeEnum::ResponseContentType] + # The response content type setting. Determines whether the mutable resource + # or just the resource name should be returned post mutation. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Ads::GoogleAds::V25::Services::MutateBiddingDataExclusionsResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Ads::GoogleAds::V25::Services::MutateBiddingDataExclusionsResponse] + # + # @raise [Google::Ads::GoogleAds::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/ads/google_ads/v25/services" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Ads::GoogleAds::V25::Services::BiddingDataExclusionService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Ads::GoogleAds::V25::Services::MutateBiddingDataExclusionsRequest.new + # + # # Call the mutate_bidding_data_exclusions method. + # result = client.mutate_bidding_data_exclusions request + # + # # The returned object is of type Google::Ads::GoogleAds::V25::Services::MutateBiddingDataExclusionsResponse. + # p result + # + def mutate_bidding_data_exclusions request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::GoogleAds::V25::Services::MutateBiddingDataExclusionsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.mutate_bidding_data_exclusions.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Ads::GoogleAds::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.customer_id + header_params["customer_id"] = request.customer_id + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.mutate_bidding_data_exclusions.timeout, + metadata: metadata, + retry_policy: @config.rpcs.mutate_bidding_data_exclusions.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @bidding_data_exclusion_service_stub.call_rpc :mutate_bidding_data_exclusions, request, + options: options do |response, operation| + yield response, operation if block_given? + end + # rescue GRPC::BadStatus => grpc_error + # raise Google::Ads::GoogleAds::Error.new grpc_error.message + end + + ## + # Configuration class for the BiddingDataExclusionService API. + # + # This class represents the configuration for BiddingDataExclusionService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Ads::GoogleAds::V25::Services::BiddingDataExclusionService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # mutate_bidding_data_exclusions to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Ads::GoogleAds::V25::Services::BiddingDataExclusionService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.mutate_bidding_data_exclusions.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Ads::GoogleAds::V25::Services::BiddingDataExclusionService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.mutate_bidding_data_exclusions.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Ads::GoogleAds::V25::Services::BiddingDataExclusionService::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "googleads.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, + ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the BiddingDataExclusionService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `mutate_bidding_data_exclusions` + # @return [::Gapic::Config::Method] + # + attr_reader :mutate_bidding_data_exclusions + + # @private + def initialize parent_rpcs = nil + mutate_bidding_data_exclusions_config = parent_rpcs.mutate_bidding_data_exclusions if parent_rpcs.respond_to? :mutate_bidding_data_exclusions + @mutate_bidding_data_exclusions = ::Gapic::Config::Method.new mutate_bidding_data_exclusions_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/bidding_data_exclusion_service/credentials.rb b/lib/google/ads/google_ads/v25/services/bidding_data_exclusion_service/credentials.rb new file mode 100644 index 000000000..a3d3413c6 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/bidding_data_exclusion_service/credentials.rb @@ -0,0 +1,38 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Ads + module GoogleAds + module V25 + module Services + module BiddingDataExclusionService + # Credentials for the BiddingDataExclusionService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/adwords" + ] + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/bidding_data_exclusion_service/paths.rb b/lib/google/ads/google_ads/v25/services/bidding_data_exclusion_service/paths.rb new file mode 100644 index 000000000..741d4dff3 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/bidding_data_exclusion_service/paths.rb @@ -0,0 +1,69 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Ads + module GoogleAds + module V25 + module Services + module BiddingDataExclusionService + # Path helper methods for the BiddingDataExclusionService API. + module Paths + ## + # Create a fully-qualified BiddingDataExclusion resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/biddingDataExclusions/{seasonality_event_id}` + # + # @param customer_id [String] + # @param seasonality_event_id [String] + # + # @return [::String] + def bidding_data_exclusion_path customer_id:, seasonality_event_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/biddingDataExclusions/#{seasonality_event_id}" + end + + ## + # Create a fully-qualified Campaign resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/campaigns/{campaign_id}` + # + # @param customer_id [String] + # @param campaign_id [String] + # + # @return [::String] + def campaign_path customer_id:, campaign_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/campaigns/#{campaign_id}" + end + + extend self + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/bidding_data_exclusion_service_pb.rb b/lib/google/ads/google_ads/v25/services/bidding_data_exclusion_service_pb.rb new file mode 100644 index 000000000..924780ff5 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/bidding_data_exclusion_service_pb.rb @@ -0,0 +1,35 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/services/bidding_data_exclusion_service.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/enums/response_content_type_pb' +require 'google/ads/google_ads/v25/resources/bidding_data_exclusion_pb' +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/field_mask_pb' +require 'google/rpc/status_pb' + + +descriptor_data = "\nFgoogle/ads/googleads/v25/services/bidding_data_exclusion_service.proto\x12!google.ads.googleads.v25.services\x1a:google/ads/googleads/v25/enums/response_content_type.proto\x1a?google/ads/googleads/v25/resources/bidding_data_exclusion.proto\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\x1a\x17google/rpc/status.proto\"\xb5\x02\n\"MutateBiddingDataExclusionsRequest\x12\x18\n\x0b\x63ustomer_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12Y\n\noperations\x18\x02 \x03(\x0b\x32@.google.ads.googleads.v25.services.BiddingDataExclusionOperationB\x03\xe0\x41\x02\x12\x17\n\x0fpartial_failure\x18\x03 \x01(\x08\x12\x15\n\rvalidate_only\x18\x04 \x01(\x08\x12j\n\x15response_content_type\x18\x05 \x01(\x0e\x32K.google.ads.googleads.v25.enums.ResponseContentTypeEnum.ResponseContentType\"\xbb\x02\n\x1d\x42iddingDataExclusionOperation\x12/\n\x0bupdate_mask\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\x12J\n\x06\x63reate\x18\x01 \x01(\x0b\x32\x38.google.ads.googleads.v25.resources.BiddingDataExclusionH\x00\x12J\n\x06update\x18\x02 \x01(\x0b\x32\x38.google.ads.googleads.v25.resources.BiddingDataExclusionH\x00\x12\x44\n\x06remove\x18\x03 \x01(\tB2\xfa\x41/\n-googleads.googleapis.com/BiddingDataExclusionH\x00\x42\x0b\n\toperation\"\xaf\x01\n#MutateBiddingDataExclusionsResponse\x12\x31\n\x15partial_failure_error\x18\x03 \x01(\x0b\x32\x12.google.rpc.Status\x12U\n\x07results\x18\x02 \x03(\x0b\x32\x44.google.ads.googleads.v25.services.MutateBiddingDataExclusionsResult\"\xc8\x01\n!MutateBiddingDataExclusionsResult\x12I\n\rresource_name\x18\x01 \x01(\tB2\xfa\x41/\n-googleads.googleapis.com/BiddingDataExclusion\x12X\n\x16\x62idding_data_exclusion\x18\x02 \x01(\x0b\x32\x38.google.ads.googleads.v25.resources.BiddingDataExclusion2\xf4\x02\n\x1b\x42iddingDataExclusionService\x12\x8d\x02\n\x1bMutateBiddingDataExclusions\x12\x45.google.ads.googleads.v25.services.MutateBiddingDataExclusionsRequest\x1a\x46.google.ads.googleads.v25.services.MutateBiddingDataExclusionsResponse\"_\xda\x41\x16\x63ustomer_id,operations\x82\xd3\xe4\x93\x02@\";/v25/customers/{customer_id=*}/biddingDataExclusions:mutate:\x01*\x1a\x45\xca\x41\x18googleads.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/adwordsB\x8c\x02\n%com.google.ads.googleads.v25.servicesB BiddingDataExclusionServiceProtoP\x01ZIgoogle.golang.org/genproto/googleapis/ads/googleads/v25/services;services\xa2\x02\x03GAA\xaa\x02!Google.Ads.GoogleAds.V25.Services\xca\x02!Google\\Ads\\GoogleAds\\V25\\Services\xea\x02%Google::Ads::GoogleAds::V25::Servicesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Services + MutateBiddingDataExclusionsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.MutateBiddingDataExclusionsRequest").msgclass + BiddingDataExclusionOperation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.BiddingDataExclusionOperation").msgclass + MutateBiddingDataExclusionsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.MutateBiddingDataExclusionsResponse").msgclass + MutateBiddingDataExclusionsResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.MutateBiddingDataExclusionsResult").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/bidding_data_exclusion_service_services_pb.rb b/lib/google/ads/google_ads/v25/services/bidding_data_exclusion_service_services_pb.rb new file mode 100644 index 000000000..b1c8d4a8d --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/bidding_data_exclusion_service_services_pb.rb @@ -0,0 +1,48 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/ads/googleads/v25/services/bidding_data_exclusion_service.proto for package 'Google.Ads.GoogleAds.V25.Services' +# Original file comments: +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +require 'grpc' +require 'google/ads/google_ads/v25/services/bidding_data_exclusion_service_pb' + +module Google + module Ads + module GoogleAds + module V25 + module Services + module BiddingDataExclusionService + # Service to manage bidding data exclusions. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.ads.googleads.v25.services.BiddingDataExclusionService' + + # Creates, updates, or removes data exclusions. + # Operation statuses are returned. + rpc :MutateBiddingDataExclusions, ::Google::Ads::GoogleAds::V25::Services::MutateBiddingDataExclusionsRequest, ::Google::Ads::GoogleAds::V25::Services::MutateBiddingDataExclusionsResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/bidding_seasonality_adjustment_service.rb b/lib/google/ads/google_ads/v25/services/bidding_seasonality_adjustment_service.rb new file mode 100644 index 000000000..f557114e8 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/bidding_seasonality_adjustment_service.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/ads/google_ads/version" + +require "google/ads/google_ads/v25/services/bidding_seasonality_adjustment_service/credentials" +require "google/ads/google_ads/v25/services/bidding_seasonality_adjustment_service/paths" +require "google/ads/google_ads/v25/services/bidding_seasonality_adjustment_service/client" + +module Google + module Ads + module GoogleAds + module V25 + module Services + ## + # Service to manage bidding seasonality adjustments. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/ads/google_ads/v25/services/bidding_seasonality_adjustment_service" + # client = ::Google::Ads::GoogleAds::V25::Services::BiddingSeasonalityAdjustmentService::Client.new + # + module BiddingSeasonalityAdjustmentService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "bidding_seasonality_adjustment_service", "helpers.rb" +require "google/ads/google_ads/v25/services/bidding_seasonality_adjustment_service/helpers" if ::File.file? helper_path diff --git a/lib/google/ads/google_ads/v25/services/bidding_seasonality_adjustment_service/client.rb b/lib/google/ads/google_ads/v25/services/bidding_seasonality_adjustment_service/client.rb new file mode 100644 index 000000000..6a0a73e8e --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/bidding_seasonality_adjustment_service/client.rb @@ -0,0 +1,494 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# require "google/ads/google_ads/error" +require "google/ads/google_ads/v25/services/bidding_seasonality_adjustment_service_pb" + +module Google + module Ads + module GoogleAds + module V25 + module Services + module BiddingSeasonalityAdjustmentService + ## + # Client for the BiddingSeasonalityAdjustmentService service. + # + # Service to manage bidding seasonality adjustments. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "googleads.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :bidding_seasonality_adjustment_service_stub + + ## + # Configure the BiddingSeasonalityAdjustmentService Client class. + # + # See {::Google::Ads::GoogleAds::V25::Services::BiddingSeasonalityAdjustmentService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all BiddingSeasonalityAdjustmentService clients + # ::Google::Ads::GoogleAds::V25::Services::BiddingSeasonalityAdjustmentService::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + default_config = Client::Configuration.new + + default_config.timeout = 14_400.0 + default_config.retry_policy = { + initial_delay: 5.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the BiddingSeasonalityAdjustmentService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Ads::GoogleAds::V25::Services::BiddingSeasonalityAdjustmentService::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @bidding_seasonality_adjustment_service_stub.universe_domain + end + + ## + # Create a new BiddingSeasonalityAdjustmentService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Ads::GoogleAds::V25::Services::BiddingSeasonalityAdjustmentService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Ads::GoogleAds::V25::Services::BiddingSeasonalityAdjustmentService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the BiddingSeasonalityAdjustmentService client. + # @yieldparam config [Client::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/ads/google_ads/v25/services/bidding_seasonality_adjustment_service_services_pb" + + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @bidding_seasonality_adjustment_service_stub = ::Gapic::ServiceStub.new( + ::Google::Ads::GoogleAds::V25::Services::BiddingSeasonalityAdjustmentService::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool, + logger: @config.logger + ) + + @bidding_seasonality_adjustment_service_stub.stub_logger&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @bidding_seasonality_adjustment_service_stub.logger + end + + # Service calls + + ## + # Creates, updates, or removes seasonality adjustments. + # Operation statuses are returned. + # + # @overload mutate_bidding_seasonality_adjustments(request, options = nil) + # Pass arguments to `mutate_bidding_seasonality_adjustments` via a request object, either of type + # {::Google::Ads::GoogleAds::V25::Services::MutateBiddingSeasonalityAdjustmentsRequest} or an equivalent Hash. + # + # @param request [::Google::Ads::GoogleAds::V25::Services::MutateBiddingSeasonalityAdjustmentsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload mutate_bidding_seasonality_adjustments(customer_id: nil, operations: nil, partial_failure: nil, validate_only: nil, response_content_type: nil) + # Pass arguments to `mutate_bidding_seasonality_adjustments` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param customer_id [::String] + # Required. ID of the customer whose seasonality adjustments are being + # modified. + # @param operations [::Array<::Google::Ads::GoogleAds::V25::Services::BiddingSeasonalityAdjustmentOperation, ::Hash>] + # Required. The list of operations to perform on individual seasonality + # adjustments. + # @param partial_failure [::Boolean] + # 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. + # @param validate_only [::Boolean] + # If true, the request is validated but not executed. Only errors are + # returned, not results. + # @param response_content_type [::Google::Ads::GoogleAds::V25::Enums::ResponseContentTypeEnum::ResponseContentType] + # The response content type setting. Determines whether the mutable resource + # or just the resource name should be returned post mutation. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Ads::GoogleAds::V25::Services::MutateBiddingSeasonalityAdjustmentsResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Ads::GoogleAds::V25::Services::MutateBiddingSeasonalityAdjustmentsResponse] + # + # @raise [Google::Ads::GoogleAds::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/ads/google_ads/v25/services" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Ads::GoogleAds::V25::Services::BiddingSeasonalityAdjustmentService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Ads::GoogleAds::V25::Services::MutateBiddingSeasonalityAdjustmentsRequest.new + # + # # Call the mutate_bidding_seasonality_adjustments method. + # result = client.mutate_bidding_seasonality_adjustments request + # + # # The returned object is of type Google::Ads::GoogleAds::V25::Services::MutateBiddingSeasonalityAdjustmentsResponse. + # p result + # + def mutate_bidding_seasonality_adjustments request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::GoogleAds::V25::Services::MutateBiddingSeasonalityAdjustmentsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.mutate_bidding_seasonality_adjustments.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Ads::GoogleAds::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.customer_id + header_params["customer_id"] = request.customer_id + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.mutate_bidding_seasonality_adjustments.timeout, + metadata: metadata, + retry_policy: @config.rpcs.mutate_bidding_seasonality_adjustments.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @bidding_seasonality_adjustment_service_stub.call_rpc :mutate_bidding_seasonality_adjustments, request, + options: options do |response, operation| + yield response, operation if block_given? + end + # rescue GRPC::BadStatus => grpc_error + # raise Google::Ads::GoogleAds::Error.new grpc_error.message + end + + ## + # Configuration class for the BiddingSeasonalityAdjustmentService API. + # + # This class represents the configuration for BiddingSeasonalityAdjustmentService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Ads::GoogleAds::V25::Services::BiddingSeasonalityAdjustmentService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # mutate_bidding_seasonality_adjustments to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Ads::GoogleAds::V25::Services::BiddingSeasonalityAdjustmentService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.mutate_bidding_seasonality_adjustments.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Ads::GoogleAds::V25::Services::BiddingSeasonalityAdjustmentService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.mutate_bidding_seasonality_adjustments.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Ads::GoogleAds::V25::Services::BiddingSeasonalityAdjustmentService::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "googleads.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, + ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the BiddingSeasonalityAdjustmentService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `mutate_bidding_seasonality_adjustments` + # @return [::Gapic::Config::Method] + # + attr_reader :mutate_bidding_seasonality_adjustments + + # @private + def initialize parent_rpcs = nil + mutate_bidding_seasonality_adjustments_config = parent_rpcs.mutate_bidding_seasonality_adjustments if parent_rpcs.respond_to? :mutate_bidding_seasonality_adjustments + @mutate_bidding_seasonality_adjustments = ::Gapic::Config::Method.new mutate_bidding_seasonality_adjustments_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/bidding_seasonality_adjustment_service/credentials.rb b/lib/google/ads/google_ads/v25/services/bidding_seasonality_adjustment_service/credentials.rb new file mode 100644 index 000000000..51eb9fc78 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/bidding_seasonality_adjustment_service/credentials.rb @@ -0,0 +1,38 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Ads + module GoogleAds + module V25 + module Services + module BiddingSeasonalityAdjustmentService + # Credentials for the BiddingSeasonalityAdjustmentService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/adwords" + ] + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/bidding_seasonality_adjustment_service/paths.rb b/lib/google/ads/google_ads/v25/services/bidding_seasonality_adjustment_service/paths.rb new file mode 100644 index 000000000..b919f9a07 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/bidding_seasonality_adjustment_service/paths.rb @@ -0,0 +1,69 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Ads + module GoogleAds + module V25 + module Services + module BiddingSeasonalityAdjustmentService + # Path helper methods for the BiddingSeasonalityAdjustmentService API. + module Paths + ## + # Create a fully-qualified BiddingSeasonalityAdjustment resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/biddingSeasonalityAdjustments/{seasonality_event_id}` + # + # @param customer_id [String] + # @param seasonality_event_id [String] + # + # @return [::String] + def bidding_seasonality_adjustment_path customer_id:, seasonality_event_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/biddingSeasonalityAdjustments/#{seasonality_event_id}" + end + + ## + # Create a fully-qualified Campaign resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/campaigns/{campaign_id}` + # + # @param customer_id [String] + # @param campaign_id [String] + # + # @return [::String] + def campaign_path customer_id:, campaign_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/campaigns/#{campaign_id}" + end + + extend self + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/bidding_seasonality_adjustment_service_pb.rb b/lib/google/ads/google_ads/v25/services/bidding_seasonality_adjustment_service_pb.rb new file mode 100644 index 000000000..ecf5c37ea --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/bidding_seasonality_adjustment_service_pb.rb @@ -0,0 +1,35 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/services/bidding_seasonality_adjustment_service.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/enums/response_content_type_pb' +require 'google/ads/google_ads/v25/resources/bidding_seasonality_adjustment_pb' +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/field_mask_pb' +require 'google/rpc/status_pb' + + +descriptor_data = "\nNgoogle/ads/googleads/v25/services/bidding_seasonality_adjustment_service.proto\x12!google.ads.googleads.v25.services\x1a:google/ads/googleads/v25/enums/response_content_type.proto\x1aGgoogle/ads/googleads/v25/resources/bidding_seasonality_adjustment.proto\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\x1a\x17google/rpc/status.proto\"\xc5\x02\n*MutateBiddingSeasonalityAdjustmentsRequest\x12\x18\n\x0b\x63ustomer_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x61\n\noperations\x18\x02 \x03(\x0b\x32H.google.ads.googleads.v25.services.BiddingSeasonalityAdjustmentOperationB\x03\xe0\x41\x02\x12\x17\n\x0fpartial_failure\x18\x03 \x01(\x08\x12\x15\n\rvalidate_only\x18\x04 \x01(\x08\x12j\n\x15response_content_type\x18\x05 \x01(\x0e\x32K.google.ads.googleads.v25.enums.ResponseContentTypeEnum.ResponseContentType\"\xdb\x02\n%BiddingSeasonalityAdjustmentOperation\x12/\n\x0bupdate_mask\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\x12R\n\x06\x63reate\x18\x01 \x01(\x0b\x32@.google.ads.googleads.v25.resources.BiddingSeasonalityAdjustmentH\x00\x12R\n\x06update\x18\x02 \x01(\x0b\x32@.google.ads.googleads.v25.resources.BiddingSeasonalityAdjustmentH\x00\x12L\n\x06remove\x18\x03 \x01(\tB:\xfa\x41\x37\n5googleads.googleapis.com/BiddingSeasonalityAdjustmentH\x00\x42\x0b\n\toperation\"\xbf\x01\n+MutateBiddingSeasonalityAdjustmentsResponse\x12\x31\n\x15partial_failure_error\x18\x03 \x01(\x0b\x32\x12.google.rpc.Status\x12]\n\x07results\x18\x02 \x03(\x0b\x32L.google.ads.googleads.v25.services.MutateBiddingSeasonalityAdjustmentsResult\"\xe8\x01\n)MutateBiddingSeasonalityAdjustmentsResult\x12Q\n\rresource_name\x18\x01 \x01(\tB:\xfa\x41\x37\n5googleads.googleapis.com/BiddingSeasonalityAdjustment\x12h\n\x1e\x62idding_seasonality_adjustment\x18\x02 \x01(\x0b\x32@.google.ads.googleads.v25.resources.BiddingSeasonalityAdjustment2\x9c\x03\n#BiddingSeasonalityAdjustmentService\x12\xad\x02\n#MutateBiddingSeasonalityAdjustments\x12M.google.ads.googleads.v25.services.MutateBiddingSeasonalityAdjustmentsRequest\x1aN.google.ads.googleads.v25.services.MutateBiddingSeasonalityAdjustmentsResponse\"g\xda\x41\x16\x63ustomer_id,operations\x82\xd3\xe4\x93\x02H\"C/v25/customers/{customer_id=*}/biddingSeasonalityAdjustments:mutate:\x01*\x1a\x45\xca\x41\x18googleads.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/adwordsB\x94\x02\n%com.google.ads.googleads.v25.servicesB(BiddingSeasonalityAdjustmentServiceProtoP\x01ZIgoogle.golang.org/genproto/googleapis/ads/googleads/v25/services;services\xa2\x02\x03GAA\xaa\x02!Google.Ads.GoogleAds.V25.Services\xca\x02!Google\\Ads\\GoogleAds\\V25\\Services\xea\x02%Google::Ads::GoogleAds::V25::Servicesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Services + MutateBiddingSeasonalityAdjustmentsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.MutateBiddingSeasonalityAdjustmentsRequest").msgclass + BiddingSeasonalityAdjustmentOperation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.BiddingSeasonalityAdjustmentOperation").msgclass + MutateBiddingSeasonalityAdjustmentsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.MutateBiddingSeasonalityAdjustmentsResponse").msgclass + MutateBiddingSeasonalityAdjustmentsResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.MutateBiddingSeasonalityAdjustmentsResult").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/bidding_seasonality_adjustment_service_services_pb.rb b/lib/google/ads/google_ads/v25/services/bidding_seasonality_adjustment_service_services_pb.rb new file mode 100644 index 000000000..714f7f7c2 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/bidding_seasonality_adjustment_service_services_pb.rb @@ -0,0 +1,48 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/ads/googleads/v25/services/bidding_seasonality_adjustment_service.proto for package 'Google.Ads.GoogleAds.V25.Services' +# Original file comments: +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +require 'grpc' +require 'google/ads/google_ads/v25/services/bidding_seasonality_adjustment_service_pb' + +module Google + module Ads + module GoogleAds + module V25 + module Services + module BiddingSeasonalityAdjustmentService + # Service to manage bidding seasonality adjustments. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.ads.googleads.v25.services.BiddingSeasonalityAdjustmentService' + + # Creates, updates, or removes seasonality adjustments. + # Operation statuses are returned. + rpc :MutateBiddingSeasonalityAdjustments, ::Google::Ads::GoogleAds::V25::Services::MutateBiddingSeasonalityAdjustmentsRequest, ::Google::Ads::GoogleAds::V25::Services::MutateBiddingSeasonalityAdjustmentsResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/bidding_strategy_service.rb b/lib/google/ads/google_ads/v25/services/bidding_strategy_service.rb new file mode 100644 index 000000000..f483fa1ab --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/bidding_strategy_service.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/ads/google_ads/version" + +require "google/ads/google_ads/v25/services/bidding_strategy_service/credentials" +require "google/ads/google_ads/v25/services/bidding_strategy_service/paths" +require "google/ads/google_ads/v25/services/bidding_strategy_service/client" + +module Google + module Ads + module GoogleAds + module V25 + module Services + ## + # Service to manage bidding strategies. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/ads/google_ads/v25/services/bidding_strategy_service" + # client = ::Google::Ads::GoogleAds::V25::Services::BiddingStrategyService::Client.new + # + module BiddingStrategyService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "bidding_strategy_service", "helpers.rb" +require "google/ads/google_ads/v25/services/bidding_strategy_service/helpers" if ::File.file? helper_path diff --git a/lib/google/ads/google_ads/v25/services/bidding_strategy_service/client.rb b/lib/google/ads/google_ads/v25/services/bidding_strategy_service/client.rb new file mode 100644 index 000000000..069e5273b --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/bidding_strategy_service/client.rb @@ -0,0 +1,522 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# require "google/ads/google_ads/error" +require "google/ads/google_ads/v25/services/bidding_strategy_service_pb" + +module Google + module Ads + module GoogleAds + module V25 + module Services + module BiddingStrategyService + ## + # Client for the BiddingStrategyService service. + # + # Service to manage bidding strategies. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "googleads.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :bidding_strategy_service_stub + + ## + # Configure the BiddingStrategyService Client class. + # + # See {::Google::Ads::GoogleAds::V25::Services::BiddingStrategyService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all BiddingStrategyService clients + # ::Google::Ads::GoogleAds::V25::Services::BiddingStrategyService::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + default_config = Client::Configuration.new + + default_config.timeout = 14_400.0 + default_config.retry_policy = { + initial_delay: 5.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the BiddingStrategyService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Ads::GoogleAds::V25::Services::BiddingStrategyService::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @bidding_strategy_service_stub.universe_domain + end + + ## + # Create a new BiddingStrategyService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Ads::GoogleAds::V25::Services::BiddingStrategyService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Ads::GoogleAds::V25::Services::BiddingStrategyService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the BiddingStrategyService client. + # @yieldparam config [Client::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/ads/google_ads/v25/services/bidding_strategy_service_services_pb" + + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @bidding_strategy_service_stub = ::Gapic::ServiceStub.new( + ::Google::Ads::GoogleAds::V25::Services::BiddingStrategyService::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool, + logger: @config.logger + ) + + @bidding_strategy_service_stub.stub_logger&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @bidding_strategy_service_stub.logger + end + + # Service calls + + ## + # Creates, updates, or removes bidding strategies. Operation statuses are + # returned. + # + # List of thrown errors: + # [AdxError]() + # [AuthenticationError]() + # [AuthorizationError]() + # [BiddingError]() + # [BiddingStrategyError]() + # [ContextError]() + # [DatabaseError]() + # [DateError]() + # [DistinctError]() + # [FieldError]() + # [FieldMaskError]() + # [HeaderError]() + # [IdError]() + # [InternalError]() + # [MutateError]() + # [NewResourceCreationError]() + # [NotEmptyError]() + # [NullError]() + # [OperationAccessDeniedError]() + # [OperatorError]() + # [QuotaError]() + # [RangeError]() + # [RequestError]() + # [SizeLimitError]() + # [StringFormatError]() + # [StringLengthError]() + # + # @overload mutate_bidding_strategies(request, options = nil) + # Pass arguments to `mutate_bidding_strategies` via a request object, either of type + # {::Google::Ads::GoogleAds::V25::Services::MutateBiddingStrategiesRequest} or an equivalent Hash. + # + # @param request [::Google::Ads::GoogleAds::V25::Services::MutateBiddingStrategiesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload mutate_bidding_strategies(customer_id: nil, operations: nil, partial_failure: nil, validate_only: nil, response_content_type: nil) + # Pass arguments to `mutate_bidding_strategies` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param customer_id [::String] + # Required. The ID of the customer whose bidding strategies are being + # modified. + # @param operations [::Array<::Google::Ads::GoogleAds::V25::Services::BiddingStrategyOperation, ::Hash>] + # Required. The list of operations to perform on individual bidding + # strategies. + # @param partial_failure [::Boolean] + # 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. + # @param validate_only [::Boolean] + # If true, the request is validated but not executed. Only errors are + # returned, not results. + # @param response_content_type [::Google::Ads::GoogleAds::V25::Enums::ResponseContentTypeEnum::ResponseContentType] + # The response content type setting. Determines whether the mutable resource + # or just the resource name should be returned post mutation. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Ads::GoogleAds::V25::Services::MutateBiddingStrategiesResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Ads::GoogleAds::V25::Services::MutateBiddingStrategiesResponse] + # + # @raise [Google::Ads::GoogleAds::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/ads/google_ads/v25/services" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Ads::GoogleAds::V25::Services::BiddingStrategyService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Ads::GoogleAds::V25::Services::MutateBiddingStrategiesRequest.new + # + # # Call the mutate_bidding_strategies method. + # result = client.mutate_bidding_strategies request + # + # # The returned object is of type Google::Ads::GoogleAds::V25::Services::MutateBiddingStrategiesResponse. + # p result + # + def mutate_bidding_strategies request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::GoogleAds::V25::Services::MutateBiddingStrategiesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.mutate_bidding_strategies.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Ads::GoogleAds::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.customer_id + header_params["customer_id"] = request.customer_id + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.mutate_bidding_strategies.timeout, + metadata: metadata, + retry_policy: @config.rpcs.mutate_bidding_strategies.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @bidding_strategy_service_stub.call_rpc :mutate_bidding_strategies, request, + options: options do |response, operation| + yield response, operation if block_given? + end + # rescue GRPC::BadStatus => grpc_error + # raise Google::Ads::GoogleAds::Error.new grpc_error.message + end + + ## + # Configuration class for the BiddingStrategyService API. + # + # This class represents the configuration for BiddingStrategyService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Ads::GoogleAds::V25::Services::BiddingStrategyService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # mutate_bidding_strategies to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Ads::GoogleAds::V25::Services::BiddingStrategyService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.mutate_bidding_strategies.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Ads::GoogleAds::V25::Services::BiddingStrategyService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.mutate_bidding_strategies.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Ads::GoogleAds::V25::Services::BiddingStrategyService::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "googleads.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, + ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the BiddingStrategyService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `mutate_bidding_strategies` + # @return [::Gapic::Config::Method] + # + attr_reader :mutate_bidding_strategies + + # @private + def initialize parent_rpcs = nil + mutate_bidding_strategies_config = parent_rpcs.mutate_bidding_strategies if parent_rpcs.respond_to? :mutate_bidding_strategies + @mutate_bidding_strategies = ::Gapic::Config::Method.new mutate_bidding_strategies_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/bidding_strategy_service/credentials.rb b/lib/google/ads/google_ads/v25/services/bidding_strategy_service/credentials.rb new file mode 100644 index 000000000..209186685 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/bidding_strategy_service/credentials.rb @@ -0,0 +1,38 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Ads + module GoogleAds + module V25 + module Services + module BiddingStrategyService + # Credentials for the BiddingStrategyService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/adwords" + ] + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/bidding_strategy_service/paths.rb b/lib/google/ads/google_ads/v25/services/bidding_strategy_service/paths.rb new file mode 100644 index 000000000..75d830fea --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/bidding_strategy_service/paths.rb @@ -0,0 +1,52 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Ads + module GoogleAds + module V25 + module Services + module BiddingStrategyService + # Path helper methods for the BiddingStrategyService API. + module Paths + ## + # Create a fully-qualified BiddingStrategy resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/biddingStrategies/{bidding_strategy_id}` + # + # @param customer_id [String] + # @param bidding_strategy_id [String] + # + # @return [::String] + def bidding_strategy_path customer_id:, bidding_strategy_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/biddingStrategies/#{bidding_strategy_id}" + end + + extend self + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/bidding_strategy_service_pb.rb b/lib/google/ads/google_ads/v25/services/bidding_strategy_service_pb.rb new file mode 100644 index 000000000..1aed0bd9f --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/bidding_strategy_service_pb.rb @@ -0,0 +1,35 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/services/bidding_strategy_service.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/enums/response_content_type_pb' +require 'google/ads/google_ads/v25/resources/bidding_strategy_pb' +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/field_mask_pb' +require 'google/rpc/status_pb' + + +descriptor_data = "\n@google/ads/googleads/v25/services/bidding_strategy_service.proto\x12!google.ads.googleads.v25.services\x1a:google/ads/googleads/v25/enums/response_content_type.proto\x1a\x39google/ads/googleads/v25/resources/bidding_strategy.proto\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\x1a\x17google/rpc/status.proto\"\xac\x02\n\x1eMutateBiddingStrategiesRequest\x12\x18\n\x0b\x63ustomer_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12T\n\noperations\x18\x02 \x03(\x0b\x32;.google.ads.googleads.v25.services.BiddingStrategyOperationB\x03\xe0\x41\x02\x12\x17\n\x0fpartial_failure\x18\x03 \x01(\x08\x12\x15\n\rvalidate_only\x18\x04 \x01(\x08\x12j\n\x15response_content_type\x18\x05 \x01(\x0e\x32K.google.ads.googleads.v25.enums.ResponseContentTypeEnum.ResponseContentType\"\xa7\x02\n\x18\x42iddingStrategyOperation\x12/\n\x0bupdate_mask\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\x12\x45\n\x06\x63reate\x18\x01 \x01(\x0b\x32\x33.google.ads.googleads.v25.resources.BiddingStrategyH\x00\x12\x45\n\x06update\x18\x02 \x01(\x0b\x32\x33.google.ads.googleads.v25.resources.BiddingStrategyH\x00\x12?\n\x06remove\x18\x03 \x01(\tB-\xfa\x41*\n(googleads.googleapis.com/BiddingStrategyH\x00\x42\x0b\n\toperation\"\xa5\x01\n\x1fMutateBiddingStrategiesResponse\x12\x31\n\x15partial_failure_error\x18\x03 \x01(\x0b\x32\x12.google.rpc.Status\x12O\n\x07results\x18\x02 \x03(\x0b\x32>.google.ads.googleads.v25.services.MutateBiddingStrategyResult\"\xb2\x01\n\x1bMutateBiddingStrategyResult\x12\x44\n\rresource_name\x18\x01 \x01(\tB-\xfa\x41*\n(googleads.googleapis.com/BiddingStrategy\x12M\n\x10\x62idding_strategy\x18\x02 \x01(\x0b\x32\x33.google.ads.googleads.v25.resources.BiddingStrategy2\xdf\x02\n\x16\x42iddingStrategyService\x12\xfd\x01\n\x17MutateBiddingStrategies\x12\x41.google.ads.googleads.v25.services.MutateBiddingStrategiesRequest\x1a\x42.google.ads.googleads.v25.services.MutateBiddingStrategiesResponse\"[\xda\x41\x16\x63ustomer_id,operations\x82\xd3\xe4\x93\x02<\"7/v25/customers/{customer_id=*}/biddingStrategies:mutate:\x01*\x1a\x45\xca\x41\x18googleads.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/adwordsB\x87\x02\n%com.google.ads.googleads.v25.servicesB\x1b\x42iddingStrategyServiceProtoP\x01ZIgoogle.golang.org/genproto/googleapis/ads/googleads/v25/services;services\xa2\x02\x03GAA\xaa\x02!Google.Ads.GoogleAds.V25.Services\xca\x02!Google\\Ads\\GoogleAds\\V25\\Services\xea\x02%Google::Ads::GoogleAds::V25::Servicesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Services + MutateBiddingStrategiesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.MutateBiddingStrategiesRequest").msgclass + BiddingStrategyOperation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.BiddingStrategyOperation").msgclass + MutateBiddingStrategiesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.MutateBiddingStrategiesResponse").msgclass + MutateBiddingStrategyResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.MutateBiddingStrategyResult").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/bidding_strategy_service_services_pb.rb b/lib/google/ads/google_ads/v25/services/bidding_strategy_service_services_pb.rb new file mode 100644 index 000000000..6028c4e3d --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/bidding_strategy_service_services_pb.rb @@ -0,0 +1,78 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/ads/googleads/v25/services/bidding_strategy_service.proto for package 'Google.Ads.GoogleAds.V25.Services' +# Original file comments: +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +require 'grpc' +require 'google/ads/google_ads/v25/services/bidding_strategy_service_pb' + +module Google + module Ads + module GoogleAds + module V25 + module Services + module BiddingStrategyService + # Proto file describing the Bidding Strategy service. + # + # Service to manage bidding strategies. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.ads.googleads.v25.services.BiddingStrategyService' + + # Creates, updates, or removes bidding strategies. Operation statuses are + # returned. + # + # List of thrown errors: + # [AdxError]() + # [AuthenticationError]() + # [AuthorizationError]() + # [BiddingError]() + # [BiddingStrategyError]() + # [ContextError]() + # [DatabaseError]() + # [DateError]() + # [DistinctError]() + # [FieldError]() + # [FieldMaskError]() + # [HeaderError]() + # [IdError]() + # [InternalError]() + # [MutateError]() + # [NewResourceCreationError]() + # [NotEmptyError]() + # [NullError]() + # [OperationAccessDeniedError]() + # [OperatorError]() + # [QuotaError]() + # [RangeError]() + # [RequestError]() + # [SizeLimitError]() + # [StringFormatError]() + # [StringLengthError]() + rpc :MutateBiddingStrategies, ::Google::Ads::GoogleAds::V25::Services::MutateBiddingStrategiesRequest, ::Google::Ads::GoogleAds::V25::Services::MutateBiddingStrategiesResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/billing_setup_service.rb b/lib/google/ads/google_ads/v25/services/billing_setup_service.rb new file mode 100644 index 000000000..a154ee899 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/billing_setup_service.rb @@ -0,0 +1,59 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/ads/google_ads/version" + +require "google/ads/google_ads/v25/services/billing_setup_service/credentials" +require "google/ads/google_ads/v25/services/billing_setup_service/paths" +require "google/ads/google_ads/v25/services/billing_setup_service/client" + +module Google + module Ads + module GoogleAds + module V25 + module Services + ## + # 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. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/ads/google_ads/v25/services/billing_setup_service" + # client = ::Google::Ads::GoogleAds::V25::Services::BillingSetupService::Client.new + # + module BillingSetupService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "billing_setup_service", "helpers.rb" +require "google/ads/google_ads/v25/services/billing_setup_service/helpers" if ::File.file? helper_path diff --git a/lib/google/ads/google_ads/v25/services/billing_setup_service/client.rb b/lib/google/ads/google_ads/v25/services/billing_setup_service/client.rb new file mode 100644 index 000000000..86237818f --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/billing_setup_service/client.rb @@ -0,0 +1,501 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# require "google/ads/google_ads/error" +require "google/ads/google_ads/v25/services/billing_setup_service_pb" + +module Google + module Ads + module GoogleAds + module V25 + module Services + module BillingSetupService + ## + # Client for the BillingSetupService 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. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "googleads.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :billing_setup_service_stub + + ## + # Configure the BillingSetupService Client class. + # + # See {::Google::Ads::GoogleAds::V25::Services::BillingSetupService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all BillingSetupService clients + # ::Google::Ads::GoogleAds::V25::Services::BillingSetupService::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + default_config = Client::Configuration.new + + default_config.timeout = 14_400.0 + default_config.retry_policy = { + initial_delay: 5.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the BillingSetupService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Ads::GoogleAds::V25::Services::BillingSetupService::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @billing_setup_service_stub.universe_domain + end + + ## + # Create a new BillingSetupService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Ads::GoogleAds::V25::Services::BillingSetupService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Ads::GoogleAds::V25::Services::BillingSetupService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the BillingSetupService client. + # @yieldparam config [Client::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/ads/google_ads/v25/services/billing_setup_service_services_pb" + + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @billing_setup_service_stub = ::Gapic::ServiceStub.new( + ::Google::Ads::GoogleAds::V25::Services::BillingSetupService::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool, + logger: @config.logger + ) + + @billing_setup_service_stub.stub_logger&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @billing_setup_service_stub.logger + end + + # Service calls + + ## + # Creates a billing setup, or cancels an existing billing setup. + # + # List of thrown errors: + # [AuthenticationError]() + # [AuthorizationError]() + # [BillingSetupError]() + # [DateError]() + # [FieldError]() + # [HeaderError]() + # [InternalError]() + # [MutateError]() + # [QuotaError]() + # [RequestError]() + # + # @overload mutate_billing_setup(request, options = nil) + # Pass arguments to `mutate_billing_setup` via a request object, either of type + # {::Google::Ads::GoogleAds::V25::Services::MutateBillingSetupRequest} or an equivalent Hash. + # + # @param request [::Google::Ads::GoogleAds::V25::Services::MutateBillingSetupRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload mutate_billing_setup(customer_id: nil, operation: nil) + # Pass arguments to `mutate_billing_setup` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param customer_id [::String] + # Required. Id of the customer to apply the billing setup mutate operation + # to. + # @param operation [::Google::Ads::GoogleAds::V25::Services::BillingSetupOperation, ::Hash] + # Required. The operation to perform. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Ads::GoogleAds::V25::Services::MutateBillingSetupResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Ads::GoogleAds::V25::Services::MutateBillingSetupResponse] + # + # @raise [Google::Ads::GoogleAds::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/ads/google_ads/v25/services" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Ads::GoogleAds::V25::Services::BillingSetupService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Ads::GoogleAds::V25::Services::MutateBillingSetupRequest.new + # + # # Call the mutate_billing_setup method. + # result = client.mutate_billing_setup request + # + # # The returned object is of type Google::Ads::GoogleAds::V25::Services::MutateBillingSetupResponse. + # p result + # + def mutate_billing_setup request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::GoogleAds::V25::Services::MutateBillingSetupRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.mutate_billing_setup.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Ads::GoogleAds::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.customer_id + header_params["customer_id"] = request.customer_id + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.mutate_billing_setup.timeout, + metadata: metadata, + retry_policy: @config.rpcs.mutate_billing_setup.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @billing_setup_service_stub.call_rpc :mutate_billing_setup, request, + options: options do |response, operation| + yield response, operation if block_given? + end + # rescue GRPC::BadStatus => grpc_error + # raise Google::Ads::GoogleAds::Error.new grpc_error.message + end + + ## + # Configuration class for the BillingSetupService API. + # + # This class represents the configuration for BillingSetupService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Ads::GoogleAds::V25::Services::BillingSetupService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # mutate_billing_setup to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Ads::GoogleAds::V25::Services::BillingSetupService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.mutate_billing_setup.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Ads::GoogleAds::V25::Services::BillingSetupService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.mutate_billing_setup.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Ads::GoogleAds::V25::Services::BillingSetupService::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "googleads.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, + ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the BillingSetupService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `mutate_billing_setup` + # @return [::Gapic::Config::Method] + # + attr_reader :mutate_billing_setup + + # @private + def initialize parent_rpcs = nil + mutate_billing_setup_config = parent_rpcs.mutate_billing_setup if parent_rpcs.respond_to? :mutate_billing_setup + @mutate_billing_setup = ::Gapic::Config::Method.new mutate_billing_setup_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/billing_setup_service/credentials.rb b/lib/google/ads/google_ads/v25/services/billing_setup_service/credentials.rb new file mode 100644 index 000000000..e30b32671 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/billing_setup_service/credentials.rb @@ -0,0 +1,38 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Ads + module GoogleAds + module V25 + module Services + module BillingSetupService + # Credentials for the BillingSetupService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/adwords" + ] + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/billing_setup_service/paths.rb b/lib/google/ads/google_ads/v25/services/billing_setup_service/paths.rb new file mode 100644 index 000000000..38c06d0aa --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/billing_setup_service/paths.rb @@ -0,0 +1,69 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Ads + module GoogleAds + module V25 + module Services + module BillingSetupService + # Path helper methods for the BillingSetupService API. + module Paths + ## + # Create a fully-qualified BillingSetup resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/billingSetups/{billing_setup_id}` + # + # @param customer_id [String] + # @param billing_setup_id [String] + # + # @return [::String] + def billing_setup_path customer_id:, billing_setup_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/billingSetups/#{billing_setup_id}" + end + + ## + # Create a fully-qualified PaymentsAccount resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/paymentsAccounts/{payments_account_id}` + # + # @param customer_id [String] + # @param payments_account_id [String] + # + # @return [::String] + def payments_account_path customer_id:, payments_account_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/paymentsAccounts/#{payments_account_id}" + end + + extend self + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/billing_setup_service_pb.rb b/lib/google/ads/google_ads/v25/services/billing_setup_service_pb.rb new file mode 100644 index 000000000..b3c1e03dd --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/billing_setup_service_pb.rb @@ -0,0 +1,32 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/services/billing_setup_service.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/resources/billing_setup_pb' +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' + + +descriptor_data = "\n=google/ads/googleads/v25/services/billing_setup_service.proto\x12!google.ads.googleads.v25.services\x1a\x36google/ads/googleads/v25/resources/billing_setup.proto\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\x87\x01\n\x19MutateBillingSetupRequest\x12\x18\n\x0b\x63ustomer_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12P\n\toperation\x18\x02 \x01(\x0b\x32\x38.google.ads.googleads.v25.services.BillingSetupOperationB\x03\xe0\x41\x02\"\xa6\x01\n\x15\x42illingSetupOperation\x12\x42\n\x06\x63reate\x18\x02 \x01(\x0b\x32\x30.google.ads.googleads.v25.resources.BillingSetupH\x00\x12<\n\x06remove\x18\x01 \x01(\tB*\xfa\x41\'\n%googleads.googleapis.com/BillingSetupH\x00\x42\x0b\n\toperation\"i\n\x1aMutateBillingSetupResponse\x12K\n\x06result\x18\x01 \x01(\x0b\x32;.google.ads.googleads.v25.services.MutateBillingSetupResult\"]\n\x18MutateBillingSetupResult\x12\x41\n\rresource_name\x18\x01 \x01(\tB*\xfa\x41\'\n%googleads.googleapis.com/BillingSetup2\xc8\x02\n\x13\x42illingSetupService\x12\xe9\x01\n\x12MutateBillingSetup\x12<.google.ads.googleads.v25.services.MutateBillingSetupRequest\x1a=.google.ads.googleads.v25.services.MutateBillingSetupResponse\"V\xda\x41\x15\x63ustomer_id,operation\x82\xd3\xe4\x93\x02\x38\"3/v25/customers/{customer_id=*}/billingSetups:mutate:\x01*\x1a\x45\xca\x41\x18googleads.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/adwordsB\x84\x02\n%com.google.ads.googleads.v25.servicesB\x18\x42illingSetupServiceProtoP\x01ZIgoogle.golang.org/genproto/googleapis/ads/googleads/v25/services;services\xa2\x02\x03GAA\xaa\x02!Google.Ads.GoogleAds.V25.Services\xca\x02!Google\\Ads\\GoogleAds\\V25\\Services\xea\x02%Google::Ads::GoogleAds::V25::Servicesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Services + MutateBillingSetupRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.MutateBillingSetupRequest").msgclass + BillingSetupOperation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.BillingSetupOperation").msgclass + MutateBillingSetupResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.MutateBillingSetupResponse").msgclass + MutateBillingSetupResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.MutateBillingSetupResult").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/billing_setup_service_services_pb.rb b/lib/google/ads/google_ads/v25/services/billing_setup_service_services_pb.rb new file mode 100644 index 000000000..7304b5dc0 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/billing_setup_service_services_pb.rb @@ -0,0 +1,69 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/ads/googleads/v25/services/billing_setup_service.proto for package 'Google.Ads.GoogleAds.V25.Services' +# Original file comments: +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +require 'grpc' +require 'google/ads/google_ads/v25/services/billing_setup_service_pb' + +module Google + module Ads + module GoogleAds + module V25 + module Services + module BillingSetupService + # 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. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.ads.googleads.v25.services.BillingSetupService' + + # Creates a billing setup, or cancels an existing billing setup. + # + # List of thrown errors: + # [AuthenticationError]() + # [AuthorizationError]() + # [BillingSetupError]() + # [DateError]() + # [FieldError]() + # [HeaderError]() + # [InternalError]() + # [MutateError]() + # [QuotaError]() + # [RequestError]() + rpc :MutateBillingSetup, ::Google::Ads::GoogleAds::V25::Services::MutateBillingSetupRequest, ::Google::Ads::GoogleAds::V25::Services::MutateBillingSetupResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/brand_suggestion_service.rb b/lib/google/ads/google_ads/v25/services/brand_suggestion_service.rb new file mode 100644 index 000000000..3d0a453ac --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/brand_suggestion_service.rb @@ -0,0 +1,50 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/ads/google_ads/version" + +require "google/ads/google_ads/v25/services/brand_suggestion_service/credentials" +require "google/ads/google_ads/v25/services/brand_suggestion_service/client" + +module Google + module Ads + module GoogleAds + module V25 + module Services + ## + # This service will suggest brands based on a prefix. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/ads/google_ads/v25/services/brand_suggestion_service" + # client = ::Google::Ads::GoogleAds::V25::Services::BrandSuggestionService::Client.new + # + module BrandSuggestionService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "brand_suggestion_service", "helpers.rb" +require "google/ads/google_ads/v25/services/brand_suggestion_service/helpers" if ::File.file? helper_path diff --git a/lib/google/ads/google_ads/v25/services/brand_suggestion_service/client.rb b/lib/google/ads/google_ads/v25/services/brand_suggestion_service/client.rb new file mode 100644 index 000000000..50844c099 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/brand_suggestion_service/client.rb @@ -0,0 +1,483 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# require "google/ads/google_ads/error" +require "google/ads/google_ads/v25/services/brand_suggestion_service_pb" + +module Google + module Ads + module GoogleAds + module V25 + module Services + module BrandSuggestionService + ## + # Client for the BrandSuggestionService service. + # + # This service will suggest brands based on a prefix. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "googleads.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :brand_suggestion_service_stub + + ## + # Configure the BrandSuggestionService Client class. + # + # See {::Google::Ads::GoogleAds::V25::Services::BrandSuggestionService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all BrandSuggestionService clients + # ::Google::Ads::GoogleAds::V25::Services::BrandSuggestionService::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + default_config = Client::Configuration.new + + default_config.timeout = 14_400.0 + default_config.retry_policy = { + initial_delay: 5.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the BrandSuggestionService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Ads::GoogleAds::V25::Services::BrandSuggestionService::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @brand_suggestion_service_stub.universe_domain + end + + ## + # Create a new BrandSuggestionService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Ads::GoogleAds::V25::Services::BrandSuggestionService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Ads::GoogleAds::V25::Services::BrandSuggestionService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the BrandSuggestionService client. + # @yieldparam config [Client::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/ads/google_ads/v25/services/brand_suggestion_service_services_pb" + + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @brand_suggestion_service_stub = ::Gapic::ServiceStub.new( + ::Google::Ads::GoogleAds::V25::Services::BrandSuggestionService::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool, + logger: @config.logger + ) + + @brand_suggestion_service_stub.stub_logger&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @brand_suggestion_service_stub.logger + end + + # Service calls + + ## + # Rpc to return a list of matching brands based on a prefix for this + # customer. + # + # @overload suggest_brands(request, options = nil) + # Pass arguments to `suggest_brands` via a request object, either of type + # {::Google::Ads::GoogleAds::V25::Services::SuggestBrandsRequest} or an equivalent Hash. + # + # @param request [::Google::Ads::GoogleAds::V25::Services::SuggestBrandsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload suggest_brands(customer_id: nil, brand_prefix: nil, selected_brands: nil) + # Pass arguments to `suggest_brands` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param customer_id [::String] + # Required. The ID of the customer onto which to apply the brand suggestion + # operation. + # @param brand_prefix [::String] + # Required. The prefix of a brand name. + # @param selected_brands [::Array<::String>] + # Optional. Ids of the brands already selected by advertisers. They will be + # excluded in response. These are expected to be brand ids not brand names. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Ads::GoogleAds::V25::Services::SuggestBrandsResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Ads::GoogleAds::V25::Services::SuggestBrandsResponse] + # + # @raise [Google::Ads::GoogleAds::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/ads/google_ads/v25/services" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Ads::GoogleAds::V25::Services::BrandSuggestionService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Ads::GoogleAds::V25::Services::SuggestBrandsRequest.new + # + # # Call the suggest_brands method. + # result = client.suggest_brands request + # + # # The returned object is of type Google::Ads::GoogleAds::V25::Services::SuggestBrandsResponse. + # p result + # + def suggest_brands request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::GoogleAds::V25::Services::SuggestBrandsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.suggest_brands.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Ads::GoogleAds::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.customer_id + header_params["customer_id"] = request.customer_id + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.suggest_brands.timeout, + metadata: metadata, + retry_policy: @config.rpcs.suggest_brands.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @brand_suggestion_service_stub.call_rpc :suggest_brands, request, + options: options do |response, operation| + yield response, operation if block_given? + end + # rescue GRPC::BadStatus => grpc_error + # raise Google::Ads::GoogleAds::Error.new grpc_error.message + end + + ## + # Configuration class for the BrandSuggestionService API. + # + # This class represents the configuration for BrandSuggestionService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Ads::GoogleAds::V25::Services::BrandSuggestionService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # suggest_brands to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Ads::GoogleAds::V25::Services::BrandSuggestionService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.suggest_brands.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Ads::GoogleAds::V25::Services::BrandSuggestionService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.suggest_brands.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Ads::GoogleAds::V25::Services::BrandSuggestionService::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "googleads.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, + ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the BrandSuggestionService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `suggest_brands` + # @return [::Gapic::Config::Method] + # + attr_reader :suggest_brands + + # @private + def initialize parent_rpcs = nil + suggest_brands_config = parent_rpcs.suggest_brands if parent_rpcs.respond_to? :suggest_brands + @suggest_brands = ::Gapic::Config::Method.new suggest_brands_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/brand_suggestion_service/credentials.rb b/lib/google/ads/google_ads/v25/services/brand_suggestion_service/credentials.rb new file mode 100644 index 000000000..f722b14ec --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/brand_suggestion_service/credentials.rb @@ -0,0 +1,38 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Ads + module GoogleAds + module V25 + module Services + module BrandSuggestionService + # Credentials for the BrandSuggestionService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/adwords" + ] + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/brand_suggestion_service_pb.rb b/lib/google/ads/google_ads/v25/services/brand_suggestion_service_pb.rb new file mode 100644 index 000000000..17017ad01 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/brand_suggestion_service_pb.rb @@ -0,0 +1,30 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/services/brand_suggestion_service.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/enums/brand_state_pb' +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' + + +descriptor_data = "\n@google/ads/googleads/v25/services/brand_suggestion_service.proto\x12!google.ads.googleads.v25.services\x1a\x30google/ads/googleads/v25/enums/brand_state.proto\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\"\x7f\n\x14SuggestBrandsRequest\x12\x18\n\x0b\x63ustomer_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x1e\n\x0c\x62rand_prefix\x18\x02 \x01(\tB\x03\xe0\x41\x02H\x00\x88\x01\x01\x12\x1c\n\x0fselected_brands\x18\x03 \x03(\tB\x03\xe0\x41\x01\x42\x0f\n\r_brand_prefix\"[\n\x15SuggestBrandsResponse\x12\x42\n\x06\x62rands\x18\x01 \x03(\x0b\x32\x32.google.ads.googleads.v25.services.BrandSuggestion\"\x83\x01\n\x0f\x42randSuggestion\x12\n\n\x02id\x18\x01 \x01(\t\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x0c\n\x04urls\x18\x03 \x03(\t\x12H\n\x05state\x18\x04 \x01(\x0e\x32\x39.google.ads.googleads.v25.enums.BrandStateEnum.BrandState2\xb8\x02\n\x16\x42randSuggestionService\x12\xd6\x01\n\rSuggestBrands\x12\x37.google.ads.googleads.v25.services.SuggestBrandsRequest\x1a\x38.google.ads.googleads.v25.services.SuggestBrandsResponse\"R\xda\x41\x18\x63ustomer_id,brand_prefix\x82\xd3\xe4\x93\x02\x31\",/v25/customers/{customer_id=*}:suggestBrands:\x01*\x1a\x45\xca\x41\x18googleads.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/adwordsB\x87\x02\n%com.google.ads.googleads.v25.servicesB\x1b\x42randSuggestionServiceProtoP\x01ZIgoogle.golang.org/genproto/googleapis/ads/googleads/v25/services;services\xa2\x02\x03GAA\xaa\x02!Google.Ads.GoogleAds.V25.Services\xca\x02!Google\\Ads\\GoogleAds\\V25\\Services\xea\x02%Google::Ads::GoogleAds::V25::Servicesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Services + SuggestBrandsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.SuggestBrandsRequest").msgclass + SuggestBrandsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.SuggestBrandsResponse").msgclass + BrandSuggestion = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.BrandSuggestion").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/brand_suggestion_service_services_pb.rb b/lib/google/ads/google_ads/v25/services/brand_suggestion_service_services_pb.rb new file mode 100644 index 000000000..b8bcdd7d4 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/brand_suggestion_service_services_pb.rb @@ -0,0 +1,50 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/ads/googleads/v25/services/brand_suggestion_service.proto for package 'Google.Ads.GoogleAds.V25.Services' +# Original file comments: +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +require 'grpc' +require 'google/ads/google_ads/v25/services/brand_suggestion_service_pb' + +module Google + module Ads + module GoogleAds + module V25 + module Services + module BrandSuggestionService + # Proto file describing the MerchantCenterLink service. + # + # This service will suggest brands based on a prefix. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.ads.googleads.v25.services.BrandSuggestionService' + + # Rpc to return a list of matching brands based on a prefix for this + # customer. + rpc :SuggestBrands, ::Google::Ads::GoogleAds::V25::Services::SuggestBrandsRequest, ::Google::Ads::GoogleAds::V25::Services::SuggestBrandsResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/campaign_asset_service.rb b/lib/google/ads/google_ads/v25/services/campaign_asset_service.rb new file mode 100644 index 000000000..a97bfe04b --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/campaign_asset_service.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/ads/google_ads/version" + +require "google/ads/google_ads/v25/services/campaign_asset_service/credentials" +require "google/ads/google_ads/v25/services/campaign_asset_service/paths" +require "google/ads/google_ads/v25/services/campaign_asset_service/client" + +module Google + module Ads + module GoogleAds + module V25 + module Services + ## + # Service to manage campaign assets. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/ads/google_ads/v25/services/campaign_asset_service" + # client = ::Google::Ads::GoogleAds::V25::Services::CampaignAssetService::Client.new + # + module CampaignAssetService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "campaign_asset_service", "helpers.rb" +require "google/ads/google_ads/v25/services/campaign_asset_service/helpers" if ::File.file? helper_path diff --git a/lib/google/ads/google_ads/v25/services/campaign_asset_service/client.rb b/lib/google/ads/google_ads/v25/services/campaign_asset_service/client.rb new file mode 100644 index 000000000..9330c0863 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/campaign_asset_service/client.rb @@ -0,0 +1,506 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# require "google/ads/google_ads/error" +require "google/ads/google_ads/v25/services/campaign_asset_service_pb" + +module Google + module Ads + module GoogleAds + module V25 + module Services + module CampaignAssetService + ## + # Client for the CampaignAssetService service. + # + # Service to manage campaign assets. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "googleads.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :campaign_asset_service_stub + + ## + # Configure the CampaignAssetService Client class. + # + # See {::Google::Ads::GoogleAds::V25::Services::CampaignAssetService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all CampaignAssetService clients + # ::Google::Ads::GoogleAds::V25::Services::CampaignAssetService::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + default_config = Client::Configuration.new + + default_config.timeout = 14_400.0 + default_config.retry_policy = { + initial_delay: 5.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the CampaignAssetService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Ads::GoogleAds::V25::Services::CampaignAssetService::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @campaign_asset_service_stub.universe_domain + end + + ## + # Create a new CampaignAssetService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Ads::GoogleAds::V25::Services::CampaignAssetService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Ads::GoogleAds::V25::Services::CampaignAssetService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the CampaignAssetService client. + # @yieldparam config [Client::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/ads/google_ads/v25/services/campaign_asset_service_services_pb" + + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @campaign_asset_service_stub = ::Gapic::ServiceStub.new( + ::Google::Ads::GoogleAds::V25::Services::CampaignAssetService::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool, + logger: @config.logger + ) + + @campaign_asset_service_stub.stub_logger&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @campaign_asset_service_stub.logger + end + + # Service calls + + ## + # Creates, updates, or removes campaign assets. Operation statuses are + # returned. + # + # List of thrown errors: + # [AssetLinkError]() + # [AuthenticationError]() + # [AuthorizationError]() + # [ContextError]() + # [DatabaseError]() + # [FieldError]() + # [HeaderError]() + # [InternalError]() + # [MutateError]() + # [NotAllowlistedError]() + # [QuotaError]() + # [RequestError]() + # + # @overload mutate_campaign_assets(request, options = nil) + # Pass arguments to `mutate_campaign_assets` via a request object, either of type + # {::Google::Ads::GoogleAds::V25::Services::MutateCampaignAssetsRequest} or an equivalent Hash. + # + # @param request [::Google::Ads::GoogleAds::V25::Services::MutateCampaignAssetsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload mutate_campaign_assets(customer_id: nil, operations: nil, partial_failure: nil, validate_only: nil, response_content_type: nil) + # Pass arguments to `mutate_campaign_assets` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param customer_id [::String] + # Required. The ID of the customer whose campaign assets are being modified. + # @param operations [::Array<::Google::Ads::GoogleAds::V25::Services::CampaignAssetOperation, ::Hash>] + # Required. The list of operations to perform on individual campaign assets. + # @param partial_failure [::Boolean] + # 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. + # @param validate_only [::Boolean] + # If true, the request is validated but not executed. Only errors are + # returned, not results. + # @param response_content_type [::Google::Ads::GoogleAds::V25::Enums::ResponseContentTypeEnum::ResponseContentType] + # The response content type setting. Determines whether the mutable resource + # or just the resource name should be returned post mutation. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Ads::GoogleAds::V25::Services::MutateCampaignAssetsResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Ads::GoogleAds::V25::Services::MutateCampaignAssetsResponse] + # + # @raise [Google::Ads::GoogleAds::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/ads/google_ads/v25/services" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Ads::GoogleAds::V25::Services::CampaignAssetService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Ads::GoogleAds::V25::Services::MutateCampaignAssetsRequest.new + # + # # Call the mutate_campaign_assets method. + # result = client.mutate_campaign_assets request + # + # # The returned object is of type Google::Ads::GoogleAds::V25::Services::MutateCampaignAssetsResponse. + # p result + # + def mutate_campaign_assets request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::GoogleAds::V25::Services::MutateCampaignAssetsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.mutate_campaign_assets.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Ads::GoogleAds::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.customer_id + header_params["customer_id"] = request.customer_id + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.mutate_campaign_assets.timeout, + metadata: metadata, + retry_policy: @config.rpcs.mutate_campaign_assets.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @campaign_asset_service_stub.call_rpc :mutate_campaign_assets, request, + options: options do |response, operation| + yield response, operation if block_given? + end + # rescue GRPC::BadStatus => grpc_error + # raise Google::Ads::GoogleAds::Error.new grpc_error.message + end + + ## + # Configuration class for the CampaignAssetService API. + # + # This class represents the configuration for CampaignAssetService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Ads::GoogleAds::V25::Services::CampaignAssetService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # mutate_campaign_assets to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Ads::GoogleAds::V25::Services::CampaignAssetService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.mutate_campaign_assets.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Ads::GoogleAds::V25::Services::CampaignAssetService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.mutate_campaign_assets.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Ads::GoogleAds::V25::Services::CampaignAssetService::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "googleads.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, + ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the CampaignAssetService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `mutate_campaign_assets` + # @return [::Gapic::Config::Method] + # + attr_reader :mutate_campaign_assets + + # @private + def initialize parent_rpcs = nil + mutate_campaign_assets_config = parent_rpcs.mutate_campaign_assets if parent_rpcs.respond_to? :mutate_campaign_assets + @mutate_campaign_assets = ::Gapic::Config::Method.new mutate_campaign_assets_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/campaign_asset_service/credentials.rb b/lib/google/ads/google_ads/v25/services/campaign_asset_service/credentials.rb new file mode 100644 index 000000000..c2aca5fcc --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/campaign_asset_service/credentials.rb @@ -0,0 +1,38 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Ads + module GoogleAds + module V25 + module Services + module CampaignAssetService + # Credentials for the CampaignAssetService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/adwords" + ] + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/campaign_asset_service/paths.rb b/lib/google/ads/google_ads/v25/services/campaign_asset_service/paths.rb new file mode 100644 index 000000000..83eb86a14 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/campaign_asset_service/paths.rb @@ -0,0 +1,90 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Ads + module GoogleAds + module V25 + module Services + module CampaignAssetService + # Path helper methods for the CampaignAssetService API. + module Paths + ## + # Create a fully-qualified Asset resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/assets/{asset_id}` + # + # @param customer_id [String] + # @param asset_id [String] + # + # @return [::String] + def asset_path customer_id:, asset_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/assets/#{asset_id}" + end + + ## + # Create a fully-qualified Campaign resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/campaigns/{campaign_id}` + # + # @param customer_id [String] + # @param campaign_id [String] + # + # @return [::String] + def campaign_path customer_id:, campaign_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/campaigns/#{campaign_id}" + end + + ## + # Create a fully-qualified CampaignAsset resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/campaignAssets/{campaign_id}~{asset_id}~{field_type}` + # + # @param customer_id [String] + # @param campaign_id [String] + # @param asset_id [String] + # @param field_type [String] + # + # @return [::String] + def campaign_asset_path customer_id:, campaign_id:, asset_id:, field_type: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + raise ::ArgumentError, "campaign_id cannot contain /" if campaign_id.to_s.include? "/" + raise ::ArgumentError, "asset_id cannot contain /" if asset_id.to_s.include? "/" + + "customers/#{customer_id}/campaignAssets/#{campaign_id}~#{asset_id}~#{field_type}" + end + + extend self + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/campaign_asset_service_pb.rb b/lib/google/ads/google_ads/v25/services/campaign_asset_service_pb.rb new file mode 100644 index 000000000..1a39b676a --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/campaign_asset_service_pb.rb @@ -0,0 +1,35 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/services/campaign_asset_service.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/enums/response_content_type_pb' +require 'google/ads/google_ads/v25/resources/campaign_asset_pb' +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/field_mask_pb' +require 'google/rpc/status_pb' + + +descriptor_data = "\n>google/ads/googleads/v25/services/campaign_asset_service.proto\x12!google.ads.googleads.v25.services\x1a:google/ads/googleads/v25/enums/response_content_type.proto\x1a\x37google/ads/googleads/v25/resources/campaign_asset.proto\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\x1a\x17google/rpc/status.proto\"\xa7\x02\n\x1bMutateCampaignAssetsRequest\x12\x18\n\x0b\x63ustomer_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12R\n\noperations\x18\x02 \x03(\x0b\x32\x39.google.ads.googleads.v25.services.CampaignAssetOperationB\x03\xe0\x41\x02\x12\x17\n\x0fpartial_failure\x18\x03 \x01(\x08\x12\x15\n\rvalidate_only\x18\x04 \x01(\x08\x12j\n\x15response_content_type\x18\x05 \x01(\x0e\x32K.google.ads.googleads.v25.enums.ResponseContentTypeEnum.ResponseContentType\"\x9f\x02\n\x16\x43\x61mpaignAssetOperation\x12/\n\x0bupdate_mask\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\x12\x43\n\x06\x63reate\x18\x01 \x01(\x0b\x32\x31.google.ads.googleads.v25.resources.CampaignAssetH\x00\x12\x43\n\x06update\x18\x03 \x01(\x0b\x32\x31.google.ads.googleads.v25.resources.CampaignAssetH\x00\x12=\n\x06remove\x18\x02 \x01(\tB+\xfa\x41(\n&googleads.googleapis.com/CampaignAssetH\x00\x42\x0b\n\toperation\"\xa0\x01\n\x1cMutateCampaignAssetsResponse\x12\x31\n\x15partial_failure_error\x18\x01 \x01(\x0b\x32\x12.google.rpc.Status\x12M\n\x07results\x18\x02 \x03(\x0b\x32<.google.ads.googleads.v25.services.MutateCampaignAssetResult\"\xaa\x01\n\x19MutateCampaignAssetResult\x12\x42\n\rresource_name\x18\x01 \x01(\tB+\xfa\x41(\n&googleads.googleapis.com/CampaignAsset\x12I\n\x0e\x63\x61mpaign_asset\x18\x02 \x01(\x0b\x32\x31.google.ads.googleads.v25.resources.CampaignAsset2\xd1\x02\n\x14\x43\x61mpaignAssetService\x12\xf1\x01\n\x14MutateCampaignAssets\x12>.google.ads.googleads.v25.services.MutateCampaignAssetsRequest\x1a?.google.ads.googleads.v25.services.MutateCampaignAssetsResponse\"X\xda\x41\x16\x63ustomer_id,operations\x82\xd3\xe4\x93\x02\x39\"4/v25/customers/{customer_id=*}/campaignAssets:mutate:\x01*\x1a\x45\xca\x41\x18googleads.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/adwordsB\x85\x02\n%com.google.ads.googleads.v25.servicesB\x19\x43\x61mpaignAssetServiceProtoP\x01ZIgoogle.golang.org/genproto/googleapis/ads/googleads/v25/services;services\xa2\x02\x03GAA\xaa\x02!Google.Ads.GoogleAds.V25.Services\xca\x02!Google\\Ads\\GoogleAds\\V25\\Services\xea\x02%Google::Ads::GoogleAds::V25::Servicesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Services + MutateCampaignAssetsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.MutateCampaignAssetsRequest").msgclass + CampaignAssetOperation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.CampaignAssetOperation").msgclass + MutateCampaignAssetsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.MutateCampaignAssetsResponse").msgclass + MutateCampaignAssetResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.MutateCampaignAssetResult").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/campaign_asset_service_services_pb.rb b/lib/google/ads/google_ads/v25/services/campaign_asset_service_services_pb.rb new file mode 100644 index 000000000..5dc0e1c87 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/campaign_asset_service_services_pb.rb @@ -0,0 +1,64 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/ads/googleads/v25/services/campaign_asset_service.proto for package 'Google.Ads.GoogleAds.V25.Services' +# Original file comments: +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +require 'grpc' +require 'google/ads/google_ads/v25/services/campaign_asset_service_pb' + +module Google + module Ads + module GoogleAds + module V25 + module Services + module CampaignAssetService + # Proto file describing the CampaignAsset service. + # + # Service to manage campaign assets. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.ads.googleads.v25.services.CampaignAssetService' + + # Creates, updates, or removes campaign assets. Operation statuses are + # returned. + # + # List of thrown errors: + # [AssetLinkError]() + # [AuthenticationError]() + # [AuthorizationError]() + # [ContextError]() + # [DatabaseError]() + # [FieldError]() + # [HeaderError]() + # [InternalError]() + # [MutateError]() + # [NotAllowlistedError]() + # [QuotaError]() + # [RequestError]() + rpc :MutateCampaignAssets, ::Google::Ads::GoogleAds::V25::Services::MutateCampaignAssetsRequest, ::Google::Ads::GoogleAds::V25::Services::MutateCampaignAssetsResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/campaign_asset_set_service.rb b/lib/google/ads/google_ads/v25/services/campaign_asset_set_service.rb new file mode 100644 index 000000000..5b6b62f47 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/campaign_asset_set_service.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/ads/google_ads/version" + +require "google/ads/google_ads/v25/services/campaign_asset_set_service/credentials" +require "google/ads/google_ads/v25/services/campaign_asset_set_service/paths" +require "google/ads/google_ads/v25/services/campaign_asset_set_service/client" + +module Google + module Ads + module GoogleAds + module V25 + module Services + ## + # Service to manage campaign asset set + # + # @example Load this service and instantiate a gRPC client + # + # require "google/ads/google_ads/v25/services/campaign_asset_set_service" + # client = ::Google::Ads::GoogleAds::V25::Services::CampaignAssetSetService::Client.new + # + module CampaignAssetSetService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "campaign_asset_set_service", "helpers.rb" +require "google/ads/google_ads/v25/services/campaign_asset_set_service/helpers" if ::File.file? helper_path diff --git a/lib/google/ads/google_ads/v25/services/campaign_asset_set_service/client.rb b/lib/google/ads/google_ads/v25/services/campaign_asset_set_service/client.rb new file mode 100644 index 000000000..fe48b42d6 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/campaign_asset_set_service/client.rb @@ -0,0 +1,494 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# require "google/ads/google_ads/error" +require "google/ads/google_ads/v25/services/campaign_asset_set_service_pb" + +module Google + module Ads + module GoogleAds + module V25 + module Services + module CampaignAssetSetService + ## + # Client for the CampaignAssetSetService service. + # + # Service to manage campaign asset set + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "googleads.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :campaign_asset_set_service_stub + + ## + # Configure the CampaignAssetSetService Client class. + # + # See {::Google::Ads::GoogleAds::V25::Services::CampaignAssetSetService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all CampaignAssetSetService clients + # ::Google::Ads::GoogleAds::V25::Services::CampaignAssetSetService::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + default_config = Client::Configuration.new + + default_config.timeout = 14_400.0 + default_config.retry_policy = { + initial_delay: 5.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the CampaignAssetSetService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Ads::GoogleAds::V25::Services::CampaignAssetSetService::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @campaign_asset_set_service_stub.universe_domain + end + + ## + # Create a new CampaignAssetSetService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Ads::GoogleAds::V25::Services::CampaignAssetSetService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Ads::GoogleAds::V25::Services::CampaignAssetSetService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the CampaignAssetSetService client. + # @yieldparam config [Client::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/ads/google_ads/v25/services/campaign_asset_set_service_services_pb" + + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @campaign_asset_set_service_stub = ::Gapic::ServiceStub.new( + ::Google::Ads::GoogleAds::V25::Services::CampaignAssetSetService::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool, + logger: @config.logger + ) + + @campaign_asset_set_service_stub.stub_logger&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @campaign_asset_set_service_stub.logger + end + + # Service calls + + ## + # Creates, updates or removes campaign asset sets. Operation statuses are + # returned. + # + # @overload mutate_campaign_asset_sets(request, options = nil) + # Pass arguments to `mutate_campaign_asset_sets` via a request object, either of type + # {::Google::Ads::GoogleAds::V25::Services::MutateCampaignAssetSetsRequest} or an equivalent Hash. + # + # @param request [::Google::Ads::GoogleAds::V25::Services::MutateCampaignAssetSetsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload mutate_campaign_asset_sets(customer_id: nil, operations: nil, partial_failure: nil, validate_only: nil, response_content_type: nil) + # Pass arguments to `mutate_campaign_asset_sets` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param customer_id [::String] + # Required. The ID of the customer whose campaign asset sets are being + # modified. + # @param operations [::Array<::Google::Ads::GoogleAds::V25::Services::CampaignAssetSetOperation, ::Hash>] + # Required. The list of operations to perform on individual campaign asset + # sets. + # @param partial_failure [::Boolean] + # 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. + # @param validate_only [::Boolean] + # If true, the request is validated but not executed. Only errors are + # returned, not results. + # @param response_content_type [::Google::Ads::GoogleAds::V25::Enums::ResponseContentTypeEnum::ResponseContentType] + # The response content type setting. Determines whether the mutable resource + # or just the resource name should be returned post mutation. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Ads::GoogleAds::V25::Services::MutateCampaignAssetSetsResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Ads::GoogleAds::V25::Services::MutateCampaignAssetSetsResponse] + # + # @raise [Google::Ads::GoogleAds::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/ads/google_ads/v25/services" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Ads::GoogleAds::V25::Services::CampaignAssetSetService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Ads::GoogleAds::V25::Services::MutateCampaignAssetSetsRequest.new + # + # # Call the mutate_campaign_asset_sets method. + # result = client.mutate_campaign_asset_sets request + # + # # The returned object is of type Google::Ads::GoogleAds::V25::Services::MutateCampaignAssetSetsResponse. + # p result + # + def mutate_campaign_asset_sets request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::GoogleAds::V25::Services::MutateCampaignAssetSetsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.mutate_campaign_asset_sets.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Ads::GoogleAds::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.customer_id + header_params["customer_id"] = request.customer_id + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.mutate_campaign_asset_sets.timeout, + metadata: metadata, + retry_policy: @config.rpcs.mutate_campaign_asset_sets.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @campaign_asset_set_service_stub.call_rpc :mutate_campaign_asset_sets, request, + options: options do |response, operation| + yield response, operation if block_given? + end + # rescue GRPC::BadStatus => grpc_error + # raise Google::Ads::GoogleAds::Error.new grpc_error.message + end + + ## + # Configuration class for the CampaignAssetSetService API. + # + # This class represents the configuration for CampaignAssetSetService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Ads::GoogleAds::V25::Services::CampaignAssetSetService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # mutate_campaign_asset_sets to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Ads::GoogleAds::V25::Services::CampaignAssetSetService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.mutate_campaign_asset_sets.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Ads::GoogleAds::V25::Services::CampaignAssetSetService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.mutate_campaign_asset_sets.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Ads::GoogleAds::V25::Services::CampaignAssetSetService::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "googleads.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, + ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the CampaignAssetSetService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `mutate_campaign_asset_sets` + # @return [::Gapic::Config::Method] + # + attr_reader :mutate_campaign_asset_sets + + # @private + def initialize parent_rpcs = nil + mutate_campaign_asset_sets_config = parent_rpcs.mutate_campaign_asset_sets if parent_rpcs.respond_to? :mutate_campaign_asset_sets + @mutate_campaign_asset_sets = ::Gapic::Config::Method.new mutate_campaign_asset_sets_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/campaign_asset_set_service/credentials.rb b/lib/google/ads/google_ads/v25/services/campaign_asset_set_service/credentials.rb new file mode 100644 index 000000000..57e790286 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/campaign_asset_set_service/credentials.rb @@ -0,0 +1,38 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Ads + module GoogleAds + module V25 + module Services + module CampaignAssetSetService + # Credentials for the CampaignAssetSetService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/adwords" + ] + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/campaign_asset_set_service/paths.rb b/lib/google/ads/google_ads/v25/services/campaign_asset_set_service/paths.rb new file mode 100644 index 000000000..33e509284 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/campaign_asset_set_service/paths.rb @@ -0,0 +1,88 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Ads + module GoogleAds + module V25 + module Services + module CampaignAssetSetService + # Path helper methods for the CampaignAssetSetService API. + module Paths + ## + # Create a fully-qualified AssetSet resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/assetSets/{asset_set_id}` + # + # @param customer_id [String] + # @param asset_set_id [String] + # + # @return [::String] + def asset_set_path customer_id:, asset_set_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/assetSets/#{asset_set_id}" + end + + ## + # Create a fully-qualified Campaign resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/campaigns/{campaign_id}` + # + # @param customer_id [String] + # @param campaign_id [String] + # + # @return [::String] + def campaign_path customer_id:, campaign_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/campaigns/#{campaign_id}" + end + + ## + # Create a fully-qualified CampaignAssetSet resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/campaignAssetSets/{campaign_id}~{asset_set_id}` + # + # @param customer_id [String] + # @param campaign_id [String] + # @param asset_set_id [String] + # + # @return [::String] + def campaign_asset_set_path customer_id:, campaign_id:, asset_set_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + raise ::ArgumentError, "campaign_id cannot contain /" if campaign_id.to_s.include? "/" + + "customers/#{customer_id}/campaignAssetSets/#{campaign_id}~#{asset_set_id}" + end + + extend self + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/campaign_asset_set_service_pb.rb b/lib/google/ads/google_ads/v25/services/campaign_asset_set_service_pb.rb new file mode 100644 index 000000000..6488555f4 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/campaign_asset_set_service_pb.rb @@ -0,0 +1,34 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/services/campaign_asset_set_service.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/enums/response_content_type_pb' +require 'google/ads/google_ads/v25/resources/campaign_asset_set_pb' +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/rpc/status_pb' + + +descriptor_data = "\nBgoogle/ads/googleads/v25/services/campaign_asset_set_service.proto\x12!google.ads.googleads.v25.services\x1a:google/ads/googleads/v25/enums/response_content_type.proto\x1a;google/ads/googleads/v25/resources/campaign_asset_set.proto\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x17google/rpc/status.proto\"\xad\x02\n\x1eMutateCampaignAssetSetsRequest\x12\x18\n\x0b\x63ustomer_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12U\n\noperations\x18\x02 \x03(\x0b\x32<.google.ads.googleads.v25.services.CampaignAssetSetOperationB\x03\xe0\x41\x02\x12\x17\n\x0fpartial_failure\x18\x03 \x01(\x08\x12\x15\n\rvalidate_only\x18\x04 \x01(\x08\x12j\n\x15response_content_type\x18\x05 \x01(\x0e\x32K.google.ads.googleads.v25.enums.ResponseContentTypeEnum.ResponseContentType\"\xb2\x01\n\x19\x43\x61mpaignAssetSetOperation\x12\x46\n\x06\x63reate\x18\x01 \x01(\x0b\x32\x34.google.ads.googleads.v25.resources.CampaignAssetSetH\x00\x12@\n\x06remove\x18\x02 \x01(\tB.\xfa\x41+\n)googleads.googleapis.com/CampaignAssetSetH\x00\x42\x0b\n\toperation\"\xa6\x01\n\x1fMutateCampaignAssetSetsResponse\x12P\n\x07results\x18\x01 \x03(\x0b\x32?.google.ads.googleads.v25.services.MutateCampaignAssetSetResult\x12\x31\n\x15partial_failure_error\x18\x02 \x01(\x0b\x32\x12.google.rpc.Status\"\xb7\x01\n\x1cMutateCampaignAssetSetResult\x12\x45\n\rresource_name\x18\x01 \x01(\tB.\xfa\x41+\n)googleads.googleapis.com/CampaignAssetSet\x12P\n\x12\x63\x61mpaign_asset_set\x18\x02 \x01(\x0b\x32\x34.google.ads.googleads.v25.resources.CampaignAssetSet2\xe0\x02\n\x17\x43\x61mpaignAssetSetService\x12\xfd\x01\n\x17MutateCampaignAssetSets\x12\x41.google.ads.googleads.v25.services.MutateCampaignAssetSetsRequest\x1a\x42.google.ads.googleads.v25.services.MutateCampaignAssetSetsResponse\"[\xda\x41\x16\x63ustomer_id,operations\x82\xd3\xe4\x93\x02<\"7/v25/customers/{customer_id=*}/campaignAssetSets:mutate:\x01*\x1a\x45\xca\x41\x18googleads.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/adwordsB\x88\x02\n%com.google.ads.googleads.v25.servicesB\x1c\x43\x61mpaignAssetSetServiceProtoP\x01ZIgoogle.golang.org/genproto/googleapis/ads/googleads/v25/services;services\xa2\x02\x03GAA\xaa\x02!Google.Ads.GoogleAds.V25.Services\xca\x02!Google\\Ads\\GoogleAds\\V25\\Services\xea\x02%Google::Ads::GoogleAds::V25::Servicesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Services + MutateCampaignAssetSetsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.MutateCampaignAssetSetsRequest").msgclass + CampaignAssetSetOperation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.CampaignAssetSetOperation").msgclass + MutateCampaignAssetSetsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.MutateCampaignAssetSetsResponse").msgclass + MutateCampaignAssetSetResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.MutateCampaignAssetSetResult").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/campaign_asset_set_service_services_pb.rb b/lib/google/ads/google_ads/v25/services/campaign_asset_set_service_services_pb.rb new file mode 100644 index 000000000..fdb54d690 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/campaign_asset_set_service_services_pb.rb @@ -0,0 +1,50 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/ads/googleads/v25/services/campaign_asset_set_service.proto for package 'Google.Ads.GoogleAds.V25.Services' +# Original file comments: +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +require 'grpc' +require 'google/ads/google_ads/v25/services/campaign_asset_set_service_pb' + +module Google + module Ads + module GoogleAds + module V25 + module Services + module CampaignAssetSetService + # Proto file describing the CampaignAssetSet service. + # + # Service to manage campaign asset set + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.ads.googleads.v25.services.CampaignAssetSetService' + + # Creates, updates or removes campaign asset sets. Operation statuses are + # returned. + rpc :MutateCampaignAssetSets, ::Google::Ads::GoogleAds::V25::Services::MutateCampaignAssetSetsRequest, ::Google::Ads::GoogleAds::V25::Services::MutateCampaignAssetSetsResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/campaign_bid_modifier_service.rb b/lib/google/ads/google_ads/v25/services/campaign_bid_modifier_service.rb new file mode 100644 index 000000000..e1a0bfca1 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/campaign_bid_modifier_service.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/ads/google_ads/version" + +require "google/ads/google_ads/v25/services/campaign_bid_modifier_service/credentials" +require "google/ads/google_ads/v25/services/campaign_bid_modifier_service/paths" +require "google/ads/google_ads/v25/services/campaign_bid_modifier_service/client" + +module Google + module Ads + module GoogleAds + module V25 + module Services + ## + # Service to manage campaign bid modifiers. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/ads/google_ads/v25/services/campaign_bid_modifier_service" + # client = ::Google::Ads::GoogleAds::V25::Services::CampaignBidModifierService::Client.new + # + module CampaignBidModifierService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "campaign_bid_modifier_service", "helpers.rb" +require "google/ads/google_ads/v25/services/campaign_bid_modifier_service/helpers" if ::File.file? helper_path diff --git a/lib/google/ads/google_ads/v25/services/campaign_bid_modifier_service/client.rb b/lib/google/ads/google_ads/v25/services/campaign_bid_modifier_service/client.rb new file mode 100644 index 000000000..cdc0f30c3 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/campaign_bid_modifier_service/client.rb @@ -0,0 +1,518 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# require "google/ads/google_ads/error" +require "google/ads/google_ads/v25/services/campaign_bid_modifier_service_pb" + +module Google + module Ads + module GoogleAds + module V25 + module Services + module CampaignBidModifierService + ## + # Client for the CampaignBidModifierService service. + # + # Service to manage campaign bid modifiers. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "googleads.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :campaign_bid_modifier_service_stub + + ## + # Configure the CampaignBidModifierService Client class. + # + # See {::Google::Ads::GoogleAds::V25::Services::CampaignBidModifierService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all CampaignBidModifierService clients + # ::Google::Ads::GoogleAds::V25::Services::CampaignBidModifierService::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + default_config = Client::Configuration.new + + default_config.timeout = 14_400.0 + default_config.retry_policy = { + initial_delay: 5.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the CampaignBidModifierService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Ads::GoogleAds::V25::Services::CampaignBidModifierService::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @campaign_bid_modifier_service_stub.universe_domain + end + + ## + # Create a new CampaignBidModifierService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Ads::GoogleAds::V25::Services::CampaignBidModifierService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Ads::GoogleAds::V25::Services::CampaignBidModifierService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the CampaignBidModifierService client. + # @yieldparam config [Client::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/ads/google_ads/v25/services/campaign_bid_modifier_service_services_pb" + + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @campaign_bid_modifier_service_stub = ::Gapic::ServiceStub.new( + ::Google::Ads::GoogleAds::V25::Services::CampaignBidModifierService::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool, + logger: @config.logger + ) + + @campaign_bid_modifier_service_stub.stub_logger&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @campaign_bid_modifier_service_stub.logger + end + + # Service calls + + ## + # Creates, updates, or removes campaign bid modifiers. + # Operation statuses are returned. + # + # List of thrown errors: + # [AuthenticationError]() + # [AuthorizationError]() + # [ContextError]() + # [CriterionError]() + # [DatabaseError]() + # [DateError]() + # [DistinctError]() + # [FieldError]() + # [HeaderError]() + # [IdError]() + # [InternalError]() + # [MutateError]() + # [NewResourceCreationError]() + # [NotEmptyError]() + # [NullError]() + # [OperatorError]() + # [QuotaError]() + # [RangeError]() + # [RequestError]() + # [SizeLimitError]() + # [StringFormatError]() + # [StringLengthError]() + # + # @overload mutate_campaign_bid_modifiers(request, options = nil) + # Pass arguments to `mutate_campaign_bid_modifiers` via a request object, either of type + # {::Google::Ads::GoogleAds::V25::Services::MutateCampaignBidModifiersRequest} or an equivalent Hash. + # + # @param request [::Google::Ads::GoogleAds::V25::Services::MutateCampaignBidModifiersRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload mutate_campaign_bid_modifiers(customer_id: nil, operations: nil, partial_failure: nil, validate_only: nil, response_content_type: nil) + # Pass arguments to `mutate_campaign_bid_modifiers` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param customer_id [::String] + # Required. ID of the customer whose campaign bid modifiers are being + # modified. + # @param operations [::Array<::Google::Ads::GoogleAds::V25::Services::CampaignBidModifierOperation, ::Hash>] + # Required. The list of operations to perform on individual campaign bid + # modifiers. + # @param partial_failure [::Boolean] + # 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. + # @param validate_only [::Boolean] + # If true, the request is validated but not executed. Only errors are + # returned, not results. + # @param response_content_type [::Google::Ads::GoogleAds::V25::Enums::ResponseContentTypeEnum::ResponseContentType] + # The response content type setting. Determines whether the mutable resource + # or just the resource name should be returned post mutation. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Ads::GoogleAds::V25::Services::MutateCampaignBidModifiersResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Ads::GoogleAds::V25::Services::MutateCampaignBidModifiersResponse] + # + # @raise [Google::Ads::GoogleAds::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/ads/google_ads/v25/services" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Ads::GoogleAds::V25::Services::CampaignBidModifierService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Ads::GoogleAds::V25::Services::MutateCampaignBidModifiersRequest.new + # + # # Call the mutate_campaign_bid_modifiers method. + # result = client.mutate_campaign_bid_modifiers request + # + # # The returned object is of type Google::Ads::GoogleAds::V25::Services::MutateCampaignBidModifiersResponse. + # p result + # + def mutate_campaign_bid_modifiers request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::GoogleAds::V25::Services::MutateCampaignBidModifiersRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.mutate_campaign_bid_modifiers.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Ads::GoogleAds::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.customer_id + header_params["customer_id"] = request.customer_id + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.mutate_campaign_bid_modifiers.timeout, + metadata: metadata, + retry_policy: @config.rpcs.mutate_campaign_bid_modifiers.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @campaign_bid_modifier_service_stub.call_rpc :mutate_campaign_bid_modifiers, request, + options: options do |response, operation| + yield response, operation if block_given? + end + # rescue GRPC::BadStatus => grpc_error + # raise Google::Ads::GoogleAds::Error.new grpc_error.message + end + + ## + # Configuration class for the CampaignBidModifierService API. + # + # This class represents the configuration for CampaignBidModifierService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Ads::GoogleAds::V25::Services::CampaignBidModifierService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # mutate_campaign_bid_modifiers to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Ads::GoogleAds::V25::Services::CampaignBidModifierService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.mutate_campaign_bid_modifiers.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Ads::GoogleAds::V25::Services::CampaignBidModifierService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.mutate_campaign_bid_modifiers.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Ads::GoogleAds::V25::Services::CampaignBidModifierService::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "googleads.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, + ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the CampaignBidModifierService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `mutate_campaign_bid_modifiers` + # @return [::Gapic::Config::Method] + # + attr_reader :mutate_campaign_bid_modifiers + + # @private + def initialize parent_rpcs = nil + mutate_campaign_bid_modifiers_config = parent_rpcs.mutate_campaign_bid_modifiers if parent_rpcs.respond_to? :mutate_campaign_bid_modifiers + @mutate_campaign_bid_modifiers = ::Gapic::Config::Method.new mutate_campaign_bid_modifiers_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/campaign_bid_modifier_service/credentials.rb b/lib/google/ads/google_ads/v25/services/campaign_bid_modifier_service/credentials.rb new file mode 100644 index 000000000..5e61db5b2 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/campaign_bid_modifier_service/credentials.rb @@ -0,0 +1,38 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Ads + module GoogleAds + module V25 + module Services + module CampaignBidModifierService + # Credentials for the CampaignBidModifierService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/adwords" + ] + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/campaign_bid_modifier_service/paths.rb b/lib/google/ads/google_ads/v25/services/campaign_bid_modifier_service/paths.rb new file mode 100644 index 000000000..0e2f31c17 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/campaign_bid_modifier_service/paths.rb @@ -0,0 +1,71 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Ads + module GoogleAds + module V25 + module Services + module CampaignBidModifierService + # Path helper methods for the CampaignBidModifierService API. + module Paths + ## + # Create a fully-qualified Campaign resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/campaigns/{campaign_id}` + # + # @param customer_id [String] + # @param campaign_id [String] + # + # @return [::String] + def campaign_path customer_id:, campaign_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/campaigns/#{campaign_id}" + end + + ## + # Create a fully-qualified CampaignBidModifier resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/campaignBidModifiers/{campaign_id}~{criterion_id}` + # + # @param customer_id [String] + # @param campaign_id [String] + # @param criterion_id [String] + # + # @return [::String] + def campaign_bid_modifier_path customer_id:, campaign_id:, criterion_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + raise ::ArgumentError, "campaign_id cannot contain /" if campaign_id.to_s.include? "/" + + "customers/#{customer_id}/campaignBidModifiers/#{campaign_id}~#{criterion_id}" + end + + extend self + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/campaign_bid_modifier_service_pb.rb b/lib/google/ads/google_ads/v25/services/campaign_bid_modifier_service_pb.rb new file mode 100644 index 000000000..98e1c9d40 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/campaign_bid_modifier_service_pb.rb @@ -0,0 +1,35 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/services/campaign_bid_modifier_service.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/enums/response_content_type_pb' +require 'google/ads/google_ads/v25/resources/campaign_bid_modifier_pb' +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/field_mask_pb' +require 'google/rpc/status_pb' + + +descriptor_data = "\nEgoogle/ads/googleads/v25/services/campaign_bid_modifier_service.proto\x12!google.ads.googleads.v25.services\x1a:google/ads/googleads/v25/enums/response_content_type.proto\x1a>google/ads/googleads/v25/resources/campaign_bid_modifier.proto\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\x1a\x17google/rpc/status.proto\"\xb3\x02\n!MutateCampaignBidModifiersRequest\x12\x18\n\x0b\x63ustomer_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12X\n\noperations\x18\x02 \x03(\x0b\x32?.google.ads.googleads.v25.services.CampaignBidModifierOperationB\x03\xe0\x41\x02\x12\x17\n\x0fpartial_failure\x18\x03 \x01(\x08\x12\x15\n\rvalidate_only\x18\x04 \x01(\x08\x12j\n\x15response_content_type\x18\x05 \x01(\x0e\x32K.google.ads.googleads.v25.enums.ResponseContentTypeEnum.ResponseContentType\"\xb7\x02\n\x1c\x43\x61mpaignBidModifierOperation\x12/\n\x0bupdate_mask\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\x12I\n\x06\x63reate\x18\x01 \x01(\x0b\x32\x37.google.ads.googleads.v25.resources.CampaignBidModifierH\x00\x12I\n\x06update\x18\x02 \x01(\x0b\x32\x37.google.ads.googleads.v25.resources.CampaignBidModifierH\x00\x12\x43\n\x06remove\x18\x03 \x01(\tB1\xfa\x41.\n,googleads.googleapis.com/CampaignBidModifierH\x00\x42\x0b\n\toperation\"\xac\x01\n\"MutateCampaignBidModifiersResponse\x12\x31\n\x15partial_failure_error\x18\x03 \x01(\x0b\x32\x12.google.rpc.Status\x12S\n\x07results\x18\x02 \x03(\x0b\x32\x42.google.ads.googleads.v25.services.MutateCampaignBidModifierResult\"\xc3\x01\n\x1fMutateCampaignBidModifierResult\x12H\n\rresource_name\x18\x01 \x01(\tB1\xfa\x41.\n,googleads.googleapis.com/CampaignBidModifier\x12V\n\x15\x63\x61mpaign_bid_modifier\x18\x02 \x01(\x0b\x32\x37.google.ads.googleads.v25.resources.CampaignBidModifier2\xef\x02\n\x1a\x43\x61mpaignBidModifierService\x12\x89\x02\n\x1aMutateCampaignBidModifiers\x12\x44.google.ads.googleads.v25.services.MutateCampaignBidModifiersRequest\x1a\x45.google.ads.googleads.v25.services.MutateCampaignBidModifiersResponse\"^\xda\x41\x16\x63ustomer_id,operations\x82\xd3\xe4\x93\x02?\":/v25/customers/{customer_id=*}/campaignBidModifiers:mutate:\x01*\x1a\x45\xca\x41\x18googleads.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/adwordsB\x8b\x02\n%com.google.ads.googleads.v25.servicesB\x1f\x43\x61mpaignBidModifierServiceProtoP\x01ZIgoogle.golang.org/genproto/googleapis/ads/googleads/v25/services;services\xa2\x02\x03GAA\xaa\x02!Google.Ads.GoogleAds.V25.Services\xca\x02!Google\\Ads\\GoogleAds\\V25\\Services\xea\x02%Google::Ads::GoogleAds::V25::Servicesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Services + MutateCampaignBidModifiersRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.MutateCampaignBidModifiersRequest").msgclass + CampaignBidModifierOperation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.CampaignBidModifierOperation").msgclass + MutateCampaignBidModifiersResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.MutateCampaignBidModifiersResponse").msgclass + MutateCampaignBidModifierResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.MutateCampaignBidModifierResult").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/campaign_bid_modifier_service_services_pb.rb b/lib/google/ads/google_ads/v25/services/campaign_bid_modifier_service_services_pb.rb new file mode 100644 index 000000000..75da8c882 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/campaign_bid_modifier_service_services_pb.rb @@ -0,0 +1,74 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/ads/googleads/v25/services/campaign_bid_modifier_service.proto for package 'Google.Ads.GoogleAds.V25.Services' +# Original file comments: +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +require 'grpc' +require 'google/ads/google_ads/v25/services/campaign_bid_modifier_service_pb' + +module Google + module Ads + module GoogleAds + module V25 + module Services + module CampaignBidModifierService + # Proto file describing the Campaign Bid Modifier service. + # + # Service to manage campaign bid modifiers. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.ads.googleads.v25.services.CampaignBidModifierService' + + # Creates, updates, or removes campaign bid modifiers. + # Operation statuses are returned. + # + # List of thrown errors: + # [AuthenticationError]() + # [AuthorizationError]() + # [ContextError]() + # [CriterionError]() + # [DatabaseError]() + # [DateError]() + # [DistinctError]() + # [FieldError]() + # [HeaderError]() + # [IdError]() + # [InternalError]() + # [MutateError]() + # [NewResourceCreationError]() + # [NotEmptyError]() + # [NullError]() + # [OperatorError]() + # [QuotaError]() + # [RangeError]() + # [RequestError]() + # [SizeLimitError]() + # [StringFormatError]() + # [StringLengthError]() + rpc :MutateCampaignBidModifiers, ::Google::Ads::GoogleAds::V25::Services::MutateCampaignBidModifiersRequest, ::Google::Ads::GoogleAds::V25::Services::MutateCampaignBidModifiersResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/campaign_budget_service.rb b/lib/google/ads/google_ads/v25/services/campaign_budget_service.rb new file mode 100644 index 000000000..ebc2dcbfa --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/campaign_budget_service.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/ads/google_ads/version" + +require "google/ads/google_ads/v25/services/campaign_budget_service/credentials" +require "google/ads/google_ads/v25/services/campaign_budget_service/paths" +require "google/ads/google_ads/v25/services/campaign_budget_service/client" + +module Google + module Ads + module GoogleAds + module V25 + module Services + ## + # Service to manage campaign budgets. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/ads/google_ads/v25/services/campaign_budget_service" + # client = ::Google::Ads::GoogleAds::V25::Services::CampaignBudgetService::Client.new + # + module CampaignBudgetService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "campaign_budget_service", "helpers.rb" +require "google/ads/google_ads/v25/services/campaign_budget_service/helpers" if ::File.file? helper_path diff --git a/lib/google/ads/google_ads/v25/services/campaign_budget_service/client.rb b/lib/google/ads/google_ads/v25/services/campaign_budget_service/client.rb new file mode 100644 index 000000000..82c79797a --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/campaign_budget_service/client.rb @@ -0,0 +1,511 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# require "google/ads/google_ads/error" +require "google/ads/google_ads/v25/services/campaign_budget_service_pb" + +module Google + module Ads + module GoogleAds + module V25 + module Services + module CampaignBudgetService + ## + # Client for the CampaignBudgetService service. + # + # Service to manage campaign budgets. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "googleads.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :campaign_budget_service_stub + + ## + # Configure the CampaignBudgetService Client class. + # + # See {::Google::Ads::GoogleAds::V25::Services::CampaignBudgetService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all CampaignBudgetService clients + # ::Google::Ads::GoogleAds::V25::Services::CampaignBudgetService::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + default_config = Client::Configuration.new + + default_config.timeout = 14_400.0 + default_config.retry_policy = { + initial_delay: 5.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the CampaignBudgetService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Ads::GoogleAds::V25::Services::CampaignBudgetService::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @campaign_budget_service_stub.universe_domain + end + + ## + # Create a new CampaignBudgetService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Ads::GoogleAds::V25::Services::CampaignBudgetService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Ads::GoogleAds::V25::Services::CampaignBudgetService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the CampaignBudgetService client. + # @yieldparam config [Client::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/ads/google_ads/v25/services/campaign_budget_service_services_pb" + + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @campaign_budget_service_stub = ::Gapic::ServiceStub.new( + ::Google::Ads::GoogleAds::V25::Services::CampaignBudgetService::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool, + logger: @config.logger + ) + + @campaign_budget_service_stub.stub_logger&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @campaign_budget_service_stub.logger + end + + # Service calls + + ## + # Creates, updates, or removes campaign budgets. Operation statuses are + # returned. + # + # List of thrown errors: + # [AuthenticationError]() + # [AuthorizationError]() + # [CampaignBudgetError]() + # [DatabaseError]() + # [DistinctError]() + # [FieldError]() + # [FieldMaskError]() + # [HeaderError]() + # [InternalError]() + # [MutateError]() + # [NewResourceCreationError]() + # [OperationAccessDeniedError]() + # [QuotaError]() + # [RangeError]() + # [RequestError]() + # [ResourceCountLimitExceededError]() + # [StringLengthError]() + # + # @overload mutate_campaign_budgets(request, options = nil) + # Pass arguments to `mutate_campaign_budgets` via a request object, either of type + # {::Google::Ads::GoogleAds::V25::Services::MutateCampaignBudgetsRequest} or an equivalent Hash. + # + # @param request [::Google::Ads::GoogleAds::V25::Services::MutateCampaignBudgetsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload mutate_campaign_budgets(customer_id: nil, operations: nil, partial_failure: nil, validate_only: nil, response_content_type: nil) + # Pass arguments to `mutate_campaign_budgets` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param customer_id [::String] + # Required. The ID of the customer whose campaign budgets are being modified. + # @param operations [::Array<::Google::Ads::GoogleAds::V25::Services::CampaignBudgetOperation, ::Hash>] + # Required. The list of operations to perform on individual campaign budgets. + # @param partial_failure [::Boolean] + # 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. + # @param validate_only [::Boolean] + # If true, the request is validated but not executed. Only errors are + # returned, not results. + # @param response_content_type [::Google::Ads::GoogleAds::V25::Enums::ResponseContentTypeEnum::ResponseContentType] + # The response content type setting. Determines whether the mutable resource + # or just the resource name should be returned post mutation. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Ads::GoogleAds::V25::Services::MutateCampaignBudgetsResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Ads::GoogleAds::V25::Services::MutateCampaignBudgetsResponse] + # + # @raise [Google::Ads::GoogleAds::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/ads/google_ads/v25/services" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Ads::GoogleAds::V25::Services::CampaignBudgetService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Ads::GoogleAds::V25::Services::MutateCampaignBudgetsRequest.new + # + # # Call the mutate_campaign_budgets method. + # result = client.mutate_campaign_budgets request + # + # # The returned object is of type Google::Ads::GoogleAds::V25::Services::MutateCampaignBudgetsResponse. + # p result + # + def mutate_campaign_budgets request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::GoogleAds::V25::Services::MutateCampaignBudgetsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.mutate_campaign_budgets.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Ads::GoogleAds::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.customer_id + header_params["customer_id"] = request.customer_id + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.mutate_campaign_budgets.timeout, + metadata: metadata, + retry_policy: @config.rpcs.mutate_campaign_budgets.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @campaign_budget_service_stub.call_rpc :mutate_campaign_budgets, request, + options: options do |response, operation| + yield response, operation if block_given? + end + # rescue GRPC::BadStatus => grpc_error + # raise Google::Ads::GoogleAds::Error.new grpc_error.message + end + + ## + # Configuration class for the CampaignBudgetService API. + # + # This class represents the configuration for CampaignBudgetService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Ads::GoogleAds::V25::Services::CampaignBudgetService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # mutate_campaign_budgets to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Ads::GoogleAds::V25::Services::CampaignBudgetService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.mutate_campaign_budgets.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Ads::GoogleAds::V25::Services::CampaignBudgetService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.mutate_campaign_budgets.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Ads::GoogleAds::V25::Services::CampaignBudgetService::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "googleads.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, + ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the CampaignBudgetService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `mutate_campaign_budgets` + # @return [::Gapic::Config::Method] + # + attr_reader :mutate_campaign_budgets + + # @private + def initialize parent_rpcs = nil + mutate_campaign_budgets_config = parent_rpcs.mutate_campaign_budgets if parent_rpcs.respond_to? :mutate_campaign_budgets + @mutate_campaign_budgets = ::Gapic::Config::Method.new mutate_campaign_budgets_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/campaign_budget_service/credentials.rb b/lib/google/ads/google_ads/v25/services/campaign_budget_service/credentials.rb new file mode 100644 index 000000000..c05629f74 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/campaign_budget_service/credentials.rb @@ -0,0 +1,38 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Ads + module GoogleAds + module V25 + module Services + module CampaignBudgetService + # Credentials for the CampaignBudgetService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/adwords" + ] + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/campaign_budget_service/paths.rb b/lib/google/ads/google_ads/v25/services/campaign_budget_service/paths.rb new file mode 100644 index 000000000..d8fecce86 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/campaign_budget_service/paths.rb @@ -0,0 +1,52 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Ads + module GoogleAds + module V25 + module Services + module CampaignBudgetService + # Path helper methods for the CampaignBudgetService API. + module Paths + ## + # Create a fully-qualified CampaignBudget resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/campaignBudgets/{campaign_budget_id}` + # + # @param customer_id [String] + # @param campaign_budget_id [String] + # + # @return [::String] + def campaign_budget_path customer_id:, campaign_budget_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/campaignBudgets/#{campaign_budget_id}" + end + + extend self + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/campaign_budget_service_pb.rb b/lib/google/ads/google_ads/v25/services/campaign_budget_service_pb.rb new file mode 100644 index 000000000..3be5f51b9 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/campaign_budget_service_pb.rb @@ -0,0 +1,35 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/services/campaign_budget_service.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/enums/response_content_type_pb' +require 'google/ads/google_ads/v25/resources/campaign_budget_pb' +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/field_mask_pb' +require 'google/rpc/status_pb' + + +descriptor_data = "\n?google/ads/googleads/v25/services/campaign_budget_service.proto\x12!google.ads.googleads.v25.services\x1a:google/ads/googleads/v25/enums/response_content_type.proto\x1a\x38google/ads/googleads/v25/resources/campaign_budget.proto\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\x1a\x17google/rpc/status.proto\"\xa9\x02\n\x1cMutateCampaignBudgetsRequest\x12\x18\n\x0b\x63ustomer_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12S\n\noperations\x18\x02 \x03(\x0b\x32:.google.ads.googleads.v25.services.CampaignBudgetOperationB\x03\xe0\x41\x02\x12\x17\n\x0fpartial_failure\x18\x03 \x01(\x08\x12\x15\n\rvalidate_only\x18\x04 \x01(\x08\x12j\n\x15response_content_type\x18\x05 \x01(\x0e\x32K.google.ads.googleads.v25.enums.ResponseContentTypeEnum.ResponseContentType\"\xa3\x02\n\x17\x43\x61mpaignBudgetOperation\x12/\n\x0bupdate_mask\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\x12\x44\n\x06\x63reate\x18\x01 \x01(\x0b\x32\x32.google.ads.googleads.v25.resources.CampaignBudgetH\x00\x12\x44\n\x06update\x18\x02 \x01(\x0b\x32\x32.google.ads.googleads.v25.resources.CampaignBudgetH\x00\x12>\n\x06remove\x18\x03 \x01(\tB,\xfa\x41)\n\'googleads.googleapis.com/CampaignBudgetH\x00\x42\x0b\n\toperation\"\xa2\x01\n\x1dMutateCampaignBudgetsResponse\x12\x31\n\x15partial_failure_error\x18\x03 \x01(\x0b\x32\x12.google.rpc.Status\x12N\n\x07results\x18\x02 \x03(\x0b\x32=.google.ads.googleads.v25.services.MutateCampaignBudgetResult\"\xae\x01\n\x1aMutateCampaignBudgetResult\x12\x43\n\rresource_name\x18\x01 \x01(\tB,\xfa\x41)\n\'googleads.googleapis.com/CampaignBudget\x12K\n\x0f\x63\x61mpaign_budget\x18\x02 \x01(\x0b\x32\x32.google.ads.googleads.v25.resources.CampaignBudget2\xd6\x02\n\x15\x43\x61mpaignBudgetService\x12\xf5\x01\n\x15MutateCampaignBudgets\x12?.google.ads.googleads.v25.services.MutateCampaignBudgetsRequest\x1a@.google.ads.googleads.v25.services.MutateCampaignBudgetsResponse\"Y\xda\x41\x16\x63ustomer_id,operations\x82\xd3\xe4\x93\x02:\"5/v25/customers/{customer_id=*}/campaignBudgets:mutate:\x01*\x1a\x45\xca\x41\x18googleads.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/adwordsB\x86\x02\n%com.google.ads.googleads.v25.servicesB\x1a\x43\x61mpaignBudgetServiceProtoP\x01ZIgoogle.golang.org/genproto/googleapis/ads/googleads/v25/services;services\xa2\x02\x03GAA\xaa\x02!Google.Ads.GoogleAds.V25.Services\xca\x02!Google\\Ads\\GoogleAds\\V25\\Services\xea\x02%Google::Ads::GoogleAds::V25::Servicesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Services + MutateCampaignBudgetsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.MutateCampaignBudgetsRequest").msgclass + CampaignBudgetOperation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.CampaignBudgetOperation").msgclass + MutateCampaignBudgetsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.MutateCampaignBudgetsResponse").msgclass + MutateCampaignBudgetResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.MutateCampaignBudgetResult").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/campaign_budget_service_services_pb.rb b/lib/google/ads/google_ads/v25/services/campaign_budget_service_services_pb.rb new file mode 100644 index 000000000..678f9019d --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/campaign_budget_service_services_pb.rb @@ -0,0 +1,69 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/ads/googleads/v25/services/campaign_budget_service.proto for package 'Google.Ads.GoogleAds.V25.Services' +# Original file comments: +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +require 'grpc' +require 'google/ads/google_ads/v25/services/campaign_budget_service_pb' + +module Google + module Ads + module GoogleAds + module V25 + module Services + module CampaignBudgetService + # Proto file describing the Campaign Budget service. + # + # Service to manage campaign budgets. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.ads.googleads.v25.services.CampaignBudgetService' + + # Creates, updates, or removes campaign budgets. Operation statuses are + # returned. + # + # List of thrown errors: + # [AuthenticationError]() + # [AuthorizationError]() + # [CampaignBudgetError]() + # [DatabaseError]() + # [DistinctError]() + # [FieldError]() + # [FieldMaskError]() + # [HeaderError]() + # [InternalError]() + # [MutateError]() + # [NewResourceCreationError]() + # [OperationAccessDeniedError]() + # [QuotaError]() + # [RangeError]() + # [RequestError]() + # [ResourceCountLimitExceededError]() + # [StringLengthError]() + rpc :MutateCampaignBudgets, ::Google::Ads::GoogleAds::V25::Services::MutateCampaignBudgetsRequest, ::Google::Ads::GoogleAds::V25::Services::MutateCampaignBudgetsResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/campaign_conversion_goal_service.rb b/lib/google/ads/google_ads/v25/services/campaign_conversion_goal_service.rb new file mode 100644 index 000000000..35af5bced --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/campaign_conversion_goal_service.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/ads/google_ads/version" + +require "google/ads/google_ads/v25/services/campaign_conversion_goal_service/credentials" +require "google/ads/google_ads/v25/services/campaign_conversion_goal_service/paths" +require "google/ads/google_ads/v25/services/campaign_conversion_goal_service/client" + +module Google + module Ads + module GoogleAds + module V25 + module Services + ## + # Service to manage campaign conversion goal. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/ads/google_ads/v25/services/campaign_conversion_goal_service" + # client = ::Google::Ads::GoogleAds::V25::Services::CampaignConversionGoalService::Client.new + # + module CampaignConversionGoalService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "campaign_conversion_goal_service", "helpers.rb" +require "google/ads/google_ads/v25/services/campaign_conversion_goal_service/helpers" if ::File.file? helper_path diff --git a/lib/google/ads/google_ads/v25/services/campaign_conversion_goal_service/client.rb b/lib/google/ads/google_ads/v25/services/campaign_conversion_goal_service/client.rb new file mode 100644 index 000000000..25613d62e --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/campaign_conversion_goal_service/client.rb @@ -0,0 +1,486 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# require "google/ads/google_ads/error" +require "google/ads/google_ads/v25/services/campaign_conversion_goal_service_pb" + +module Google + module Ads + module GoogleAds + module V25 + module Services + module CampaignConversionGoalService + ## + # Client for the CampaignConversionGoalService service. + # + # Service to manage campaign conversion goal. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "googleads.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :campaign_conversion_goal_service_stub + + ## + # Configure the CampaignConversionGoalService Client class. + # + # See {::Google::Ads::GoogleAds::V25::Services::CampaignConversionGoalService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all CampaignConversionGoalService clients + # ::Google::Ads::GoogleAds::V25::Services::CampaignConversionGoalService::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + default_config = Client::Configuration.new + + default_config.timeout = 14_400.0 + default_config.retry_policy = { + initial_delay: 5.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the CampaignConversionGoalService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Ads::GoogleAds::V25::Services::CampaignConversionGoalService::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @campaign_conversion_goal_service_stub.universe_domain + end + + ## + # Create a new CampaignConversionGoalService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Ads::GoogleAds::V25::Services::CampaignConversionGoalService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Ads::GoogleAds::V25::Services::CampaignConversionGoalService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the CampaignConversionGoalService client. + # @yieldparam config [Client::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/ads/google_ads/v25/services/campaign_conversion_goal_service_services_pb" + + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @campaign_conversion_goal_service_stub = ::Gapic::ServiceStub.new( + ::Google::Ads::GoogleAds::V25::Services::CampaignConversionGoalService::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool, + logger: @config.logger + ) + + @campaign_conversion_goal_service_stub.stub_logger&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @campaign_conversion_goal_service_stub.logger + end + + # Service calls + + ## + # Creates, updates or removes campaign conversion goals. Operation statuses + # are returned. + # + # @overload mutate_campaign_conversion_goals(request, options = nil) + # Pass arguments to `mutate_campaign_conversion_goals` via a request object, either of type + # {::Google::Ads::GoogleAds::V25::Services::MutateCampaignConversionGoalsRequest} or an equivalent Hash. + # + # @param request [::Google::Ads::GoogleAds::V25::Services::MutateCampaignConversionGoalsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload mutate_campaign_conversion_goals(customer_id: nil, operations: nil, validate_only: nil) + # Pass arguments to `mutate_campaign_conversion_goals` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param customer_id [::String] + # Required. The ID of the customer whose campaign conversion goals are being + # modified. + # @param operations [::Array<::Google::Ads::GoogleAds::V25::Services::CampaignConversionGoalOperation, ::Hash>] + # Required. The list of operations to perform on individual campaign + # conversion goal. + # @param validate_only [::Boolean] + # If true, the request is validated but not executed. Only errors are + # returned, not results. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Ads::GoogleAds::V25::Services::MutateCampaignConversionGoalsResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Ads::GoogleAds::V25::Services::MutateCampaignConversionGoalsResponse] + # + # @raise [Google::Ads::GoogleAds::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/ads/google_ads/v25/services" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Ads::GoogleAds::V25::Services::CampaignConversionGoalService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Ads::GoogleAds::V25::Services::MutateCampaignConversionGoalsRequest.new + # + # # Call the mutate_campaign_conversion_goals method. + # result = client.mutate_campaign_conversion_goals request + # + # # The returned object is of type Google::Ads::GoogleAds::V25::Services::MutateCampaignConversionGoalsResponse. + # p result + # + def mutate_campaign_conversion_goals request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::GoogleAds::V25::Services::MutateCampaignConversionGoalsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.mutate_campaign_conversion_goals.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Ads::GoogleAds::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.customer_id + header_params["customer_id"] = request.customer_id + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.mutate_campaign_conversion_goals.timeout, + metadata: metadata, + retry_policy: @config.rpcs.mutate_campaign_conversion_goals.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @campaign_conversion_goal_service_stub.call_rpc :mutate_campaign_conversion_goals, request, + options: options do |response, operation| + yield response, operation if block_given? + end + # rescue GRPC::BadStatus => grpc_error + # raise Google::Ads::GoogleAds::Error.new grpc_error.message + end + + ## + # Configuration class for the CampaignConversionGoalService API. + # + # This class represents the configuration for CampaignConversionGoalService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Ads::GoogleAds::V25::Services::CampaignConversionGoalService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # mutate_campaign_conversion_goals to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Ads::GoogleAds::V25::Services::CampaignConversionGoalService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.mutate_campaign_conversion_goals.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Ads::GoogleAds::V25::Services::CampaignConversionGoalService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.mutate_campaign_conversion_goals.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Ads::GoogleAds::V25::Services::CampaignConversionGoalService::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "googleads.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, + ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the CampaignConversionGoalService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `mutate_campaign_conversion_goals` + # @return [::Gapic::Config::Method] + # + attr_reader :mutate_campaign_conversion_goals + + # @private + def initialize parent_rpcs = nil + mutate_campaign_conversion_goals_config = parent_rpcs.mutate_campaign_conversion_goals if parent_rpcs.respond_to? :mutate_campaign_conversion_goals + @mutate_campaign_conversion_goals = ::Gapic::Config::Method.new mutate_campaign_conversion_goals_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/campaign_conversion_goal_service/credentials.rb b/lib/google/ads/google_ads/v25/services/campaign_conversion_goal_service/credentials.rb new file mode 100644 index 000000000..fd0499de7 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/campaign_conversion_goal_service/credentials.rb @@ -0,0 +1,38 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Ads + module GoogleAds + module V25 + module Services + module CampaignConversionGoalService + # Credentials for the CampaignConversionGoalService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/adwords" + ] + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/campaign_conversion_goal_service/paths.rb b/lib/google/ads/google_ads/v25/services/campaign_conversion_goal_service/paths.rb new file mode 100644 index 000000000..94918dc9a --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/campaign_conversion_goal_service/paths.rb @@ -0,0 +1,73 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Ads + module GoogleAds + module V25 + module Services + module CampaignConversionGoalService + # Path helper methods for the CampaignConversionGoalService API. + module Paths + ## + # Create a fully-qualified Campaign resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/campaigns/{campaign_id}` + # + # @param customer_id [String] + # @param campaign_id [String] + # + # @return [::String] + def campaign_path customer_id:, campaign_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/campaigns/#{campaign_id}" + end + + ## + # Create a fully-qualified CampaignConversionGoal resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/campaignConversionGoals/{campaign_id}~{category}~{source}` + # + # @param customer_id [String] + # @param campaign_id [String] + # @param category [String] + # @param source [String] + # + # @return [::String] + def campaign_conversion_goal_path customer_id:, campaign_id:, category:, source: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + raise ::ArgumentError, "campaign_id cannot contain /" if campaign_id.to_s.include? "/" + raise ::ArgumentError, "category cannot contain /" if category.to_s.include? "/" + + "customers/#{customer_id}/campaignConversionGoals/#{campaign_id}~#{category}~#{source}" + end + + extend self + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/campaign_conversion_goal_service_pb.rb b/lib/google/ads/google_ads/v25/services/campaign_conversion_goal_service_pb.rb new file mode 100644 index 000000000..b944caacd --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/campaign_conversion_goal_service_pb.rb @@ -0,0 +1,33 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/services/campaign_conversion_goal_service.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/resources/campaign_conversion_goal_pb' +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/field_mask_pb' + + +descriptor_data = "\nHgoogle/ads/googleads/v25/services/campaign_conversion_goal_service.proto\x12!google.ads.googleads.v25.services\x1a\x41google/ads/googleads/v25/resources/campaign_conversion_goal.proto\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\"\xb4\x01\n$MutateCampaignConversionGoalsRequest\x12\x18\n\x0b\x63ustomer_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12[\n\noperations\x18\x02 \x03(\x0b\x32\x42.google.ads.googleads.v25.services.CampaignConversionGoalOperationB\x03\xe0\x41\x02\x12\x15\n\rvalidate_only\x18\x03 \x01(\x08\"\xad\x01\n\x1f\x43\x61mpaignConversionGoalOperation\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\x12L\n\x06update\x18\x01 \x01(\x0b\x32:.google.ads.googleads.v25.resources.CampaignConversionGoalH\x00\x42\x0b\n\toperation\"\x7f\n%MutateCampaignConversionGoalsResponse\x12V\n\x07results\x18\x01 \x03(\x0b\x32\x45.google.ads.googleads.v25.services.MutateCampaignConversionGoalResult\"q\n\"MutateCampaignConversionGoalResult\x12K\n\rresource_name\x18\x01 \x01(\tB4\xfa\x41\x31\n/googleads.googleapis.com/CampaignConversionGoal2\xfe\x02\n\x1d\x43\x61mpaignConversionGoalService\x12\x95\x02\n\x1dMutateCampaignConversionGoals\x12G.google.ads.googleads.v25.services.MutateCampaignConversionGoalsRequest\x1aH.google.ads.googleads.v25.services.MutateCampaignConversionGoalsResponse\"a\xda\x41\x16\x63ustomer_id,operations\x82\xd3\xe4\x93\x02\x42\"=/v25/customers/{customer_id=*}/campaignConversionGoals:mutate:\x01*\x1a\x45\xca\x41\x18googleads.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/adwordsB\x8e\x02\n%com.google.ads.googleads.v25.servicesB\"CampaignConversionGoalServiceProtoP\x01ZIgoogle.golang.org/genproto/googleapis/ads/googleads/v25/services;services\xa2\x02\x03GAA\xaa\x02!Google.Ads.GoogleAds.V25.Services\xca\x02!Google\\Ads\\GoogleAds\\V25\\Services\xea\x02%Google::Ads::GoogleAds::V25::Servicesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Services + MutateCampaignConversionGoalsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.MutateCampaignConversionGoalsRequest").msgclass + CampaignConversionGoalOperation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.CampaignConversionGoalOperation").msgclass + MutateCampaignConversionGoalsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.MutateCampaignConversionGoalsResponse").msgclass + MutateCampaignConversionGoalResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.MutateCampaignConversionGoalResult").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/campaign_conversion_goal_service_services_pb.rb b/lib/google/ads/google_ads/v25/services/campaign_conversion_goal_service_services_pb.rb new file mode 100644 index 000000000..3daaf2553 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/campaign_conversion_goal_service_services_pb.rb @@ -0,0 +1,50 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/ads/googleads/v25/services/campaign_conversion_goal_service.proto for package 'Google.Ads.GoogleAds.V25.Services' +# Original file comments: +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +require 'grpc' +require 'google/ads/google_ads/v25/services/campaign_conversion_goal_service_pb' + +module Google + module Ads + module GoogleAds + module V25 + module Services + module CampaignConversionGoalService + # Proto file describing the CampaignConversionGoal service. + # + # Service to manage campaign conversion goal. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.ads.googleads.v25.services.CampaignConversionGoalService' + + # Creates, updates or removes campaign conversion goals. Operation statuses + # are returned. + rpc :MutateCampaignConversionGoals, ::Google::Ads::GoogleAds::V25::Services::MutateCampaignConversionGoalsRequest, ::Google::Ads::GoogleAds::V25::Services::MutateCampaignConversionGoalsResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/campaign_criterion_service.rb b/lib/google/ads/google_ads/v25/services/campaign_criterion_service.rb new file mode 100644 index 000000000..9817ff75a --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/campaign_criterion_service.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/ads/google_ads/version" + +require "google/ads/google_ads/v25/services/campaign_criterion_service/credentials" +require "google/ads/google_ads/v25/services/campaign_criterion_service/paths" +require "google/ads/google_ads/v25/services/campaign_criterion_service/client" + +module Google + module Ads + module GoogleAds + module V25 + module Services + ## + # Service to manage campaign criteria. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/ads/google_ads/v25/services/campaign_criterion_service" + # client = ::Google::Ads::GoogleAds::V25::Services::CampaignCriterionService::Client.new + # + module CampaignCriterionService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "campaign_criterion_service", "helpers.rb" +require "google/ads/google_ads/v25/services/campaign_criterion_service/helpers" if ::File.file? helper_path diff --git a/lib/google/ads/google_ads/v25/services/campaign_criterion_service/client.rb b/lib/google/ads/google_ads/v25/services/campaign_criterion_service/client.rb new file mode 100644 index 000000000..c96a6d339 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/campaign_criterion_service/client.rb @@ -0,0 +1,522 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# require "google/ads/google_ads/error" +require "google/ads/google_ads/v25/services/campaign_criterion_service_pb" + +module Google + module Ads + module GoogleAds + module V25 + module Services + module CampaignCriterionService + ## + # Client for the CampaignCriterionService service. + # + # Service to manage campaign criteria. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "googleads.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :campaign_criterion_service_stub + + ## + # Configure the CampaignCriterionService Client class. + # + # See {::Google::Ads::GoogleAds::V25::Services::CampaignCriterionService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all CampaignCriterionService clients + # ::Google::Ads::GoogleAds::V25::Services::CampaignCriterionService::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + default_config = Client::Configuration.new + + default_config.timeout = 14_400.0 + default_config.retry_policy = { + initial_delay: 5.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the CampaignCriterionService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Ads::GoogleAds::V25::Services::CampaignCriterionService::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @campaign_criterion_service_stub.universe_domain + end + + ## + # Create a new CampaignCriterionService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Ads::GoogleAds::V25::Services::CampaignCriterionService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Ads::GoogleAds::V25::Services::CampaignCriterionService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the CampaignCriterionService client. + # @yieldparam config [Client::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/ads/google_ads/v25/services/campaign_criterion_service_services_pb" + + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @campaign_criterion_service_stub = ::Gapic::ServiceStub.new( + ::Google::Ads::GoogleAds::V25::Services::CampaignCriterionService::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool, + logger: @config.logger + ) + + @campaign_criterion_service_stub.stub_logger&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @campaign_criterion_service_stub.logger + end + + # Service calls + + ## + # Creates, updates, or removes criteria. Operation statuses are returned. + # + # List of thrown errors: + # [AdxError]() + # [AuthenticationError]() + # [AuthorizationError]() + # [CampaignCriterionError]() + # [CollectionSizeError]() + # [ContextError]() + # [CriterionError]() + # [DatabaseError]() + # [DistinctError]() + # [FieldError]() + # [FieldMaskError]() + # [FunctionError]() + # [HeaderError]() + # [IdError]() + # [InternalError]() + # [MutateError]() + # [NewResourceCreationError]() + # [NotEmptyError]() + # [NullError]() + # [OperationAccessDeniedError]() + # [OperatorError]() + # [QuotaError]() + # [RangeError]() + # [RegionCodeError]() + # [RequestError]() + # [ResourceCountLimitExceededError]() + # [SizeLimitError]() + # [StringFormatError]() + # [StringLengthError]() + # + # @overload mutate_campaign_criteria(request, options = nil) + # Pass arguments to `mutate_campaign_criteria` via a request object, either of type + # {::Google::Ads::GoogleAds::V25::Services::MutateCampaignCriteriaRequest} or an equivalent Hash. + # + # @param request [::Google::Ads::GoogleAds::V25::Services::MutateCampaignCriteriaRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload mutate_campaign_criteria(customer_id: nil, operations: nil, partial_failure: nil, validate_only: nil, response_content_type: nil) + # Pass arguments to `mutate_campaign_criteria` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param customer_id [::String] + # Required. The ID of the customer whose criteria are being modified. + # @param operations [::Array<::Google::Ads::GoogleAds::V25::Services::CampaignCriterionOperation, ::Hash>] + # Required. The list of operations to perform on individual criteria. + # @param partial_failure [::Boolean] + # 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. + # @param validate_only [::Boolean] + # If true, the request is validated but not executed. Only errors are + # returned, not results. + # @param response_content_type [::Google::Ads::GoogleAds::V25::Enums::ResponseContentTypeEnum::ResponseContentType] + # The response content type setting. Determines whether the mutable resource + # or just the resource name should be returned post mutation. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Ads::GoogleAds::V25::Services::MutateCampaignCriteriaResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Ads::GoogleAds::V25::Services::MutateCampaignCriteriaResponse] + # + # @raise [Google::Ads::GoogleAds::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/ads/google_ads/v25/services" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Ads::GoogleAds::V25::Services::CampaignCriterionService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Ads::GoogleAds::V25::Services::MutateCampaignCriteriaRequest.new + # + # # Call the mutate_campaign_criteria method. + # result = client.mutate_campaign_criteria request + # + # # The returned object is of type Google::Ads::GoogleAds::V25::Services::MutateCampaignCriteriaResponse. + # p result + # + def mutate_campaign_criteria request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::GoogleAds::V25::Services::MutateCampaignCriteriaRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.mutate_campaign_criteria.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Ads::GoogleAds::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.customer_id + header_params["customer_id"] = request.customer_id + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.mutate_campaign_criteria.timeout, + metadata: metadata, + retry_policy: @config.rpcs.mutate_campaign_criteria.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @campaign_criterion_service_stub.call_rpc :mutate_campaign_criteria, request, + options: options do |response, operation| + yield response, operation if block_given? + end + # rescue GRPC::BadStatus => grpc_error + # raise Google::Ads::GoogleAds::Error.new grpc_error.message + end + + ## + # Configuration class for the CampaignCriterionService API. + # + # This class represents the configuration for CampaignCriterionService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Ads::GoogleAds::V25::Services::CampaignCriterionService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # mutate_campaign_criteria to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Ads::GoogleAds::V25::Services::CampaignCriterionService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.mutate_campaign_criteria.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Ads::GoogleAds::V25::Services::CampaignCriterionService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.mutate_campaign_criteria.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Ads::GoogleAds::V25::Services::CampaignCriterionService::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "googleads.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, + ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the CampaignCriterionService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `mutate_campaign_criteria` + # @return [::Gapic::Config::Method] + # + attr_reader :mutate_campaign_criteria + + # @private + def initialize parent_rpcs = nil + mutate_campaign_criteria_config = parent_rpcs.mutate_campaign_criteria if parent_rpcs.respond_to? :mutate_campaign_criteria + @mutate_campaign_criteria = ::Gapic::Config::Method.new mutate_campaign_criteria_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/campaign_criterion_service/credentials.rb b/lib/google/ads/google_ads/v25/services/campaign_criterion_service/credentials.rb new file mode 100644 index 000000000..4ec6662f1 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/campaign_criterion_service/credentials.rb @@ -0,0 +1,38 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Ads + module GoogleAds + module V25 + module Services + module CampaignCriterionService + # Credentials for the CampaignCriterionService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/adwords" + ] + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/campaign_criterion_service/paths.rb b/lib/google/ads/google_ads/v25/services/campaign_criterion_service/paths.rb new file mode 100644 index 000000000..7780fb39e --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/campaign_criterion_service/paths.rb @@ -0,0 +1,175 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Ads + module GoogleAds + module V25 + module Services + module CampaignCriterionService + # Path helper methods for the CampaignCriterionService API. + module Paths + ## + # Create a fully-qualified Campaign resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/campaigns/{campaign_id}` + # + # @param customer_id [String] + # @param campaign_id [String] + # + # @return [::String] + def campaign_path customer_id:, campaign_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/campaigns/#{campaign_id}" + end + + ## + # Create a fully-qualified CampaignCriterion resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/campaignCriteria/{campaign_id}~{criterion_id}` + # + # @param customer_id [String] + # @param campaign_id [String] + # @param criterion_id [String] + # + # @return [::String] + def campaign_criterion_path customer_id:, campaign_id:, criterion_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + raise ::ArgumentError, "campaign_id cannot contain /" if campaign_id.to_s.include? "/" + + "customers/#{customer_id}/campaignCriteria/#{campaign_id}~#{criterion_id}" + end + + ## + # Create a fully-qualified CarrierConstant resource string. + # + # The resource will be in the following format: + # + # `carrierConstants/{criterion_id}` + # + # @param criterion_id [String] + # + # @return [::String] + def carrier_constant_path criterion_id: + "carrierConstants/#{criterion_id}" + end + + ## + # Create a fully-qualified CombinedAudience resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/combinedAudiences/{combined_audience_id}` + # + # @param customer_id [String] + # @param combined_audience_id [String] + # + # @return [::String] + def combined_audience_path customer_id:, combined_audience_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/combinedAudiences/#{combined_audience_id}" + end + + ## + # Create a fully-qualified KeywordThemeConstant resource string. + # + # The resource will be in the following format: + # + # `keywordThemeConstants/{express_category_id}~{express_sub_category_id}` + # + # @param express_category_id [String] + # @param express_sub_category_id [String] + # + # @return [::String] + def keyword_theme_constant_path express_category_id:, express_sub_category_id: + raise ::ArgumentError, "express_category_id cannot contain /" if express_category_id.to_s.include? "/" + + "keywordThemeConstants/#{express_category_id}~#{express_sub_category_id}" + end + + ## + # Create a fully-qualified MobileAppCategoryConstant resource string. + # + # The resource will be in the following format: + # + # `mobileAppCategoryConstants/{mobile_app_category_id}` + # + # @param mobile_app_category_id [String] + # + # @return [::String] + def mobile_app_category_constant_path mobile_app_category_id: + "mobileAppCategoryConstants/#{mobile_app_category_id}" + end + + ## + # Create a fully-qualified MobileDeviceConstant resource string. + # + # The resource will be in the following format: + # + # `mobileDeviceConstants/{criterion_id}` + # + # @param criterion_id [String] + # + # @return [::String] + def mobile_device_constant_path criterion_id: + "mobileDeviceConstants/#{criterion_id}" + end + + ## + # Create a fully-qualified OperatingSystemVersionConstant resource string. + # + # The resource will be in the following format: + # + # `operatingSystemVersionConstants/{criterion_id}` + # + # @param criterion_id [String] + # + # @return [::String] + def operating_system_version_constant_path criterion_id: + "operatingSystemVersionConstants/#{criterion_id}" + end + + ## + # Create a fully-qualified TopicConstant resource string. + # + # The resource will be in the following format: + # + # `topicConstants/{topic_id}` + # + # @param topic_id [String] + # + # @return [::String] + def topic_constant_path topic_id: + "topicConstants/#{topic_id}" + end + + extend self + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/campaign_criterion_service_pb.rb b/lib/google/ads/google_ads/v25/services/campaign_criterion_service_pb.rb new file mode 100644 index 000000000..b0bdd9eac --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/campaign_criterion_service_pb.rb @@ -0,0 +1,35 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/services/campaign_criterion_service.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/enums/response_content_type_pb' +require 'google/ads/google_ads/v25/resources/campaign_criterion_pb' +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/field_mask_pb' +require 'google/rpc/status_pb' + + +descriptor_data = "\nBgoogle/ads/googleads/v25/services/campaign_criterion_service.proto\x12!google.ads.googleads.v25.services\x1a:google/ads/googleads/v25/enums/response_content_type.proto\x1a;google/ads/googleads/v25/resources/campaign_criterion.proto\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\x1a\x17google/rpc/status.proto\"\xad\x02\n\x1dMutateCampaignCriteriaRequest\x12\x18\n\x0b\x63ustomer_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12V\n\noperations\x18\x02 \x03(\x0b\x32=.google.ads.googleads.v25.services.CampaignCriterionOperationB\x03\xe0\x41\x02\x12\x17\n\x0fpartial_failure\x18\x03 \x01(\x08\x12\x15\n\rvalidate_only\x18\x04 \x01(\x08\x12j\n\x15response_content_type\x18\x05 \x01(\x0e\x32K.google.ads.googleads.v25.enums.ResponseContentTypeEnum.ResponseContentType\"\xaf\x02\n\x1a\x43\x61mpaignCriterionOperation\x12/\n\x0bupdate_mask\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\x12G\n\x06\x63reate\x18\x01 \x01(\x0b\x32\x35.google.ads.googleads.v25.resources.CampaignCriterionH\x00\x12G\n\x06update\x18\x02 \x01(\x0b\x32\x35.google.ads.googleads.v25.resources.CampaignCriterionH\x00\x12\x41\n\x06remove\x18\x03 \x01(\tB/\xfa\x41,\n*googleads.googleapis.com/CampaignCriterionH\x00\x42\x0b\n\toperation\"\xa6\x01\n\x1eMutateCampaignCriteriaResponse\x12\x31\n\x15partial_failure_error\x18\x03 \x01(\x0b\x32\x12.google.rpc.Status\x12Q\n\x07results\x18\x02 \x03(\x0b\x32@.google.ads.googleads.v25.services.MutateCampaignCriterionResult\"\xba\x01\n\x1dMutateCampaignCriterionResult\x12\x46\n\rresource_name\x18\x01 \x01(\tB/\xfa\x41,\n*googleads.googleapis.com/CampaignCriterion\x12Q\n\x12\x63\x61mpaign_criterion\x18\x02 \x01(\x0b\x32\x35.google.ads.googleads.v25.resources.CampaignCriterion2\xdd\x02\n\x18\x43\x61mpaignCriterionService\x12\xf9\x01\n\x16MutateCampaignCriteria\x12@.google.ads.googleads.v25.services.MutateCampaignCriteriaRequest\x1a\x41.google.ads.googleads.v25.services.MutateCampaignCriteriaResponse\"Z\xda\x41\x16\x63ustomer_id,operations\x82\xd3\xe4\x93\x02;\"6/v25/customers/{customer_id=*}/campaignCriteria:mutate:\x01*\x1a\x45\xca\x41\x18googleads.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/adwordsB\x89\x02\n%com.google.ads.googleads.v25.servicesB\x1d\x43\x61mpaignCriterionServiceProtoP\x01ZIgoogle.golang.org/genproto/googleapis/ads/googleads/v25/services;services\xa2\x02\x03GAA\xaa\x02!Google.Ads.GoogleAds.V25.Services\xca\x02!Google\\Ads\\GoogleAds\\V25\\Services\xea\x02%Google::Ads::GoogleAds::V25::Servicesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Services + MutateCampaignCriteriaRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.MutateCampaignCriteriaRequest").msgclass + CampaignCriterionOperation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.CampaignCriterionOperation").msgclass + MutateCampaignCriteriaResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.MutateCampaignCriteriaResponse").msgclass + MutateCampaignCriterionResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.MutateCampaignCriterionResult").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/campaign_criterion_service_services_pb.rb b/lib/google/ads/google_ads/v25/services/campaign_criterion_service_services_pb.rb new file mode 100644 index 000000000..0ba934986 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/campaign_criterion_service_services_pb.rb @@ -0,0 +1,80 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/ads/googleads/v25/services/campaign_criterion_service.proto for package 'Google.Ads.GoogleAds.V25.Services' +# Original file comments: +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +require 'grpc' +require 'google/ads/google_ads/v25/services/campaign_criterion_service_pb' + +module Google + module Ads + module GoogleAds + module V25 + module Services + module CampaignCriterionService + # Proto file describing the Campaign Criterion service. + # + # Service to manage campaign criteria. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.ads.googleads.v25.services.CampaignCriterionService' + + # Creates, updates, or removes criteria. Operation statuses are returned. + # + # List of thrown errors: + # [AdxError]() + # [AuthenticationError]() + # [AuthorizationError]() + # [CampaignCriterionError]() + # [CollectionSizeError]() + # [ContextError]() + # [CriterionError]() + # [DatabaseError]() + # [DistinctError]() + # [FieldError]() + # [FieldMaskError]() + # [FunctionError]() + # [HeaderError]() + # [IdError]() + # [InternalError]() + # [MutateError]() + # [NewResourceCreationError]() + # [NotEmptyError]() + # [NullError]() + # [OperationAccessDeniedError]() + # [OperatorError]() + # [QuotaError]() + # [RangeError]() + # [RegionCodeError]() + # [RequestError]() + # [ResourceCountLimitExceededError]() + # [SizeLimitError]() + # [StringFormatError]() + # [StringLengthError]() + rpc :MutateCampaignCriteria, ::Google::Ads::GoogleAds::V25::Services::MutateCampaignCriteriaRequest, ::Google::Ads::GoogleAds::V25::Services::MutateCampaignCriteriaResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/campaign_customizer_service.rb b/lib/google/ads/google_ads/v25/services/campaign_customizer_service.rb new file mode 100644 index 000000000..200e41b67 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/campaign_customizer_service.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/ads/google_ads/version" + +require "google/ads/google_ads/v25/services/campaign_customizer_service/credentials" +require "google/ads/google_ads/v25/services/campaign_customizer_service/paths" +require "google/ads/google_ads/v25/services/campaign_customizer_service/client" + +module Google + module Ads + module GoogleAds + module V25 + module Services + ## + # Service to manage campaign customizer + # + # @example Load this service and instantiate a gRPC client + # + # require "google/ads/google_ads/v25/services/campaign_customizer_service" + # client = ::Google::Ads::GoogleAds::V25::Services::CampaignCustomizerService::Client.new + # + module CampaignCustomizerService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "campaign_customizer_service", "helpers.rb" +require "google/ads/google_ads/v25/services/campaign_customizer_service/helpers" if ::File.file? helper_path diff --git a/lib/google/ads/google_ads/v25/services/campaign_customizer_service/client.rb b/lib/google/ads/google_ads/v25/services/campaign_customizer_service/client.rb new file mode 100644 index 000000000..87c5db396 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/campaign_customizer_service/client.rb @@ -0,0 +1,494 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# require "google/ads/google_ads/error" +require "google/ads/google_ads/v25/services/campaign_customizer_service_pb" + +module Google + module Ads + module GoogleAds + module V25 + module Services + module CampaignCustomizerService + ## + # Client for the CampaignCustomizerService service. + # + # Service to manage campaign customizer + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "googleads.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :campaign_customizer_service_stub + + ## + # Configure the CampaignCustomizerService Client class. + # + # See {::Google::Ads::GoogleAds::V25::Services::CampaignCustomizerService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all CampaignCustomizerService clients + # ::Google::Ads::GoogleAds::V25::Services::CampaignCustomizerService::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + default_config = Client::Configuration.new + + default_config.timeout = 14_400.0 + default_config.retry_policy = { + initial_delay: 5.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the CampaignCustomizerService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Ads::GoogleAds::V25::Services::CampaignCustomizerService::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @campaign_customizer_service_stub.universe_domain + end + + ## + # Create a new CampaignCustomizerService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Ads::GoogleAds::V25::Services::CampaignCustomizerService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Ads::GoogleAds::V25::Services::CampaignCustomizerService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the CampaignCustomizerService client. + # @yieldparam config [Client::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/ads/google_ads/v25/services/campaign_customizer_service_services_pb" + + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @campaign_customizer_service_stub = ::Gapic::ServiceStub.new( + ::Google::Ads::GoogleAds::V25::Services::CampaignCustomizerService::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool, + logger: @config.logger + ) + + @campaign_customizer_service_stub.stub_logger&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @campaign_customizer_service_stub.logger + end + + # Service calls + + ## + # Creates, updates or removes campaign customizers. Operation statuses are + # returned. + # + # @overload mutate_campaign_customizers(request, options = nil) + # Pass arguments to `mutate_campaign_customizers` via a request object, either of type + # {::Google::Ads::GoogleAds::V25::Services::MutateCampaignCustomizersRequest} or an equivalent Hash. + # + # @param request [::Google::Ads::GoogleAds::V25::Services::MutateCampaignCustomizersRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload mutate_campaign_customizers(customer_id: nil, operations: nil, partial_failure: nil, validate_only: nil, response_content_type: nil) + # Pass arguments to `mutate_campaign_customizers` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param customer_id [::String] + # Required. The ID of the customer whose campaign customizers are being + # modified. + # @param operations [::Array<::Google::Ads::GoogleAds::V25::Services::CampaignCustomizerOperation, ::Hash>] + # Required. The list of operations to perform on individual campaign + # customizers. + # @param partial_failure [::Boolean] + # 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. + # @param validate_only [::Boolean] + # If true, the request is validated but not executed. Only errors are + # returned, not results. + # @param response_content_type [::Google::Ads::GoogleAds::V25::Enums::ResponseContentTypeEnum::ResponseContentType] + # The response content type setting. Determines whether the mutable resource + # or just the resource name should be returned post mutation. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Ads::GoogleAds::V25::Services::MutateCampaignCustomizersResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Ads::GoogleAds::V25::Services::MutateCampaignCustomizersResponse] + # + # @raise [Google::Ads::GoogleAds::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/ads/google_ads/v25/services" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Ads::GoogleAds::V25::Services::CampaignCustomizerService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Ads::GoogleAds::V25::Services::MutateCampaignCustomizersRequest.new + # + # # Call the mutate_campaign_customizers method. + # result = client.mutate_campaign_customizers request + # + # # The returned object is of type Google::Ads::GoogleAds::V25::Services::MutateCampaignCustomizersResponse. + # p result + # + def mutate_campaign_customizers request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::GoogleAds::V25::Services::MutateCampaignCustomizersRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.mutate_campaign_customizers.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Ads::GoogleAds::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.customer_id + header_params["customer_id"] = request.customer_id + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.mutate_campaign_customizers.timeout, + metadata: metadata, + retry_policy: @config.rpcs.mutate_campaign_customizers.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @campaign_customizer_service_stub.call_rpc :mutate_campaign_customizers, request, + options: options do |response, operation| + yield response, operation if block_given? + end + # rescue GRPC::BadStatus => grpc_error + # raise Google::Ads::GoogleAds::Error.new grpc_error.message + end + + ## + # Configuration class for the CampaignCustomizerService API. + # + # This class represents the configuration for CampaignCustomizerService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Ads::GoogleAds::V25::Services::CampaignCustomizerService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # mutate_campaign_customizers to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Ads::GoogleAds::V25::Services::CampaignCustomizerService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.mutate_campaign_customizers.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Ads::GoogleAds::V25::Services::CampaignCustomizerService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.mutate_campaign_customizers.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Ads::GoogleAds::V25::Services::CampaignCustomizerService::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "googleads.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, + ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the CampaignCustomizerService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `mutate_campaign_customizers` + # @return [::Gapic::Config::Method] + # + attr_reader :mutate_campaign_customizers + + # @private + def initialize parent_rpcs = nil + mutate_campaign_customizers_config = parent_rpcs.mutate_campaign_customizers if parent_rpcs.respond_to? :mutate_campaign_customizers + @mutate_campaign_customizers = ::Gapic::Config::Method.new mutate_campaign_customizers_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/campaign_customizer_service/credentials.rb b/lib/google/ads/google_ads/v25/services/campaign_customizer_service/credentials.rb new file mode 100644 index 000000000..7da1f859d --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/campaign_customizer_service/credentials.rb @@ -0,0 +1,38 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Ads + module GoogleAds + module V25 + module Services + module CampaignCustomizerService + # Credentials for the CampaignCustomizerService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/adwords" + ] + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/campaign_customizer_service/paths.rb b/lib/google/ads/google_ads/v25/services/campaign_customizer_service/paths.rb new file mode 100644 index 000000000..55857fb2a --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/campaign_customizer_service/paths.rb @@ -0,0 +1,88 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Ads + module GoogleAds + module V25 + module Services + module CampaignCustomizerService + # Path helper methods for the CampaignCustomizerService API. + module Paths + ## + # Create a fully-qualified Campaign resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/campaigns/{campaign_id}` + # + # @param customer_id [String] + # @param campaign_id [String] + # + # @return [::String] + def campaign_path customer_id:, campaign_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/campaigns/#{campaign_id}" + end + + ## + # Create a fully-qualified CampaignCustomizer resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/campaignCustomizers/{campaign_id}~{customizer_attribute_id}` + # + # @param customer_id [String] + # @param campaign_id [String] + # @param customizer_attribute_id [String] + # + # @return [::String] + def campaign_customizer_path customer_id:, campaign_id:, customizer_attribute_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + raise ::ArgumentError, "campaign_id cannot contain /" if campaign_id.to_s.include? "/" + + "customers/#{customer_id}/campaignCustomizers/#{campaign_id}~#{customizer_attribute_id}" + end + + ## + # Create a fully-qualified CustomizerAttribute resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/customizerAttributes/{customizer_attribute_id}` + # + # @param customer_id [String] + # @param customizer_attribute_id [String] + # + # @return [::String] + def customizer_attribute_path customer_id:, customizer_attribute_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/customizerAttributes/#{customizer_attribute_id}" + end + + extend self + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/campaign_customizer_service_pb.rb b/lib/google/ads/google_ads/v25/services/campaign_customizer_service_pb.rb new file mode 100644 index 000000000..4460e771a --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/campaign_customizer_service_pb.rb @@ -0,0 +1,34 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/services/campaign_customizer_service.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/enums/response_content_type_pb' +require 'google/ads/google_ads/v25/resources/campaign_customizer_pb' +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/rpc/status_pb' + + +descriptor_data = "\nCgoogle/ads/googleads/v25/services/campaign_customizer_service.proto\x12!google.ads.googleads.v25.services\x1a:google/ads/googleads/v25/enums/response_content_type.proto\x1a.google.ads.googleads.v25.services.CampaignCustomizerOperationB\x03\xe0\x41\x02\x12\x17\n\x0fpartial_failure\x18\x03 \x01(\x08\x12\x15\n\rvalidate_only\x18\x04 \x01(\x08\x12j\n\x15response_content_type\x18\x05 \x01(\x0e\x32K.google.ads.googleads.v25.enums.ResponseContentTypeEnum.ResponseContentType\"\xb8\x01\n\x1b\x43\x61mpaignCustomizerOperation\x12H\n\x06\x63reate\x18\x01 \x01(\x0b\x32\x36.google.ads.googleads.v25.resources.CampaignCustomizerH\x00\x12\x42\n\x06remove\x18\x02 \x01(\tB0\xfa\x41-\n+googleads.googleapis.com/CampaignCustomizerH\x00\x42\x0b\n\toperation\"\xaa\x01\n!MutateCampaignCustomizersResponse\x12R\n\x07results\x18\x01 \x03(\x0b\x32\x41.google.ads.googleads.v25.services.MutateCampaignCustomizerResult\x12\x31\n\x15partial_failure_error\x18\x02 \x01(\x0b\x32\x12.google.rpc.Status\"\xbe\x01\n\x1eMutateCampaignCustomizerResult\x12G\n\rresource_name\x18\x01 \x01(\tB0\xfa\x41-\n+googleads.googleapis.com/CampaignCustomizer\x12S\n\x13\x63\x61mpaign_customizer\x18\x02 \x01(\x0b\x32\x36.google.ads.googleads.v25.resources.CampaignCustomizer2\xea\x02\n\x19\x43\x61mpaignCustomizerService\x12\x85\x02\n\x19MutateCampaignCustomizers\x12\x43.google.ads.googleads.v25.services.MutateCampaignCustomizersRequest\x1a\x44.google.ads.googleads.v25.services.MutateCampaignCustomizersResponse\"]\xda\x41\x16\x63ustomer_id,operations\x82\xd3\xe4\x93\x02>\"9/v25/customers/{customer_id=*}/campaignCustomizers:mutate:\x01*\x1a\x45\xca\x41\x18googleads.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/adwordsB\x8a\x02\n%com.google.ads.googleads.v25.servicesB\x1e\x43\x61mpaignCustomizerServiceProtoP\x01ZIgoogle.golang.org/genproto/googleapis/ads/googleads/v25/services;services\xa2\x02\x03GAA\xaa\x02!Google.Ads.GoogleAds.V25.Services\xca\x02!Google\\Ads\\GoogleAds\\V25\\Services\xea\x02%Google::Ads::GoogleAds::V25::Servicesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Services + MutateCampaignCustomizersRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.MutateCampaignCustomizersRequest").msgclass + CampaignCustomizerOperation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.CampaignCustomizerOperation").msgclass + MutateCampaignCustomizersResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.MutateCampaignCustomizersResponse").msgclass + MutateCampaignCustomizerResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.MutateCampaignCustomizerResult").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/campaign_customizer_service_services_pb.rb b/lib/google/ads/google_ads/v25/services/campaign_customizer_service_services_pb.rb new file mode 100644 index 000000000..78f9970de --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/campaign_customizer_service_services_pb.rb @@ -0,0 +1,50 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/ads/googleads/v25/services/campaign_customizer_service.proto for package 'Google.Ads.GoogleAds.V25.Services' +# Original file comments: +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +require 'grpc' +require 'google/ads/google_ads/v25/services/campaign_customizer_service_pb' + +module Google + module Ads + module GoogleAds + module V25 + module Services + module CampaignCustomizerService + # Proto file describing the CampaignCustomizer service. + # + # Service to manage campaign customizer + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.ads.googleads.v25.services.CampaignCustomizerService' + + # Creates, updates or removes campaign customizers. Operation statuses are + # returned. + rpc :MutateCampaignCustomizers, ::Google::Ads::GoogleAds::V25::Services::MutateCampaignCustomizersRequest, ::Google::Ads::GoogleAds::V25::Services::MutateCampaignCustomizersResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/campaign_draft_service.rb b/lib/google/ads/google_ads/v25/services/campaign_draft_service.rb new file mode 100644 index 000000000..372bf5abd --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/campaign_draft_service.rb @@ -0,0 +1,52 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/ads/google_ads/version" + +require "google/ads/google_ads/v25/services/campaign_draft_service/credentials" +require "google/ads/google_ads/v25/services/campaign_draft_service/paths" +require "google/ads/google_ads/v25/services/campaign_draft_service/operations" +require "google/ads/google_ads/v25/services/campaign_draft_service/client" + +module Google + module Ads + module GoogleAds + module V25 + module Services + ## + # Service to manage campaign drafts. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/ads/google_ads/v25/services/campaign_draft_service" + # client = ::Google::Ads::GoogleAds::V25::Services::CampaignDraftService::Client.new + # + module CampaignDraftService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "campaign_draft_service", "helpers.rb" +require "google/ads/google_ads/v25/services/campaign_draft_service/helpers" if ::File.file? helper_path diff --git a/lib/google/ads/google_ads/v25/services/campaign_draft_service/client.rb b/lib/google/ads/google_ads/v25/services/campaign_draft_service/client.rb new file mode 100644 index 000000000..028f79115 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/campaign_draft_service/client.rb @@ -0,0 +1,761 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# require "google/ads/google_ads/error" +require "google/ads/google_ads/v25/services/campaign_draft_service_pb" + +module Google + module Ads + module GoogleAds + module V25 + module Services + module CampaignDraftService + ## + # Client for the CampaignDraftService service. + # + # Service to manage campaign drafts. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "googleads.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :campaign_draft_service_stub + + ## + # Configure the CampaignDraftService Client class. + # + # See {::Google::Ads::GoogleAds::V25::Services::CampaignDraftService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all CampaignDraftService clients + # ::Google::Ads::GoogleAds::V25::Services::CampaignDraftService::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + default_config = Client::Configuration.new + + default_config.timeout = 14_400.0 + default_config.retry_policy = { + initial_delay: 5.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the CampaignDraftService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Ads::GoogleAds::V25::Services::CampaignDraftService::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @campaign_draft_service_stub.universe_domain + end + + ## + # Create a new CampaignDraftService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Ads::GoogleAds::V25::Services::CampaignDraftService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Ads::GoogleAds::V25::Services::CampaignDraftService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the CampaignDraftService client. + # @yieldparam config [Client::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/ads/google_ads/v25/services/campaign_draft_service_services_pb" + + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_client = Operations.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @config.endpoint + config.universe_domain = @config.universe_domain + end + + @campaign_draft_service_stub = ::Gapic::ServiceStub.new( + ::Google::Ads::GoogleAds::V25::Services::CampaignDraftService::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool, + logger: @config.logger + ) + + @campaign_draft_service_stub.stub_logger&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Ads::GoogleAds::V25::Services::CampaignDraftService::Operations] + # + attr_reader :operations_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @campaign_draft_service_stub.logger + end + + # Service calls + + ## + # Creates, updates, or removes campaign drafts. Operation statuses are + # returned. + # + # List of thrown errors: + # [AuthenticationError]() + # [AuthorizationError]() + # [CampaignDraftError]() + # [DatabaseError]() + # [FieldError]() + # [HeaderError]() + # [InternalError]() + # [MutateError]() + # [QuotaError]() + # [RequestError]() + # + # @overload mutate_campaign_drafts(request, options = nil) + # Pass arguments to `mutate_campaign_drafts` via a request object, either of type + # {::Google::Ads::GoogleAds::V25::Services::MutateCampaignDraftsRequest} or an equivalent Hash. + # + # @param request [::Google::Ads::GoogleAds::V25::Services::MutateCampaignDraftsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload mutate_campaign_drafts(customer_id: nil, operations: nil, partial_failure: nil, validate_only: nil, response_content_type: nil) + # Pass arguments to `mutate_campaign_drafts` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param customer_id [::String] + # Required. The ID of the customer whose campaign drafts are being modified. + # @param operations [::Array<::Google::Ads::GoogleAds::V25::Services::CampaignDraftOperation, ::Hash>] + # Required. The list of operations to perform on individual campaign drafts. + # @param partial_failure [::Boolean] + # 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. + # @param validate_only [::Boolean] + # If true, the request is validated but not executed. Only errors are + # returned, not results. + # @param response_content_type [::Google::Ads::GoogleAds::V25::Enums::ResponseContentTypeEnum::ResponseContentType] + # The response content type setting. Determines whether the mutable resource + # or just the resource name should be returned post mutation. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Ads::GoogleAds::V25::Services::MutateCampaignDraftsResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Ads::GoogleAds::V25::Services::MutateCampaignDraftsResponse] + # + # @raise [Google::Ads::GoogleAds::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/ads/google_ads/v25/services" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Ads::GoogleAds::V25::Services::CampaignDraftService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Ads::GoogleAds::V25::Services::MutateCampaignDraftsRequest.new + # + # # Call the mutate_campaign_drafts method. + # result = client.mutate_campaign_drafts request + # + # # The returned object is of type Google::Ads::GoogleAds::V25::Services::MutateCampaignDraftsResponse. + # p result + # + def mutate_campaign_drafts request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::GoogleAds::V25::Services::MutateCampaignDraftsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.mutate_campaign_drafts.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Ads::GoogleAds::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.customer_id + header_params["customer_id"] = request.customer_id + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.mutate_campaign_drafts.timeout, + metadata: metadata, + retry_policy: @config.rpcs.mutate_campaign_drafts.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @campaign_draft_service_stub.call_rpc :mutate_campaign_drafts, request, + options: options do |response, operation| + yield response, operation if block_given? + end + # rescue GRPC::BadStatus => grpc_error + # raise Google::Ads::GoogleAds::Error.new grpc_error.message + end + + ## + # Promotes the changes in a draft back to the base campaign. + # + # This method returns a Long Running Operation (LRO) indicating if the + # Promote is done. Use + # google.longrunning.Operations.GetOperation + # to poll the LRO until it is done. Only a done status is returned in the + # response. See the status in the Campaign Draft resource to determine if the + # promotion was successful. If the LRO failed, use + # {::Google::Ads::GoogleAds::V25::Services::CampaignDraftService::Client#list_campaign_draft_async_errors CampaignDraftService.ListCampaignDraftAsyncErrors} + # to view the list of error reasons. + # + # List of thrown errors: + # [AuthenticationError]() + # [AuthorizationError]() + # [CampaignDraftError]() + # [HeaderError]() + # [InternalError]() + # [QuotaError]() + # [RequestError]() + # + # @overload promote_campaign_draft(request, options = nil) + # Pass arguments to `promote_campaign_draft` via a request object, either of type + # {::Google::Ads::GoogleAds::V25::Services::PromoteCampaignDraftRequest} or an equivalent Hash. + # + # @param request [::Google::Ads::GoogleAds::V25::Services::PromoteCampaignDraftRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload promote_campaign_draft(campaign_draft: nil, validate_only: nil) + # Pass arguments to `promote_campaign_draft` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param campaign_draft [::String] + # Required. The resource name of the campaign draft to promote. + # @param validate_only [::Boolean] + # If true, the request is validated but no Long Running Operation is created. + # Only errors are returned. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [Google::Ads::GoogleAds::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/ads/google_ads/v25/services" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Ads::GoogleAds::V25::Services::CampaignDraftService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Ads::GoogleAds::V25::Services::PromoteCampaignDraftRequest.new + # + # # Call the promote_campaign_draft method. + # result = client.promote_campaign_draft request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def promote_campaign_draft request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::GoogleAds::V25::Services::PromoteCampaignDraftRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.promote_campaign_draft.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Ads::GoogleAds::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.campaign_draft + header_params["campaign_draft"] = request.campaign_draft + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.promote_campaign_draft.timeout, + metadata: metadata, + retry_policy: @config.rpcs.promote_campaign_draft.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @campaign_draft_service_stub.call_rpc :promote_campaign_draft, request, + options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + # rescue GRPC::BadStatus => grpc_error + # raise Google::Ads::GoogleAds::Error.new grpc_error.message + end + + ## + # Returns all errors that occurred during CampaignDraft promote. Throws an + # error if called before campaign draft is promoted. + # Supports standard list paging. + # + # List of thrown errors: + # [AuthenticationError]() + # [AuthorizationError]() + # [HeaderError]() + # [InternalError]() + # [QuotaError]() + # [RequestError]() + # + # @overload list_campaign_draft_async_errors(request, options = nil) + # Pass arguments to `list_campaign_draft_async_errors` via a request object, either of type + # {::Google::Ads::GoogleAds::V25::Services::ListCampaignDraftAsyncErrorsRequest} or an equivalent Hash. + # + # @param request [::Google::Ads::GoogleAds::V25::Services::ListCampaignDraftAsyncErrorsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_campaign_draft_async_errors(resource_name: nil, page_token: nil, page_size: nil) + # Pass arguments to `list_campaign_draft_async_errors` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param resource_name [::String] + # Required. The name of the campaign draft from which to retrieve the async + # errors. + # @param page_token [::String] + # 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. + # @param page_size [::Integer] + # 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. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Rpc::Status>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Rpc::Status>] + # + # @raise [Google::Ads::GoogleAds::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/ads/google_ads/v25/services" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Ads::GoogleAds::V25::Services::CampaignDraftService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Ads::GoogleAds::V25::Services::ListCampaignDraftAsyncErrorsRequest.new + # + # # Call the list_campaign_draft_async_errors method. + # result = client.list_campaign_draft_async_errors request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Rpc::Status. + # p item + # end + # + def list_campaign_draft_async_errors request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::GoogleAds::V25::Services::ListCampaignDraftAsyncErrorsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_campaign_draft_async_errors.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Ads::GoogleAds::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.resource_name + header_params["resource_name"] = request.resource_name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_campaign_draft_async_errors.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_campaign_draft_async_errors.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @campaign_draft_service_stub.call_rpc :list_campaign_draft_async_errors, request, + options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @campaign_draft_service_stub, + :list_campaign_draft_async_errors, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + # rescue GRPC::BadStatus => grpc_error + # raise Google::Ads::GoogleAds::Error.new grpc_error.message + end + + ## + # Configuration class for the CampaignDraftService API. + # + # This class represents the configuration for CampaignDraftService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Ads::GoogleAds::V25::Services::CampaignDraftService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # mutate_campaign_drafts to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Ads::GoogleAds::V25::Services::CampaignDraftService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.mutate_campaign_drafts.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Ads::GoogleAds::V25::Services::CampaignDraftService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.mutate_campaign_drafts.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Ads::GoogleAds::V25::Services::CampaignDraftService::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "googleads.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, + ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the CampaignDraftService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `mutate_campaign_drafts` + # @return [::Gapic::Config::Method] + # + attr_reader :mutate_campaign_drafts + ## + # RPC-specific configuration for `promote_campaign_draft` + # @return [::Gapic::Config::Method] + # + attr_reader :promote_campaign_draft + ## + # RPC-specific configuration for `list_campaign_draft_async_errors` + # @return [::Gapic::Config::Method] + # + attr_reader :list_campaign_draft_async_errors + + # @private + def initialize parent_rpcs = nil + mutate_campaign_drafts_config = parent_rpcs.mutate_campaign_drafts if parent_rpcs.respond_to? :mutate_campaign_drafts + @mutate_campaign_drafts = ::Gapic::Config::Method.new mutate_campaign_drafts_config + promote_campaign_draft_config = parent_rpcs.promote_campaign_draft if parent_rpcs.respond_to? :promote_campaign_draft + @promote_campaign_draft = ::Gapic::Config::Method.new promote_campaign_draft_config + list_campaign_draft_async_errors_config = parent_rpcs.list_campaign_draft_async_errors if parent_rpcs.respond_to? :list_campaign_draft_async_errors + @list_campaign_draft_async_errors = ::Gapic::Config::Method.new list_campaign_draft_async_errors_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/campaign_draft_service/credentials.rb b/lib/google/ads/google_ads/v25/services/campaign_draft_service/credentials.rb new file mode 100644 index 000000000..c85c42dca --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/campaign_draft_service/credentials.rb @@ -0,0 +1,38 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Ads + module GoogleAds + module V25 + module Services + module CampaignDraftService + # Credentials for the CampaignDraftService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/adwords" + ] + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/campaign_draft_service/operations.rb b/lib/google/ads/google_ads/v25/services/campaign_draft_service/operations.rb new file mode 100644 index 000000000..7d18c8dc3 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/campaign_draft_service/operations.rb @@ -0,0 +1,855 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/operation" +require "google/longrunning/operations_pb" + +module Google + module Ads + module GoogleAds + module V25 + module Services + module CampaignDraftService + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "googleads.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the CampaignDraftService Operations API. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def self.configure + @configure ||= Operations::Configuration.new + yield @configure if block_given? + @configure + end + + ## + # Configure the CampaignDraftService Operations instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Operations.configure}. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @operations_stub.universe_domain + end + + ## + # Create a new Operations client object. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Operations::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/longrunning/operations_services_pb" + + # Create the configuration object + @config = Configuration.new Operations.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + credentials ||= Credentials.default scope: @config.scope + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_stub = ::Gapic::ServiceStub.new( + ::Google::Longrunning::Operations::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool + ) + + # Used by an LRO wrapper for some methods of this service + @operations_client = self + end + + # Service calls + + ## + # Lists operations that match the specified filter in the request. If the + # server doesn't support this method, it returns `UNIMPLEMENTED`. + # + # @overload list_operations(request, options = nil) + # Pass arguments to `list_operations` via a request object, either of type + # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::ListOperationsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_operations(name: nil, filter: nil, page_size: nil, page_token: nil, return_partial_success: nil) + # Pass arguments to `list_operations` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation's parent resource. + # @param filter [::String] + # The standard list filter. + # @param page_size [::Integer] + # The standard list page size. + # @param page_token [::String] + # The standard list page token. + # @param return_partial_success [::Boolean] + # When set to `true`, operations that are reachable are returned as normal, + # and those that are unreachable are returned in the + # [ListOperationsResponse.unreachable] field. + # + # This can only be `true` when reading across collections e.g. when `parent` + # is set to `"projects/example/locations/-"`. + # + # This field is not by default supported and will result in an + # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in + # service or product specific documentation. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Gapic::Operation>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Gapic::Operation>] + # + # @raise [Google::Ads::GoogleAds::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::ListOperationsRequest.new + # + # # Call the list_operations method. + # result = client.list_operations request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Longrunning::Operation. + # p item + # end + # + def list_operations request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_operations.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Ads::GoogleAds::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_operations.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_operations.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :list_operations, request, options: options do |response, operation| + wrap_lro_operation = ->(op_response) { ::Gapic::Operation.new op_response, @operations_client } + response = ::Gapic::PagedEnumerable.new @operations_stub, :list_operations, request, response, + operation, options, format_resource: wrap_lro_operation + yield response, operation if block_given? + throw :response, response + end + # rescue GRPC::BadStatus => grpc_error + # raise Google::Ads::GoogleAds::Error.new grpc_error.message + end + + ## + # 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. + # + # @overload get_operation(request, options = nil) + # Pass arguments to `get_operation` via a request object, either of type + # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::GetOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_operation(name: nil) + # Pass arguments to `get_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [Google::Ads::GoogleAds::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::GetOperationRequest.new + # + # # Call the get_operation method. + # result = client.get_operation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def get_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Ads::GoogleAds::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :get_operation, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + # rescue GRPC::BadStatus => grpc_error + # raise Google::Ads::GoogleAds::Error.new grpc_error.message + end + + ## + # 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`. + # + # @overload delete_operation(request, options = nil) + # Pass arguments to `delete_operation` via a request object, either of type + # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::DeleteOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_operation(name: nil) + # Pass arguments to `delete_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to be deleted. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [Google::Ads::GoogleAds::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::DeleteOperationRequest.new + # + # # Call the delete_operation method. + # result = client.delete_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Ads::GoogleAds::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :delete_operation, request, options: options do |response, operation| + yield response, operation if block_given? + end + # rescue GRPC::BadStatus => grpc_error + # raise Google::Ads::GoogleAds::Error.new grpc_error.message + end + + ## + # 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 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 {::Google::Longrunning::Operation#error Operation.error} value with a + # {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to + # `Code.CANCELLED`. + # + # @overload cancel_operation(request, options = nil) + # Pass arguments to `cancel_operation` via a request object, either of type + # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::CancelOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload cancel_operation(name: nil) + # Pass arguments to `cancel_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to be cancelled. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [Google::Ads::GoogleAds::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::CancelOperationRequest.new + # + # # Call the cancel_operation method. + # result = client.cancel_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def cancel_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.cancel_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Ads::GoogleAds::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.cancel_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :cancel_operation, request, options: options do |response, operation| + yield response, operation if block_given? + end + # rescue GRPC::BadStatus => grpc_error + # raise Google::Ads::GoogleAds::Error.new grpc_error.message + end + + ## + # Waits until the specified long-running operation 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. + # + # @overload wait_operation(request, options = nil) + # Pass arguments to `wait_operation` via a request object, either of type + # {::Google::Longrunning::WaitOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::WaitOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload wait_operation(name: nil, timeout: nil) + # Pass arguments to `wait_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to wait on. + # @param timeout [::Google::Protobuf::Duration, ::Hash] + # 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. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [Google::Ads::GoogleAds::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::WaitOperationRequest.new + # + # # Call the wait_operation method. + # result = client.wait_operation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def wait_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::WaitOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.wait_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Ads::GoogleAds::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.wait_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :wait_operation, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + # rescue GRPC::BadStatus => grpc_error + # raise Google::Ads::GoogleAds::Error.new grpc_error.message + end + + ## + # Configuration class for the Operations API. + # + # This class represents the configuration for Operations, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Longrunning::Operations::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_operations to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Longrunning::Operations::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Longrunning::Operations::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Longrunning::Operations::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "googleads.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, + ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the Operations API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_operations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_operations + ## + # RPC-specific configuration for `get_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :get_operation + ## + # RPC-specific configuration for `delete_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_operation + ## + # RPC-specific configuration for `cancel_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :cancel_operation + ## + # RPC-specific configuration for `wait_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :wait_operation + + # @private + def initialize parent_rpcs = nil + list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations + @list_operations = ::Gapic::Config::Method.new list_operations_config + get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation + @get_operation = ::Gapic::Config::Method.new get_operation_config + delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation + @delete_operation = ::Gapic::Config::Method.new delete_operation_config + cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation + @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config + wait_operation_config = parent_rpcs.wait_operation if parent_rpcs.respond_to? :wait_operation + @wait_operation = ::Gapic::Config::Method.new wait_operation_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/campaign_draft_service/paths.rb b/lib/google/ads/google_ads/v25/services/campaign_draft_service/paths.rb new file mode 100644 index 000000000..a4eba63e0 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/campaign_draft_service/paths.rb @@ -0,0 +1,71 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Ads + module GoogleAds + module V25 + module Services + module CampaignDraftService + # Path helper methods for the CampaignDraftService API. + module Paths + ## + # Create a fully-qualified Campaign resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/campaigns/{campaign_id}` + # + # @param customer_id [String] + # @param campaign_id [String] + # + # @return [::String] + def campaign_path customer_id:, campaign_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/campaigns/#{campaign_id}" + end + + ## + # Create a fully-qualified CampaignDraft resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/campaignDrafts/{base_campaign_id}~{draft_id}` + # + # @param customer_id [String] + # @param base_campaign_id [String] + # @param draft_id [String] + # + # @return [::String] + def campaign_draft_path customer_id:, base_campaign_id:, draft_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + raise ::ArgumentError, "base_campaign_id cannot contain /" if base_campaign_id.to_s.include? "/" + + "customers/#{customer_id}/campaignDrafts/#{base_campaign_id}~#{draft_id}" + end + + extend self + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/campaign_draft_service_pb.rb b/lib/google/ads/google_ads/v25/services/campaign_draft_service_pb.rb new file mode 100644 index 000000000..e1a0eec02 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/campaign_draft_service_pb.rb @@ -0,0 +1,40 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/services/campaign_draft_service.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/enums/response_content_type_pb' +require 'google/ads/google_ads/v25/resources/campaign_draft_pb' +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/longrunning/operations_pb' +require 'google/protobuf/empty_pb' +require 'google/protobuf/field_mask_pb' +require 'google/rpc/status_pb' + + +descriptor_data = "\n>google/ads/googleads/v25/services/campaign_draft_service.proto\x12!google.ads.googleads.v25.services\x1a:google/ads/googleads/v25/enums/response_content_type.proto\x1a\x37google/ads/googleads/v25/resources/campaign_draft.proto\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x17google/rpc/status.proto\"\xa7\x02\n\x1bMutateCampaignDraftsRequest\x12\x18\n\x0b\x63ustomer_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12R\n\noperations\x18\x02 \x03(\x0b\x32\x39.google.ads.googleads.v25.services.CampaignDraftOperationB\x03\xe0\x41\x02\x12\x17\n\x0fpartial_failure\x18\x03 \x01(\x08\x12\x15\n\rvalidate_only\x18\x04 \x01(\x08\x12j\n\x15response_content_type\x18\x05 \x01(\x0e\x32K.google.ads.googleads.v25.enums.ResponseContentTypeEnum.ResponseContentType\"|\n\x1bPromoteCampaignDraftRequest\x12\x46\n\x0e\x63\x61mpaign_draft\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\n&googleads.googleapis.com/CampaignDraft\x12\x15\n\rvalidate_only\x18\x02 \x01(\x08\"\x9f\x02\n\x16\x43\x61mpaignDraftOperation\x12/\n\x0bupdate_mask\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\x12\x43\n\x06\x63reate\x18\x01 \x01(\x0b\x32\x31.google.ads.googleads.v25.resources.CampaignDraftH\x00\x12\x43\n\x06update\x18\x02 \x01(\x0b\x32\x31.google.ads.googleads.v25.resources.CampaignDraftH\x00\x12=\n\x06remove\x18\x03 \x01(\tB+\xfa\x41(\n&googleads.googleapis.com/CampaignDraftH\x00\x42\x0b\n\toperation\"\xa0\x01\n\x1cMutateCampaignDraftsResponse\x12\x31\n\x15partial_failure_error\x18\x03 \x01(\x0b\x32\x12.google.rpc.Status\x12M\n\x07results\x18\x02 \x03(\x0b\x32<.google.ads.googleads.v25.services.MutateCampaignDraftResult\"\xaa\x01\n\x19MutateCampaignDraftResult\x12\x42\n\rresource_name\x18\x01 \x01(\tB+\xfa\x41(\n&googleads.googleapis.com/CampaignDraft\x12I\n\x0e\x63\x61mpaign_draft\x18\x02 \x01(\x0b\x32\x31.google.ads.googleads.v25.resources.CampaignDraft\"\x93\x01\n#ListCampaignDraftAsyncErrorsRequest\x12\x45\n\rresource_name\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\n&googleads.googleapis.com/CampaignDraft\x12\x12\n\npage_token\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x03 \x01(\x05\"c\n$ListCampaignDraftAsyncErrorsResponse\x12\"\n\x06\x65rrors\x18\x01 \x03(\x0b\x32\x12.google.rpc.Status\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t2\xe0\x06\n\x14\x43\x61mpaignDraftService\x12\xf1\x01\n\x14MutateCampaignDrafts\x12>.google.ads.googleads.v25.services.MutateCampaignDraftsRequest\x1a?.google.ads.googleads.v25.services.MutateCampaignDraftsResponse\"X\xda\x41\x16\x63ustomer_id,operations\x82\xd3\xe4\x93\x02\x39\"4/v25/customers/{customer_id=*}/campaignDrafts:mutate:\x01*\x12\xff\x01\n\x14PromoteCampaignDraft\x12>.google.ads.googleads.v25.services.PromoteCampaignDraftRequest\x1a\x1d.google.longrunning.Operation\"\x87\x01\xca\x41.\n\x15google.protobuf.Empty\x12\x15google.protobuf.Empty\xda\x41\x0e\x63\x61mpaign_draft\x82\xd3\xe4\x93\x02?\":/v25/{campaign_draft=customers/*/campaignDrafts/*}:promote:\x01*\x12\x8a\x02\n\x1cListCampaignDraftAsyncErrors\x12\x46.google.ads.googleads.v25.services.ListCampaignDraftAsyncErrorsRequest\x1aG.google.ads.googleads.v25.services.ListCampaignDraftAsyncErrorsResponse\"Y\xda\x41\rresource_name\x82\xd3\xe4\x93\x02\x43\x12\x41/v25/{resource_name=customers/*/campaignDrafts/*}:listAsyncErrors\x1a\x45\xca\x41\x18googleads.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/adwordsB\x85\x02\n%com.google.ads.googleads.v25.servicesB\x19\x43\x61mpaignDraftServiceProtoP\x01ZIgoogle.golang.org/genproto/googleapis/ads/googleads/v25/services;services\xa2\x02\x03GAA\xaa\x02!Google.Ads.GoogleAds.V25.Services\xca\x02!Google\\Ads\\GoogleAds\\V25\\Services\xea\x02%Google::Ads::GoogleAds::V25::Servicesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Services + MutateCampaignDraftsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.MutateCampaignDraftsRequest").msgclass + PromoteCampaignDraftRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.PromoteCampaignDraftRequest").msgclass + CampaignDraftOperation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.CampaignDraftOperation").msgclass + MutateCampaignDraftsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.MutateCampaignDraftsResponse").msgclass + MutateCampaignDraftResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.MutateCampaignDraftResult").msgclass + ListCampaignDraftAsyncErrorsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.ListCampaignDraftAsyncErrorsRequest").msgclass + ListCampaignDraftAsyncErrorsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.ListCampaignDraftAsyncErrorsResponse").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/campaign_draft_service_services_pb.rb b/lib/google/ads/google_ads/v25/services/campaign_draft_service_services_pb.rb new file mode 100644 index 000000000..1965398e6 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/campaign_draft_service_services_pb.rb @@ -0,0 +1,94 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/ads/googleads/v25/services/campaign_draft_service.proto for package 'Google.Ads.GoogleAds.V25.Services' +# Original file comments: +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +require 'grpc' +require 'google/ads/google_ads/v25/services/campaign_draft_service_pb' + +module Google + module Ads + module GoogleAds + module V25 + module Services + module CampaignDraftService + # Proto file describing the Campaign Draft service. + # + # Service to manage campaign drafts. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.ads.googleads.v25.services.CampaignDraftService' + + # Creates, updates, or removes campaign drafts. Operation statuses are + # returned. + # + # List of thrown errors: + # [AuthenticationError]() + # [AuthorizationError]() + # [CampaignDraftError]() + # [DatabaseError]() + # [FieldError]() + # [HeaderError]() + # [InternalError]() + # [MutateError]() + # [QuotaError]() + # [RequestError]() + rpc :MutateCampaignDrafts, ::Google::Ads::GoogleAds::V25::Services::MutateCampaignDraftsRequest, ::Google::Ads::GoogleAds::V25::Services::MutateCampaignDraftsResponse + # Promotes the changes in a draft back to the base campaign. + # + # This method returns a Long Running Operation (LRO) indicating if the + # Promote is done. Use + # [google.longrunning.Operations.GetOperation][google.longrunning.Operations.GetOperation] + # to poll the LRO until it is done. Only a done status is returned in the + # response. See the status in the Campaign Draft resource to determine if the + # promotion was successful. If the LRO failed, use + # [CampaignDraftService.ListCampaignDraftAsyncErrors][google.ads.googleads.v25.services.CampaignDraftService.ListCampaignDraftAsyncErrors] + # to view the list of error reasons. + # + # List of thrown errors: + # [AuthenticationError]() + # [AuthorizationError]() + # [CampaignDraftError]() + # [HeaderError]() + # [InternalError]() + # [QuotaError]() + # [RequestError]() + rpc :PromoteCampaignDraft, ::Google::Ads::GoogleAds::V25::Services::PromoteCampaignDraftRequest, ::Google::Longrunning::Operation + # Returns all errors that occurred during CampaignDraft promote. Throws an + # error if called before campaign draft is promoted. + # Supports standard list paging. + # + # List of thrown errors: + # [AuthenticationError]() + # [AuthorizationError]() + # [HeaderError]() + # [InternalError]() + # [QuotaError]() + # [RequestError]() + rpc :ListCampaignDraftAsyncErrors, ::Google::Ads::GoogleAds::V25::Services::ListCampaignDraftAsyncErrorsRequest, ::Google::Ads::GoogleAds::V25::Services::ListCampaignDraftAsyncErrorsResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/campaign_goal_config_service.rb b/lib/google/ads/google_ads/v25/services/campaign_goal_config_service.rb new file mode 100644 index 000000000..bcc9c9467 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/campaign_goal_config_service.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/ads/google_ads/version" + +require "google/ads/google_ads/v25/services/campaign_goal_config_service/credentials" +require "google/ads/google_ads/v25/services/campaign_goal_config_service/paths" +require "google/ads/google_ads/v25/services/campaign_goal_config_service/client" + +module Google + module Ads + module GoogleAds + module V25 + module Services + ## + # Service to manage campaign goal configs. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/ads/google_ads/v25/services/campaign_goal_config_service" + # client = ::Google::Ads::GoogleAds::V25::Services::CampaignGoalConfigService::Client.new + # + module CampaignGoalConfigService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "campaign_goal_config_service", "helpers.rb" +require "google/ads/google_ads/v25/services/campaign_goal_config_service/helpers" if ::File.file? helper_path diff --git a/lib/google/ads/google_ads/v25/services/campaign_goal_config_service/client.rb b/lib/google/ads/google_ads/v25/services/campaign_goal_config_service/client.rb new file mode 100644 index 000000000..0ef7063cf --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/campaign_goal_config_service/client.rb @@ -0,0 +1,498 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# require "google/ads/google_ads/error" +require "google/ads/google_ads/v25/services/campaign_goal_config_service_pb" + +module Google + module Ads + module GoogleAds + module V25 + module Services + module CampaignGoalConfigService + ## + # Client for the CampaignGoalConfigService service. + # + # Service to manage campaign goal configs. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "googleads.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :campaign_goal_config_service_stub + + ## + # Configure the CampaignGoalConfigService Client class. + # + # See {::Google::Ads::GoogleAds::V25::Services::CampaignGoalConfigService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all CampaignGoalConfigService clients + # ::Google::Ads::GoogleAds::V25::Services::CampaignGoalConfigService::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + default_config = Client::Configuration.new + + default_config.timeout = 14_400.0 + default_config.retry_policy = { + initial_delay: 5.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the CampaignGoalConfigService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Ads::GoogleAds::V25::Services::CampaignGoalConfigService::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @campaign_goal_config_service_stub.universe_domain + end + + ## + # Create a new CampaignGoalConfigService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Ads::GoogleAds::V25::Services::CampaignGoalConfigService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Ads::GoogleAds::V25::Services::CampaignGoalConfigService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the CampaignGoalConfigService client. + # @yieldparam config [Client::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/ads/google_ads/v25/services/campaign_goal_config_service_services_pb" + + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @campaign_goal_config_service_stub = ::Gapic::ServiceStub.new( + ::Google::Ads::GoogleAds::V25::Services::CampaignGoalConfigService::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool, + logger: @config.logger + ) + + @campaign_goal_config_service_stub.stub_logger&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @campaign_goal_config_service_stub.logger + end + + # Service calls + + ## + # Create or update campaign goal configs. + # + # List of thrown errors: + # [AuthenticationError]() + # [AuthorizationError]() + # [HeaderError]() + # [InternalError]() + # [QuotaError]() + # [RequestError]() + # [CampaignGoalConfigError]() + # + # @overload mutate_campaign_goal_configs(request, options = nil) + # Pass arguments to `mutate_campaign_goal_configs` via a request object, either of type + # {::Google::Ads::GoogleAds::V25::Services::MutateCampaignGoalConfigsRequest} or an equivalent Hash. + # + # @param request [::Google::Ads::GoogleAds::V25::Services::MutateCampaignGoalConfigsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload mutate_campaign_goal_configs(customer_id: nil, operations: nil, partial_failure: nil, validate_only: nil) + # Pass arguments to `mutate_campaign_goal_configs` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param customer_id [::String] + # Required. The ID of the customer whose campaign goal configs are being + # modified. + # @param operations [::Array<::Google::Ads::GoogleAds::V25::Services::CampaignGoalConfigOperation, ::Hash>] + # Required. The list of operations to perform on the campaign goal configs. + # @param partial_failure [::Boolean] + # Optional. 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. + # @param validate_only [::Boolean] + # Optional. If true, the request is validated but not executed. Only errors + # are returned, not results. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Ads::GoogleAds::V25::Services::MutateCampaignGoalConfigsResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Ads::GoogleAds::V25::Services::MutateCampaignGoalConfigsResponse] + # + # @raise [Google::Ads::GoogleAds::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/ads/google_ads/v25/services" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Ads::GoogleAds::V25::Services::CampaignGoalConfigService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Ads::GoogleAds::V25::Services::MutateCampaignGoalConfigsRequest.new + # + # # Call the mutate_campaign_goal_configs method. + # result = client.mutate_campaign_goal_configs request + # + # # The returned object is of type Google::Ads::GoogleAds::V25::Services::MutateCampaignGoalConfigsResponse. + # p result + # + def mutate_campaign_goal_configs request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::GoogleAds::V25::Services::MutateCampaignGoalConfigsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.mutate_campaign_goal_configs.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Ads::GoogleAds::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.customer_id + header_params["customer_id"] = request.customer_id + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.mutate_campaign_goal_configs.timeout, + metadata: metadata, + retry_policy: @config.rpcs.mutate_campaign_goal_configs.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @campaign_goal_config_service_stub.call_rpc :mutate_campaign_goal_configs, request, + options: options do |response, operation| + yield response, operation if block_given? + end + # rescue GRPC::BadStatus => grpc_error + # raise Google::Ads::GoogleAds::Error.new grpc_error.message + end + + ## + # Configuration class for the CampaignGoalConfigService API. + # + # This class represents the configuration for CampaignGoalConfigService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Ads::GoogleAds::V25::Services::CampaignGoalConfigService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # mutate_campaign_goal_configs to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Ads::GoogleAds::V25::Services::CampaignGoalConfigService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.mutate_campaign_goal_configs.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Ads::GoogleAds::V25::Services::CampaignGoalConfigService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.mutate_campaign_goal_configs.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Ads::GoogleAds::V25::Services::CampaignGoalConfigService::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "googleads.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, + ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the CampaignGoalConfigService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `mutate_campaign_goal_configs` + # @return [::Gapic::Config::Method] + # + attr_reader :mutate_campaign_goal_configs + + # @private + def initialize parent_rpcs = nil + mutate_campaign_goal_configs_config = parent_rpcs.mutate_campaign_goal_configs if parent_rpcs.respond_to? :mutate_campaign_goal_configs + @mutate_campaign_goal_configs = ::Gapic::Config::Method.new mutate_campaign_goal_configs_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/campaign_goal_config_service/credentials.rb b/lib/google/ads/google_ads/v25/services/campaign_goal_config_service/credentials.rb new file mode 100644 index 000000000..3ec08570b --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/campaign_goal_config_service/credentials.rb @@ -0,0 +1,38 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Ads + module GoogleAds + module V25 + module Services + module CampaignGoalConfigService + # Credentials for the CampaignGoalConfigService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/adwords" + ] + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/campaign_goal_config_service/paths.rb b/lib/google/ads/google_ads/v25/services/campaign_goal_config_service/paths.rb new file mode 100644 index 000000000..c2333847f --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/campaign_goal_config_service/paths.rb @@ -0,0 +1,88 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Ads + module GoogleAds + module V25 + module Services + module CampaignGoalConfigService + # Path helper methods for the CampaignGoalConfigService API. + module Paths + ## + # Create a fully-qualified Campaign resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/campaigns/{campaign_id}` + # + # @param customer_id [String] + # @param campaign_id [String] + # + # @return [::String] + def campaign_path customer_id:, campaign_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/campaigns/#{campaign_id}" + end + + ## + # Create a fully-qualified CampaignGoalConfig resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/campaignGoalConfigs/{campaign_id}~{unified_goal_id}` + # + # @param customer_id [String] + # @param campaign_id [String] + # @param unified_goal_id [String] + # + # @return [::String] + def campaign_goal_config_path customer_id:, campaign_id:, unified_goal_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + raise ::ArgumentError, "campaign_id cannot contain /" if campaign_id.to_s.include? "/" + + "customers/#{customer_id}/campaignGoalConfigs/#{campaign_id}~#{unified_goal_id}" + end + + ## + # Create a fully-qualified Goal resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/goals/{unified_goal_id}` + # + # @param customer_id [String] + # @param unified_goal_id [String] + # + # @return [::String] + def goal_path customer_id:, unified_goal_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/goals/#{unified_goal_id}" + end + + extend self + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/campaign_goal_config_service_pb.rb b/lib/google/ads/google_ads/v25/services/campaign_goal_config_service_pb.rb new file mode 100644 index 000000000..8c60a0390 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/campaign_goal_config_service_pb.rb @@ -0,0 +1,34 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/services/campaign_goal_config_service.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/resources/campaign_goal_config_pb' +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/field_mask_pb' +require 'google/rpc/status_pb' + + +descriptor_data = "\nDgoogle/ads/googleads/v25/services/campaign_goal_config_service.proto\x12!google.ads.googleads.v25.services\x1a=google/ads/googleads/v25/resources/campaign_goal_config.proto\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\x1a\x17google/rpc/status.proto\"\xcf\x01\n MutateCampaignGoalConfigsRequest\x12\x18\n\x0b\x63ustomer_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12W\n\noperations\x18\x02 \x03(\x0b\x32>.google.ads.googleads.v25.services.CampaignGoalConfigOperationB\x03\xe0\x41\x02\x12\x1c\n\x0fpartial_failure\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\x12\x1a\n\rvalidate_only\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"\xb3\x02\n\x1b\x43\x61mpaignGoalConfigOperation\x12/\n\x0bupdate_mask\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\x12H\n\x06\x63reate\x18\x01 \x01(\x0b\x32\x36.google.ads.googleads.v25.resources.CampaignGoalConfigH\x00\x12H\n\x06update\x18\x03 \x01(\x0b\x32\x36.google.ads.googleads.v25.resources.CampaignGoalConfigH\x00\x12\x42\n\x06remove\x18\x02 \x01(\tB0\xfa\x41-\n+googleads.googleapis.com/CampaignGoalConfigH\x00\x42\x0b\n\toperation\"\xaa\x01\n!MutateCampaignGoalConfigsResponse\x12\x31\n\x15partial_failure_error\x18\x01 \x01(\x0b\x32\x12.google.rpc.Status\x12R\n\x07results\x18\x02 \x03(\x0b\x32\x41.google.ads.googleads.v25.services.MutateCampaignGoalConfigResult\"i\n\x1eMutateCampaignGoalConfigResult\x12G\n\rresource_name\x18\x01 \x01(\tB0\xfa\x41-\n+googleads.googleapis.com/CampaignGoalConfig2\xea\x02\n\x19\x43\x61mpaignGoalConfigService\x12\x85\x02\n\x19MutateCampaignGoalConfigs\x12\x43.google.ads.googleads.v25.services.MutateCampaignGoalConfigsRequest\x1a\x44.google.ads.googleads.v25.services.MutateCampaignGoalConfigsResponse\"]\xda\x41\x16\x63ustomer_id,operations\x82\xd3\xe4\x93\x02>\"9/v25/customers/{customer_id=*}/CampaignGoalConfigs:mutate:\x01*\x1a\x45\xca\x41\x18googleads.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/adwordsB\x8a\x02\n%com.google.ads.googleads.v25.servicesB\x1e\x43\x61mpaignGoalConfigServiceProtoP\x01ZIgoogle.golang.org/genproto/googleapis/ads/googleads/v25/services;services\xa2\x02\x03GAA\xaa\x02!Google.Ads.GoogleAds.V25.Services\xca\x02!Google\\Ads\\GoogleAds\\V25\\Services\xea\x02%Google::Ads::GoogleAds::V25::Servicesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Services + MutateCampaignGoalConfigsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.MutateCampaignGoalConfigsRequest").msgclass + CampaignGoalConfigOperation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.CampaignGoalConfigOperation").msgclass + MutateCampaignGoalConfigsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.MutateCampaignGoalConfigsResponse").msgclass + MutateCampaignGoalConfigResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.MutateCampaignGoalConfigResult").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/campaign_goal_config_service_services_pb.rb b/lib/google/ads/google_ads/v25/services/campaign_goal_config_service_services_pb.rb new file mode 100644 index 000000000..c079f335b --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/campaign_goal_config_service_services_pb.rb @@ -0,0 +1,58 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/ads/googleads/v25/services/campaign_goal_config_service.proto for package 'Google.Ads.GoogleAds.V25.Services' +# Original file comments: +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +require 'grpc' +require 'google/ads/google_ads/v25/services/campaign_goal_config_service_pb' + +module Google + module Ads + module GoogleAds + module V25 + module Services + module CampaignGoalConfigService + # Proto file describing the campaign goal config service. + # + # Service to manage campaign goal configs. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.ads.googleads.v25.services.CampaignGoalConfigService' + + # Create or update campaign goal configs. + # + # List of thrown errors: + # [AuthenticationError]() + # [AuthorizationError]() + # [HeaderError]() + # [InternalError]() + # [QuotaError]() + # [RequestError]() + # [CampaignGoalConfigError]() + rpc :MutateCampaignGoalConfigs, ::Google::Ads::GoogleAds::V25::Services::MutateCampaignGoalConfigsRequest, ::Google::Ads::GoogleAds::V25::Services::MutateCampaignGoalConfigsResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/campaign_group_service.rb b/lib/google/ads/google_ads/v25/services/campaign_group_service.rb new file mode 100644 index 000000000..2266061cb --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/campaign_group_service.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/ads/google_ads/version" + +require "google/ads/google_ads/v25/services/campaign_group_service/credentials" +require "google/ads/google_ads/v25/services/campaign_group_service/paths" +require "google/ads/google_ads/v25/services/campaign_group_service/client" + +module Google + module Ads + module GoogleAds + module V25 + module Services + ## + # Service to manage campaign groups. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/ads/google_ads/v25/services/campaign_group_service" + # client = ::Google::Ads::GoogleAds::V25::Services::CampaignGroupService::Client.new + # + module CampaignGroupService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "campaign_group_service", "helpers.rb" +require "google/ads/google_ads/v25/services/campaign_group_service/helpers" if ::File.file? helper_path diff --git a/lib/google/ads/google_ads/v25/services/campaign_group_service/client.rb b/lib/google/ads/google_ads/v25/services/campaign_group_service/client.rb new file mode 100644 index 000000000..9e3e7c67d --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/campaign_group_service/client.rb @@ -0,0 +1,492 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# require "google/ads/google_ads/error" +require "google/ads/google_ads/v25/services/campaign_group_service_pb" + +module Google + module Ads + module GoogleAds + module V25 + module Services + module CampaignGroupService + ## + # Client for the CampaignGroupService service. + # + # Service to manage campaign groups. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "googleads.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :campaign_group_service_stub + + ## + # Configure the CampaignGroupService Client class. + # + # See {::Google::Ads::GoogleAds::V25::Services::CampaignGroupService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all CampaignGroupService clients + # ::Google::Ads::GoogleAds::V25::Services::CampaignGroupService::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + default_config = Client::Configuration.new + + default_config.timeout = 14_400.0 + default_config.retry_policy = { + initial_delay: 5.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the CampaignGroupService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Ads::GoogleAds::V25::Services::CampaignGroupService::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @campaign_group_service_stub.universe_domain + end + + ## + # Create a new CampaignGroupService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Ads::GoogleAds::V25::Services::CampaignGroupService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Ads::GoogleAds::V25::Services::CampaignGroupService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the CampaignGroupService client. + # @yieldparam config [Client::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/ads/google_ads/v25/services/campaign_group_service_services_pb" + + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @campaign_group_service_stub = ::Gapic::ServiceStub.new( + ::Google::Ads::GoogleAds::V25::Services::CampaignGroupService::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool, + logger: @config.logger + ) + + @campaign_group_service_stub.stub_logger&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @campaign_group_service_stub.logger + end + + # Service calls + + ## + # Creates, updates, or removes campaign groups. Operation statuses are + # returned. + # + # @overload mutate_campaign_groups(request, options = nil) + # Pass arguments to `mutate_campaign_groups` via a request object, either of type + # {::Google::Ads::GoogleAds::V25::Services::MutateCampaignGroupsRequest} or an equivalent Hash. + # + # @param request [::Google::Ads::GoogleAds::V25::Services::MutateCampaignGroupsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload mutate_campaign_groups(customer_id: nil, operations: nil, partial_failure: nil, validate_only: nil, response_content_type: nil) + # Pass arguments to `mutate_campaign_groups` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param customer_id [::String] + # Required. The ID of the customer whose campaign groups are being modified. + # @param operations [::Array<::Google::Ads::GoogleAds::V25::Services::CampaignGroupOperation, ::Hash>] + # Required. The list of operations to perform on individual campaign groups. + # @param partial_failure [::Boolean] + # 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. + # @param validate_only [::Boolean] + # If true, the request is validated but not executed. Only errors are + # returned, not results. + # @param response_content_type [::Google::Ads::GoogleAds::V25::Enums::ResponseContentTypeEnum::ResponseContentType] + # The response content type setting. Determines whether the mutable resource + # or just the resource name should be returned post mutation. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Ads::GoogleAds::V25::Services::MutateCampaignGroupsResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Ads::GoogleAds::V25::Services::MutateCampaignGroupsResponse] + # + # @raise [Google::Ads::GoogleAds::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/ads/google_ads/v25/services" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Ads::GoogleAds::V25::Services::CampaignGroupService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Ads::GoogleAds::V25::Services::MutateCampaignGroupsRequest.new + # + # # Call the mutate_campaign_groups method. + # result = client.mutate_campaign_groups request + # + # # The returned object is of type Google::Ads::GoogleAds::V25::Services::MutateCampaignGroupsResponse. + # p result + # + def mutate_campaign_groups request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::GoogleAds::V25::Services::MutateCampaignGroupsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.mutate_campaign_groups.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Ads::GoogleAds::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.customer_id + header_params["customer_id"] = request.customer_id + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.mutate_campaign_groups.timeout, + metadata: metadata, + retry_policy: @config.rpcs.mutate_campaign_groups.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @campaign_group_service_stub.call_rpc :mutate_campaign_groups, request, + options: options do |response, operation| + yield response, operation if block_given? + end + # rescue GRPC::BadStatus => grpc_error + # raise Google::Ads::GoogleAds::Error.new grpc_error.message + end + + ## + # Configuration class for the CampaignGroupService API. + # + # This class represents the configuration for CampaignGroupService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Ads::GoogleAds::V25::Services::CampaignGroupService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # mutate_campaign_groups to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Ads::GoogleAds::V25::Services::CampaignGroupService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.mutate_campaign_groups.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Ads::GoogleAds::V25::Services::CampaignGroupService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.mutate_campaign_groups.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Ads::GoogleAds::V25::Services::CampaignGroupService::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "googleads.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, + ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the CampaignGroupService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `mutate_campaign_groups` + # @return [::Gapic::Config::Method] + # + attr_reader :mutate_campaign_groups + + # @private + def initialize parent_rpcs = nil + mutate_campaign_groups_config = parent_rpcs.mutate_campaign_groups if parent_rpcs.respond_to? :mutate_campaign_groups + @mutate_campaign_groups = ::Gapic::Config::Method.new mutate_campaign_groups_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/campaign_group_service/credentials.rb b/lib/google/ads/google_ads/v25/services/campaign_group_service/credentials.rb new file mode 100644 index 000000000..2e63e84fd --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/campaign_group_service/credentials.rb @@ -0,0 +1,38 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Ads + module GoogleAds + module V25 + module Services + module CampaignGroupService + # Credentials for the CampaignGroupService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/adwords" + ] + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/campaign_group_service/paths.rb b/lib/google/ads/google_ads/v25/services/campaign_group_service/paths.rb new file mode 100644 index 000000000..d7b5ea159 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/campaign_group_service/paths.rb @@ -0,0 +1,52 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Ads + module GoogleAds + module V25 + module Services + module CampaignGroupService + # Path helper methods for the CampaignGroupService API. + module Paths + ## + # Create a fully-qualified CampaignGroup resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/campaignGroups/{campaign_group_id}` + # + # @param customer_id [String] + # @param campaign_group_id [String] + # + # @return [::String] + def campaign_group_path customer_id:, campaign_group_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/campaignGroups/#{campaign_group_id}" + end + + extend self + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/campaign_group_service_pb.rb b/lib/google/ads/google_ads/v25/services/campaign_group_service_pb.rb new file mode 100644 index 000000000..7199f4686 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/campaign_group_service_pb.rb @@ -0,0 +1,35 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/services/campaign_group_service.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/enums/response_content_type_pb' +require 'google/ads/google_ads/v25/resources/campaign_group_pb' +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/field_mask_pb' +require 'google/rpc/status_pb' + + +descriptor_data = "\n>google/ads/googleads/v25/services/campaign_group_service.proto\x12!google.ads.googleads.v25.services\x1a:google/ads/googleads/v25/enums/response_content_type.proto\x1a\x37google/ads/googleads/v25/resources/campaign_group.proto\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\x1a\x17google/rpc/status.proto\"\xa7\x02\n\x1bMutateCampaignGroupsRequest\x12\x18\n\x0b\x63ustomer_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12R\n\noperations\x18\x02 \x03(\x0b\x32\x39.google.ads.googleads.v25.services.CampaignGroupOperationB\x03\xe0\x41\x02\x12\x17\n\x0fpartial_failure\x18\x03 \x01(\x08\x12\x15\n\rvalidate_only\x18\x04 \x01(\x08\x12j\n\x15response_content_type\x18\x05 \x01(\x0e\x32K.google.ads.googleads.v25.enums.ResponseContentTypeEnum.ResponseContentType\"\x9f\x02\n\x16\x43\x61mpaignGroupOperation\x12/\n\x0bupdate_mask\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\x12\x43\n\x06\x63reate\x18\x01 \x01(\x0b\x32\x31.google.ads.googleads.v25.resources.CampaignGroupH\x00\x12\x43\n\x06update\x18\x02 \x01(\x0b\x32\x31.google.ads.googleads.v25.resources.CampaignGroupH\x00\x12=\n\x06remove\x18\x03 \x01(\tB+\xfa\x41(\n&googleads.googleapis.com/CampaignGroupH\x00\x42\x0b\n\toperation\"\xa0\x01\n\x1cMutateCampaignGroupsResponse\x12M\n\x07results\x18\x02 \x03(\x0b\x32<.google.ads.googleads.v25.services.MutateCampaignGroupResult\x12\x31\n\x15partial_failure_error\x18\x03 \x01(\x0b\x32\x12.google.rpc.Status\"\xad\x01\n\x19MutateCampaignGroupResult\x12\x45\n\rresource_name\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\n&googleads.googleapis.com/CampaignGroup\x12I\n\x0e\x63\x61mpaign_group\x18\x02 \x01(\x0b\x32\x31.google.ads.googleads.v25.resources.CampaignGroup2\xd1\x02\n\x14\x43\x61mpaignGroupService\x12\xf1\x01\n\x14MutateCampaignGroups\x12>.google.ads.googleads.v25.services.MutateCampaignGroupsRequest\x1a?.google.ads.googleads.v25.services.MutateCampaignGroupsResponse\"X\xda\x41\x16\x63ustomer_id,operations\x82\xd3\xe4\x93\x02\x39\"4/v25/customers/{customer_id=*}/campaignGroups:mutate:\x01*\x1a\x45\xca\x41\x18googleads.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/adwordsB\x85\x02\n%com.google.ads.googleads.v25.servicesB\x19\x43\x61mpaignGroupServiceProtoP\x01ZIgoogle.golang.org/genproto/googleapis/ads/googleads/v25/services;services\xa2\x02\x03GAA\xaa\x02!Google.Ads.GoogleAds.V25.Services\xca\x02!Google\\Ads\\GoogleAds\\V25\\Services\xea\x02%Google::Ads::GoogleAds::V25::Servicesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Services + MutateCampaignGroupsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.MutateCampaignGroupsRequest").msgclass + CampaignGroupOperation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.CampaignGroupOperation").msgclass + MutateCampaignGroupsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.MutateCampaignGroupsResponse").msgclass + MutateCampaignGroupResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.MutateCampaignGroupResult").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/campaign_group_service_services_pb.rb b/lib/google/ads/google_ads/v25/services/campaign_group_service_services_pb.rb new file mode 100644 index 000000000..56fafc48e --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/campaign_group_service_services_pb.rb @@ -0,0 +1,50 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/ads/googleads/v25/services/campaign_group_service.proto for package 'Google.Ads.GoogleAds.V25.Services' +# Original file comments: +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +require 'grpc' +require 'google/ads/google_ads/v25/services/campaign_group_service_pb' + +module Google + module Ads + module GoogleAds + module V25 + module Services + module CampaignGroupService + # Proto file describing the Campaign group service. + # + # Service to manage campaign groups. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.ads.googleads.v25.services.CampaignGroupService' + + # Creates, updates, or removes campaign groups. Operation statuses are + # returned. + rpc :MutateCampaignGroups, ::Google::Ads::GoogleAds::V25::Services::MutateCampaignGroupsRequest, ::Google::Ads::GoogleAds::V25::Services::MutateCampaignGroupsResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/campaign_label_service.rb b/lib/google/ads/google_ads/v25/services/campaign_label_service.rb new file mode 100644 index 000000000..0aa257488 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/campaign_label_service.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/ads/google_ads/version" + +require "google/ads/google_ads/v25/services/campaign_label_service/credentials" +require "google/ads/google_ads/v25/services/campaign_label_service/paths" +require "google/ads/google_ads/v25/services/campaign_label_service/client" + +module Google + module Ads + module GoogleAds + module V25 + module Services + ## + # Service to manage labels on campaigns. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/ads/google_ads/v25/services/campaign_label_service" + # client = ::Google::Ads::GoogleAds::V25::Services::CampaignLabelService::Client.new + # + module CampaignLabelService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "campaign_label_service", "helpers.rb" +require "google/ads/google_ads/v25/services/campaign_label_service/helpers" if ::File.file? helper_path diff --git a/lib/google/ads/google_ads/v25/services/campaign_label_service/client.rb b/lib/google/ads/google_ads/v25/services/campaign_label_service/client.rb new file mode 100644 index 000000000..c5b478a34 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/campaign_label_service/client.rb @@ -0,0 +1,504 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# require "google/ads/google_ads/error" +require "google/ads/google_ads/v25/services/campaign_label_service_pb" + +module Google + module Ads + module GoogleAds + module V25 + module Services + module CampaignLabelService + ## + # Client for the CampaignLabelService service. + # + # Service to manage labels on campaigns. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "googleads.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :campaign_label_service_stub + + ## + # Configure the CampaignLabelService Client class. + # + # See {::Google::Ads::GoogleAds::V25::Services::CampaignLabelService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all CampaignLabelService clients + # ::Google::Ads::GoogleAds::V25::Services::CampaignLabelService::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + default_config = Client::Configuration.new + + default_config.timeout = 14_400.0 + default_config.retry_policy = { + initial_delay: 5.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the CampaignLabelService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Ads::GoogleAds::V25::Services::CampaignLabelService::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @campaign_label_service_stub.universe_domain + end + + ## + # Create a new CampaignLabelService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Ads::GoogleAds::V25::Services::CampaignLabelService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Ads::GoogleAds::V25::Services::CampaignLabelService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the CampaignLabelService client. + # @yieldparam config [Client::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/ads/google_ads/v25/services/campaign_label_service_services_pb" + + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @campaign_label_service_stub = ::Gapic::ServiceStub.new( + ::Google::Ads::GoogleAds::V25::Services::CampaignLabelService::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool, + logger: @config.logger + ) + + @campaign_label_service_stub.stub_logger&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @campaign_label_service_stub.logger + end + + # Service calls + + ## + # Creates and removes campaign-label relationships. + # Operation statuses are returned. + # + # List of thrown errors: + # [AuthenticationError]() + # [AuthorizationError]() + # [DatabaseError]() + # [FieldError]() + # [HeaderError]() + # [InternalError]() + # [LabelError]() + # [MutateError]() + # [NewResourceCreationError]() + # [QuotaError]() + # [RequestError]() + # + # @overload mutate_campaign_labels(request, options = nil) + # Pass arguments to `mutate_campaign_labels` via a request object, either of type + # {::Google::Ads::GoogleAds::V25::Services::MutateCampaignLabelsRequest} or an equivalent Hash. + # + # @param request [::Google::Ads::GoogleAds::V25::Services::MutateCampaignLabelsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload mutate_campaign_labels(customer_id: nil, operations: nil, partial_failure: nil, validate_only: nil) + # Pass arguments to `mutate_campaign_labels` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param customer_id [::String] + # Required. ID of the customer whose campaign-label relationships are being + # modified. + # @param operations [::Array<::Google::Ads::GoogleAds::V25::Services::CampaignLabelOperation, ::Hash>] + # Required. The list of operations to perform on campaign-label + # relationships. + # @param partial_failure [::Boolean] + # 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. + # @param validate_only [::Boolean] + # If true, the request is validated but not executed. Only errors are + # returned, not results. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Ads::GoogleAds::V25::Services::MutateCampaignLabelsResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Ads::GoogleAds::V25::Services::MutateCampaignLabelsResponse] + # + # @raise [Google::Ads::GoogleAds::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/ads/google_ads/v25/services" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Ads::GoogleAds::V25::Services::CampaignLabelService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Ads::GoogleAds::V25::Services::MutateCampaignLabelsRequest.new + # + # # Call the mutate_campaign_labels method. + # result = client.mutate_campaign_labels request + # + # # The returned object is of type Google::Ads::GoogleAds::V25::Services::MutateCampaignLabelsResponse. + # p result + # + def mutate_campaign_labels request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::GoogleAds::V25::Services::MutateCampaignLabelsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.mutate_campaign_labels.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Ads::GoogleAds::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.customer_id + header_params["customer_id"] = request.customer_id + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.mutate_campaign_labels.timeout, + metadata: metadata, + retry_policy: @config.rpcs.mutate_campaign_labels.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @campaign_label_service_stub.call_rpc :mutate_campaign_labels, request, + options: options do |response, operation| + yield response, operation if block_given? + end + # rescue GRPC::BadStatus => grpc_error + # raise Google::Ads::GoogleAds::Error.new grpc_error.message + end + + ## + # Configuration class for the CampaignLabelService API. + # + # This class represents the configuration for CampaignLabelService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Ads::GoogleAds::V25::Services::CampaignLabelService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # mutate_campaign_labels to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Ads::GoogleAds::V25::Services::CampaignLabelService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.mutate_campaign_labels.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Ads::GoogleAds::V25::Services::CampaignLabelService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.mutate_campaign_labels.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Ads::GoogleAds::V25::Services::CampaignLabelService::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "googleads.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, + ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the CampaignLabelService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `mutate_campaign_labels` + # @return [::Gapic::Config::Method] + # + attr_reader :mutate_campaign_labels + + # @private + def initialize parent_rpcs = nil + mutate_campaign_labels_config = parent_rpcs.mutate_campaign_labels if parent_rpcs.respond_to? :mutate_campaign_labels + @mutate_campaign_labels = ::Gapic::Config::Method.new mutate_campaign_labels_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/campaign_label_service/credentials.rb b/lib/google/ads/google_ads/v25/services/campaign_label_service/credentials.rb new file mode 100644 index 000000000..f7beb790e --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/campaign_label_service/credentials.rb @@ -0,0 +1,38 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Ads + module GoogleAds + module V25 + module Services + module CampaignLabelService + # Credentials for the CampaignLabelService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/adwords" + ] + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/campaign_label_service/paths.rb b/lib/google/ads/google_ads/v25/services/campaign_label_service/paths.rb new file mode 100644 index 000000000..95aa66711 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/campaign_label_service/paths.rb @@ -0,0 +1,88 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Ads + module GoogleAds + module V25 + module Services + module CampaignLabelService + # Path helper methods for the CampaignLabelService API. + module Paths + ## + # Create a fully-qualified Campaign resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/campaigns/{campaign_id}` + # + # @param customer_id [String] + # @param campaign_id [String] + # + # @return [::String] + def campaign_path customer_id:, campaign_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/campaigns/#{campaign_id}" + end + + ## + # Create a fully-qualified CampaignLabel resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/campaignLabels/{campaign_id}~{label_id}` + # + # @param customer_id [String] + # @param campaign_id [String] + # @param label_id [String] + # + # @return [::String] + def campaign_label_path customer_id:, campaign_id:, label_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + raise ::ArgumentError, "campaign_id cannot contain /" if campaign_id.to_s.include? "/" + + "customers/#{customer_id}/campaignLabels/#{campaign_id}~#{label_id}" + end + + ## + # Create a fully-qualified Label resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/labels/{label_id}` + # + # @param customer_id [String] + # @param label_id [String] + # + # @return [::String] + def label_path customer_id:, label_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/labels/#{label_id}" + end + + extend self + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/campaign_label_service_pb.rb b/lib/google/ads/google_ads/v25/services/campaign_label_service_pb.rb new file mode 100644 index 000000000..9a2da25b1 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/campaign_label_service_pb.rb @@ -0,0 +1,33 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/services/campaign_label_service.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/resources/campaign_label_pb' +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/rpc/status_pb' + + +descriptor_data = "\n>google/ads/googleads/v25/services/campaign_label_service.proto\x12!google.ads.googleads.v25.services\x1a\x37google/ads/googleads/v25/resources/campaign_label.proto\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x17google/rpc/status.proto\"\xbb\x01\n\x1bMutateCampaignLabelsRequest\x12\x18\n\x0b\x63ustomer_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12R\n\noperations\x18\x02 \x03(\x0b\x32\x39.google.ads.googleads.v25.services.CampaignLabelOperationB\x03\xe0\x41\x02\x12\x17\n\x0fpartial_failure\x18\x03 \x01(\x08\x12\x15\n\rvalidate_only\x18\x04 \x01(\x08\"\xa9\x01\n\x16\x43\x61mpaignLabelOperation\x12\x43\n\x06\x63reate\x18\x01 \x01(\x0b\x32\x31.google.ads.googleads.v25.resources.CampaignLabelH\x00\x12=\n\x06remove\x18\x02 \x01(\tB+\xfa\x41(\n&googleads.googleapis.com/CampaignLabelH\x00\x42\x0b\n\toperation\"\xa0\x01\n\x1cMutateCampaignLabelsResponse\x12\x31\n\x15partial_failure_error\x18\x03 \x01(\x0b\x32\x12.google.rpc.Status\x12M\n\x07results\x18\x02 \x03(\x0b\x32<.google.ads.googleads.v25.services.MutateCampaignLabelResult\"_\n\x19MutateCampaignLabelResult\x12\x42\n\rresource_name\x18\x01 \x01(\tB+\xfa\x41(\n&googleads.googleapis.com/CampaignLabel2\xd1\x02\n\x14\x43\x61mpaignLabelService\x12\xf1\x01\n\x14MutateCampaignLabels\x12>.google.ads.googleads.v25.services.MutateCampaignLabelsRequest\x1a?.google.ads.googleads.v25.services.MutateCampaignLabelsResponse\"X\xda\x41\x16\x63ustomer_id,operations\x82\xd3\xe4\x93\x02\x39\"4/v25/customers/{customer_id=*}/campaignLabels:mutate:\x01*\x1a\x45\xca\x41\x18googleads.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/adwordsB\x85\x02\n%com.google.ads.googleads.v25.servicesB\x19\x43\x61mpaignLabelServiceProtoP\x01ZIgoogle.golang.org/genproto/googleapis/ads/googleads/v25/services;services\xa2\x02\x03GAA\xaa\x02!Google.Ads.GoogleAds.V25.Services\xca\x02!Google\\Ads\\GoogleAds\\V25\\Services\xea\x02%Google::Ads::GoogleAds::V25::Servicesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Services + MutateCampaignLabelsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.MutateCampaignLabelsRequest").msgclass + CampaignLabelOperation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.CampaignLabelOperation").msgclass + MutateCampaignLabelsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.MutateCampaignLabelsResponse").msgclass + MutateCampaignLabelResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.MutateCampaignLabelResult").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/campaign_label_service_services_pb.rb b/lib/google/ads/google_ads/v25/services/campaign_label_service_services_pb.rb new file mode 100644 index 000000000..3093132e5 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/campaign_label_service_services_pb.rb @@ -0,0 +1,63 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/ads/googleads/v25/services/campaign_label_service.proto for package 'Google.Ads.GoogleAds.V25.Services' +# Original file comments: +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +require 'grpc' +require 'google/ads/google_ads/v25/services/campaign_label_service_pb' + +module Google + module Ads + module GoogleAds + module V25 + module Services + module CampaignLabelService + # Proto file describing the Campaign Label service. + # + # Service to manage labels on campaigns. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.ads.googleads.v25.services.CampaignLabelService' + + # Creates and removes campaign-label relationships. + # Operation statuses are returned. + # + # List of thrown errors: + # [AuthenticationError]() + # [AuthorizationError]() + # [DatabaseError]() + # [FieldError]() + # [HeaderError]() + # [InternalError]() + # [LabelError]() + # [MutateError]() + # [NewResourceCreationError]() + # [QuotaError]() + # [RequestError]() + rpc :MutateCampaignLabels, ::Google::Ads::GoogleAds::V25::Services::MutateCampaignLabelsRequest, ::Google::Ads::GoogleAds::V25::Services::MutateCampaignLabelsResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/campaign_service.rb b/lib/google/ads/google_ads/v25/services/campaign_service.rb new file mode 100644 index 000000000..ea80cd6b4 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/campaign_service.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/ads/google_ads/version" + +require "google/ads/google_ads/v25/services/campaign_service/credentials" +require "google/ads/google_ads/v25/services/campaign_service/paths" +require "google/ads/google_ads/v25/services/campaign_service/client" + +module Google + module Ads + module GoogleAds + module V25 + module Services + ## + # Service to manage campaigns. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/ads/google_ads/v25/services/campaign_service" + # client = ::Google::Ads::GoogleAds::V25::Services::CampaignService::Client.new + # + module CampaignService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "campaign_service", "helpers.rb" +require "google/ads/google_ads/v25/services/campaign_service/helpers" if ::File.file? helper_path diff --git a/lib/google/ads/google_ads/v25/services/campaign_service/client.rb b/lib/google/ads/google_ads/v25/services/campaign_service/client.rb new file mode 100644 index 000000000..0e285f16f --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/campaign_service/client.rb @@ -0,0 +1,637 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# require "google/ads/google_ads/error" +require "google/ads/google_ads/v25/services/campaign_service_pb" + +module Google + module Ads + module GoogleAds + module V25 + module Services + module CampaignService + ## + # Client for the CampaignService service. + # + # Service to manage campaigns. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "googleads.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :campaign_service_stub + + ## + # Configure the CampaignService Client class. + # + # See {::Google::Ads::GoogleAds::V25::Services::CampaignService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all CampaignService clients + # ::Google::Ads::GoogleAds::V25::Services::CampaignService::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + default_config = Client::Configuration.new + + default_config.timeout = 14_400.0 + default_config.retry_policy = { + initial_delay: 5.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the CampaignService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Ads::GoogleAds::V25::Services::CampaignService::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @campaign_service_stub.universe_domain + end + + ## + # Create a new CampaignService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Ads::GoogleAds::V25::Services::CampaignService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Ads::GoogleAds::V25::Services::CampaignService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the CampaignService client. + # @yieldparam config [Client::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/ads/google_ads/v25/services/campaign_service_services_pb" + + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @campaign_service_stub = ::Gapic::ServiceStub.new( + ::Google::Ads::GoogleAds::V25::Services::CampaignService::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool, + logger: @config.logger + ) + + @campaign_service_stub.stub_logger&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @campaign_service_stub.logger + end + + # Service calls + + ## + # Creates, updates, or removes campaigns. Operation statuses are returned. + # + # List of thrown errors: + # [AdxError]() + # [AuthenticationError]() + # [AuthorizationError]() + # [BiddingError]() + # [BiddingStrategyError]() + # [CampaignBudgetError]() + # [CampaignError]() + # [ContextError]() + # [DatabaseError]() + # [DateError]() + # [DateRangeError]() + # [DistinctError]() + # [FieldError]() + # [FieldMaskError]() + # [HeaderError]() + # [IdError]() + # [InternalError]() + # [ListOperationError]() + # [MutateError]() + # [NewResourceCreationError]() + # [NotAllowlistedError]() + # [NotEmptyError]() + # [NullError]() + # [OperationAccessDeniedError]() + # [OperatorError]() + # [QuotaError]() + # [RangeError]() + # [RegionCodeError]() + # [RequestError]() + # [ResourceCountLimitExceededError]() + # [SettingError]() + # [SizeLimitError]() + # [StringFormatError]() + # [StringLengthError]() + # [UrlFieldError]() + # + # @overload mutate_campaigns(request, options = nil) + # Pass arguments to `mutate_campaigns` via a request object, either of type + # {::Google::Ads::GoogleAds::V25::Services::MutateCampaignsRequest} or an equivalent Hash. + # + # @param request [::Google::Ads::GoogleAds::V25::Services::MutateCampaignsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload mutate_campaigns(customer_id: nil, operations: nil, partial_failure: nil, validate_only: nil, response_content_type: nil) + # Pass arguments to `mutate_campaigns` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param customer_id [::String] + # Required. The ID of the customer whose campaigns are being modified. + # @param operations [::Array<::Google::Ads::GoogleAds::V25::Services::CampaignOperation, ::Hash>] + # Required. The list of operations to perform on individual campaigns. + # @param partial_failure [::Boolean] + # 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. + # @param validate_only [::Boolean] + # If true, the request is validated but not executed. Only errors are + # returned, not results. + # @param response_content_type [::Google::Ads::GoogleAds::V25::Enums::ResponseContentTypeEnum::ResponseContentType] + # The response content type setting. Determines whether the mutable resource + # or just the resource name should be returned post mutation. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Ads::GoogleAds::V25::Services::MutateCampaignsResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Ads::GoogleAds::V25::Services::MutateCampaignsResponse] + # + # @raise [Google::Ads::GoogleAds::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/ads/google_ads/v25/services" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Ads::GoogleAds::V25::Services::CampaignService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Ads::GoogleAds::V25::Services::MutateCampaignsRequest.new + # + # # Call the mutate_campaigns method. + # result = client.mutate_campaigns request + # + # # The returned object is of type Google::Ads::GoogleAds::V25::Services::MutateCampaignsResponse. + # p result + # + def mutate_campaigns request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::GoogleAds::V25::Services::MutateCampaignsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.mutate_campaigns.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Ads::GoogleAds::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.customer_id + header_params["customer_id"] = request.customer_id + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.mutate_campaigns.timeout, + metadata: metadata, + retry_policy: @config.rpcs.mutate_campaigns.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @campaign_service_stub.call_rpc :mutate_campaigns, request, options: options do |response, operation| + yield response, operation if block_given? + end + # rescue GRPC::BadStatus => grpc_error + # raise Google::Ads::GoogleAds::Error.new grpc_error.message + end + + ## + # Enables Brand Guidelines for Performance Max campaigns. + # + # List of thrown errors: + # [AuthenticationError]() + # [AssetError]() + # [AssetLinkError]() + # [AuthorizationError]() + # [BrandGuidelinesMigrationError]() + # [CampaignError]() + # [HeaderError]() + # [InternalError]() + # [MutateError]() + # [QuotaError]() + # [RequestError]() + # [ResourceCountLimitExceededError]() + # + # @overload enable_p_max_brand_guidelines(request, options = nil) + # Pass arguments to `enable_p_max_brand_guidelines` via a request object, either of type + # {::Google::Ads::GoogleAds::V25::Services::EnablePMaxBrandGuidelinesRequest} or an equivalent Hash. + # + # @param request [::Google::Ads::GoogleAds::V25::Services::EnablePMaxBrandGuidelinesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload enable_p_max_brand_guidelines(customer_id: nil, operations: nil) + # Pass arguments to `enable_p_max_brand_guidelines` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param customer_id [::String] + # Required. The ID of the customer whose campaigns are being enabled. + # @param operations [::Array<::Google::Ads::GoogleAds::V25::Services::EnableOperation, ::Hash>] + # Required. The list of individual campaign operations. A maximum of 10 + # enable operations can be executed in a request. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Ads::GoogleAds::V25::Services::EnablePMaxBrandGuidelinesResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Ads::GoogleAds::V25::Services::EnablePMaxBrandGuidelinesResponse] + # + # @raise [Google::Ads::GoogleAds::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/ads/google_ads/v25/services" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Ads::GoogleAds::V25::Services::CampaignService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Ads::GoogleAds::V25::Services::EnablePMaxBrandGuidelinesRequest.new + # + # # Call the enable_p_max_brand_guidelines method. + # result = client.enable_p_max_brand_guidelines request + # + # # The returned object is of type Google::Ads::GoogleAds::V25::Services::EnablePMaxBrandGuidelinesResponse. + # p result + # + def enable_p_max_brand_guidelines request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::GoogleAds::V25::Services::EnablePMaxBrandGuidelinesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.enable_p_max_brand_guidelines.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Ads::GoogleAds::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.customer_id + header_params["customer_id"] = request.customer_id + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.enable_p_max_brand_guidelines.timeout, + metadata: metadata, + retry_policy: @config.rpcs.enable_p_max_brand_guidelines.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @campaign_service_stub.call_rpc :enable_p_max_brand_guidelines, request, + options: options do |response, operation| + yield response, operation if block_given? + end + # rescue GRPC::BadStatus => grpc_error + # raise Google::Ads::GoogleAds::Error.new grpc_error.message + end + + ## + # Configuration class for the CampaignService API. + # + # This class represents the configuration for CampaignService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Ads::GoogleAds::V25::Services::CampaignService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # mutate_campaigns to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Ads::GoogleAds::V25::Services::CampaignService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.mutate_campaigns.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Ads::GoogleAds::V25::Services::CampaignService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.mutate_campaigns.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Ads::GoogleAds::V25::Services::CampaignService::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "googleads.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, + ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the CampaignService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `mutate_campaigns` + # @return [::Gapic::Config::Method] + # + attr_reader :mutate_campaigns + ## + # RPC-specific configuration for `enable_p_max_brand_guidelines` + # @return [::Gapic::Config::Method] + # + attr_reader :enable_p_max_brand_guidelines + + # @private + def initialize parent_rpcs = nil + mutate_campaigns_config = parent_rpcs.mutate_campaigns if parent_rpcs.respond_to? :mutate_campaigns + @mutate_campaigns = ::Gapic::Config::Method.new mutate_campaigns_config + enable_p_max_brand_guidelines_config = parent_rpcs.enable_p_max_brand_guidelines if parent_rpcs.respond_to? :enable_p_max_brand_guidelines + @enable_p_max_brand_guidelines = ::Gapic::Config::Method.new enable_p_max_brand_guidelines_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/campaign_service/credentials.rb b/lib/google/ads/google_ads/v25/services/campaign_service/credentials.rb new file mode 100644 index 000000000..4f01179b4 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/campaign_service/credentials.rb @@ -0,0 +1,38 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Ads + module GoogleAds + module V25 + module Services + module CampaignService + # Credentials for the CampaignService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/adwords" + ] + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/campaign_service/paths.rb b/lib/google/ads/google_ads/v25/services/campaign_service/paths.rb new file mode 100644 index 000000000..82b0fe4c7 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/campaign_service/paths.rb @@ -0,0 +1,173 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Ads + module GoogleAds + module V25 + module Services + module CampaignService + # Path helper methods for the CampaignService API. + module Paths + ## + # Create a fully-qualified AccessibleBiddingStrategy resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/accessibleBiddingStrategies/{bidding_strategy_id}` + # + # @param customer_id [String] + # @param bidding_strategy_id [String] + # + # @return [::String] + def accessible_bidding_strategy_path customer_id:, bidding_strategy_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/accessibleBiddingStrategies/#{bidding_strategy_id}" + end + + ## + # Create a fully-qualified AssetSet resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/assetSets/{asset_set_id}` + # + # @param customer_id [String] + # @param asset_set_id [String] + # + # @return [::String] + def asset_set_path customer_id:, asset_set_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/assetSets/#{asset_set_id}" + end + + ## + # Create a fully-qualified BiddingStrategy resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/biddingStrategies/{bidding_strategy_id}` + # + # @param customer_id [String] + # @param bidding_strategy_id [String] + # + # @return [::String] + def bidding_strategy_path customer_id:, bidding_strategy_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/biddingStrategies/#{bidding_strategy_id}" + end + + ## + # Create a fully-qualified Campaign resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/campaigns/{campaign_id}` + # + # @param customer_id [String] + # @param campaign_id [String] + # + # @return [::String] + def campaign_path customer_id:, campaign_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/campaigns/#{campaign_id}" + end + + ## + # Create a fully-qualified CampaignBudget resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/campaignBudgets/{campaign_budget_id}` + # + # @param customer_id [String] + # @param campaign_budget_id [String] + # + # @return [::String] + def campaign_budget_path customer_id:, campaign_budget_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/campaignBudgets/#{campaign_budget_id}" + end + + ## + # Create a fully-qualified CampaignGroup resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/campaignGroups/{campaign_group_id}` + # + # @param customer_id [String] + # @param campaign_group_id [String] + # + # @return [::String] + def campaign_group_path customer_id:, campaign_group_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/campaignGroups/#{campaign_group_id}" + end + + ## + # Create a fully-qualified CampaignLabel resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/campaignLabels/{campaign_id}~{label_id}` + # + # @param customer_id [String] + # @param campaign_id [String] + # @param label_id [String] + # + # @return [::String] + def campaign_label_path customer_id:, campaign_id:, label_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + raise ::ArgumentError, "campaign_id cannot contain /" if campaign_id.to_s.include? "/" + + "customers/#{customer_id}/campaignLabels/#{campaign_id}~#{label_id}" + end + + ## + # Create a fully-qualified ConversionAction resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/conversionActions/{conversion_action_id}` + # + # @param customer_id [String] + # @param conversion_action_id [String] + # + # @return [::String] + def conversion_action_path customer_id:, conversion_action_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/conversionActions/#{conversion_action_id}" + end + + extend self + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/campaign_service_pb.rb b/lib/google/ads/google_ads/v25/services/campaign_service_pb.rb new file mode 100644 index 000000000..14cd6cd2e --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/campaign_service_pb.rb @@ -0,0 +1,40 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/services/campaign_service.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/enums/response_content_type_pb' +require 'google/ads/google_ads/v25/resources/campaign_pb' +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/field_mask_pb' +require 'google/rpc/status_pb' + + +descriptor_data = "\n8google/ads/googleads/v25/services/campaign_service.proto\x12!google.ads.googleads.v25.services\x1a:google/ads/googleads/v25/enums/response_content_type.proto\x1a\x31google/ads/googleads/v25/resources/campaign.proto\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\x1a\x17google/rpc/status.proto\"\x9d\x02\n\x16MutateCampaignsRequest\x12\x18\n\x0b\x63ustomer_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12M\n\noperations\x18\x02 \x03(\x0b\x32\x34.google.ads.googleads.v25.services.CampaignOperationB\x03\xe0\x41\x02\x12\x17\n\x0fpartial_failure\x18\x03 \x01(\x08\x12\x15\n\rvalidate_only\x18\x04 \x01(\x08\x12j\n\x15response_content_type\x18\x05 \x01(\x0e\x32K.google.ads.googleads.v25.enums.ResponseContentTypeEnum.ResponseContentType\"\x8b\x02\n\x11\x43\x61mpaignOperation\x12/\n\x0bupdate_mask\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\x12>\n\x06\x63reate\x18\x01 \x01(\x0b\x32,.google.ads.googleads.v25.resources.CampaignH\x00\x12>\n\x06update\x18\x02 \x01(\x0b\x32,.google.ads.googleads.v25.resources.CampaignH\x00\x12\x38\n\x06remove\x18\x03 \x01(\tB&\xfa\x41#\n!googleads.googleapis.com/CampaignH\x00\x42\x0b\n\toperation\"\x96\x01\n\x17MutateCampaignsResponse\x12\x31\n\x15partial_failure_error\x18\x03 \x01(\x0b\x32\x12.google.rpc.Status\x12H\n\x07results\x18\x02 \x03(\x0b\x32\x37.google.ads.googleads.v25.services.MutateCampaignResult\"\x95\x01\n\x14MutateCampaignResult\x12=\n\rresource_name\x18\x01 \x01(\tB&\xfa\x41#\n!googleads.googleapis.com/Campaign\x12>\n\x08\x63\x61mpaign\x18\x02 \x01(\x0b\x32,.google.ads.googleads.v25.resources.Campaign\"\x89\x01\n EnablePMaxBrandGuidelinesRequest\x12\x18\n\x0b\x63ustomer_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12K\n\noperations\x18\x02 \x03(\x0b\x32\x32.google.ads.googleads.v25.services.EnableOperationB\x03\xe0\x41\x02\"\xb7\x02\n\x0f\x45nableOperation\x12;\n\x08\x63\x61mpaign\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!googleads.googleapis.com/Campaign\x12\'\n\x1a\x61uto_populate_brand_assets\x18\x02 \x01(\x08\x42\x03\xe0\x41\x02\x12Q\n\x0c\x62rand_assets\x18\x03 \x01(\x0b\x32\x36.google.ads.googleads.v25.services.BrandCampaignAssetsB\x03\xe0\x41\x01\x12\x1d\n\x10\x66inal_uri_domain\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x17\n\nmain_color\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x19\n\x0c\x61\x63\x63\x65nt_color\x18\x06 \x01(\tB\x03\xe0\x41\x01\x12\x18\n\x0b\x66ont_family\x18\x07 \x01(\tB\x03\xe0\x41\x01\"s\n\x13\x42randCampaignAssets\x12 \n\x13\x62usiness_name_asset\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x17\n\nlogo_asset\x18\x02 \x03(\tB\x03\xe0\x41\x02\x12!\n\x14landscape_logo_asset\x18\x03 \x03(\tB\x03\xe0\x41\x01\"i\n!EnablePMaxBrandGuidelinesResponse\x12\x44\n\x07results\x18\x01 \x03(\x0b\x32\x33.google.ads.googleads.v25.services.EnablementResult\"z\n\x10\x45nablementResult\x12\x38\n\x08\x63\x61mpaign\x18\x01 \x01(\tB&\xfa\x41#\n!googleads.googleapis.com/Campaign\x12,\n\x10\x65nablement_error\x18\x02 \x01(\x0b\x32\x12.google.rpc.Status2\xc9\x04\n\x0f\x43\x61mpaignService\x12\xdd\x01\n\x0fMutateCampaigns\x12\x39.google.ads.googleads.v25.services.MutateCampaignsRequest\x1a:.google.ads.googleads.v25.services.MutateCampaignsResponse\"S\xda\x41\x16\x63ustomer_id,operations\x82\xd3\xe4\x93\x02\x34\"//v25/customers/{customer_id=*}/campaigns:mutate:\x01*\x12\x8e\x02\n\x19\x45nablePMaxBrandGuidelines\x12\x43.google.ads.googleads.v25.services.EnablePMaxBrandGuidelinesRequest\x1a\x44.google.ads.googleads.v25.services.EnablePMaxBrandGuidelinesResponse\"f\xda\x41\x16\x63ustomer_id,operations\x82\xd3\xe4\x93\x02G\"B/v25/customers/{customer_id=*}/campaigns:enablePMaxBrandGuidelines:\x01*\x1a\x45\xca\x41\x18googleads.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/adwordsB\x80\x02\n%com.google.ads.googleads.v25.servicesB\x14\x43\x61mpaignServiceProtoP\x01ZIgoogle.golang.org/genproto/googleapis/ads/googleads/v25/services;services\xa2\x02\x03GAA\xaa\x02!Google.Ads.GoogleAds.V25.Services\xca\x02!Google\\Ads\\GoogleAds\\V25\\Services\xea\x02%Google::Ads::GoogleAds::V25::Servicesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Services + MutateCampaignsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.MutateCampaignsRequest").msgclass + CampaignOperation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.CampaignOperation").msgclass + MutateCampaignsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.MutateCampaignsResponse").msgclass + MutateCampaignResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.MutateCampaignResult").msgclass + EnablePMaxBrandGuidelinesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.EnablePMaxBrandGuidelinesRequest").msgclass + EnableOperation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.EnableOperation").msgclass + BrandCampaignAssets = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.BrandCampaignAssets").msgclass + EnablePMaxBrandGuidelinesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.EnablePMaxBrandGuidelinesResponse").msgclass + EnablementResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.EnablementResult").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/campaign_service_services_pb.rb b/lib/google/ads/google_ads/v25/services/campaign_service_services_pb.rb new file mode 100644 index 000000000..648e45079 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/campaign_service_services_pb.rb @@ -0,0 +1,102 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/ads/googleads/v25/services/campaign_service.proto for package 'Google.Ads.GoogleAds.V25.Services' +# Original file comments: +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +require 'grpc' +require 'google/ads/google_ads/v25/services/campaign_service_pb' + +module Google + module Ads + module GoogleAds + module V25 + module Services + module CampaignService + # Proto file describing the Campaign service. + # + # Service to manage campaigns. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.ads.googleads.v25.services.CampaignService' + + # Creates, updates, or removes campaigns. Operation statuses are returned. + # + # List of thrown errors: + # [AdxError]() + # [AuthenticationError]() + # [AuthorizationError]() + # [BiddingError]() + # [BiddingStrategyError]() + # [CampaignBudgetError]() + # [CampaignError]() + # [ContextError]() + # [DatabaseError]() + # [DateError]() + # [DateRangeError]() + # [DistinctError]() + # [FieldError]() + # [FieldMaskError]() + # [HeaderError]() + # [IdError]() + # [InternalError]() + # [ListOperationError]() + # [MutateError]() + # [NewResourceCreationError]() + # [NotAllowlistedError]() + # [NotEmptyError]() + # [NullError]() + # [OperationAccessDeniedError]() + # [OperatorError]() + # [QuotaError]() + # [RangeError]() + # [RegionCodeError]() + # [RequestError]() + # [ResourceCountLimitExceededError]() + # [SettingError]() + # [SizeLimitError]() + # [StringFormatError]() + # [StringLengthError]() + # [UrlFieldError]() + rpc :MutateCampaigns, ::Google::Ads::GoogleAds::V25::Services::MutateCampaignsRequest, ::Google::Ads::GoogleAds::V25::Services::MutateCampaignsResponse + # Enables Brand Guidelines for Performance Max campaigns. + # + # List of thrown errors: + # [AuthenticationError]() + # [AssetError]() + # [AssetLinkError]() + # [AuthorizationError]() + # [BrandGuidelinesMigrationError]() + # [CampaignError]() + # [HeaderError]() + # [InternalError]() + # [MutateError]() + # [QuotaError]() + # [RequestError]() + # [ResourceCountLimitExceededError]() + rpc :EnablePMaxBrandGuidelines, ::Google::Ads::GoogleAds::V25::Services::EnablePMaxBrandGuidelinesRequest, ::Google::Ads::GoogleAds::V25::Services::EnablePMaxBrandGuidelinesResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/campaign_shared_set_service.rb b/lib/google/ads/google_ads/v25/services/campaign_shared_set_service.rb new file mode 100644 index 000000000..fdc17c2a2 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/campaign_shared_set_service.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/ads/google_ads/version" + +require "google/ads/google_ads/v25/services/campaign_shared_set_service/credentials" +require "google/ads/google_ads/v25/services/campaign_shared_set_service/paths" +require "google/ads/google_ads/v25/services/campaign_shared_set_service/client" + +module Google + module Ads + module GoogleAds + module V25 + module Services + ## + # Service to manage campaign shared sets. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/ads/google_ads/v25/services/campaign_shared_set_service" + # client = ::Google::Ads::GoogleAds::V25::Services::CampaignSharedSetService::Client.new + # + module CampaignSharedSetService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "campaign_shared_set_service", "helpers.rb" +require "google/ads/google_ads/v25/services/campaign_shared_set_service/helpers" if ::File.file? helper_path diff --git a/lib/google/ads/google_ads/v25/services/campaign_shared_set_service/client.rb b/lib/google/ads/google_ads/v25/services/campaign_shared_set_service/client.rb new file mode 100644 index 000000000..aa3bd81d5 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/campaign_shared_set_service/client.rb @@ -0,0 +1,517 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# require "google/ads/google_ads/error" +require "google/ads/google_ads/v25/services/campaign_shared_set_service_pb" + +module Google + module Ads + module GoogleAds + module V25 + module Services + module CampaignSharedSetService + ## + # Client for the CampaignSharedSetService service. + # + # Service to manage campaign shared sets. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "googleads.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :campaign_shared_set_service_stub + + ## + # Configure the CampaignSharedSetService Client class. + # + # See {::Google::Ads::GoogleAds::V25::Services::CampaignSharedSetService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all CampaignSharedSetService clients + # ::Google::Ads::GoogleAds::V25::Services::CampaignSharedSetService::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + default_config = Client::Configuration.new + + default_config.timeout = 14_400.0 + default_config.retry_policy = { + initial_delay: 5.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the CampaignSharedSetService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Ads::GoogleAds::V25::Services::CampaignSharedSetService::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @campaign_shared_set_service_stub.universe_domain + end + + ## + # Create a new CampaignSharedSetService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Ads::GoogleAds::V25::Services::CampaignSharedSetService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Ads::GoogleAds::V25::Services::CampaignSharedSetService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the CampaignSharedSetService client. + # @yieldparam config [Client::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/ads/google_ads/v25/services/campaign_shared_set_service_services_pb" + + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @campaign_shared_set_service_stub = ::Gapic::ServiceStub.new( + ::Google::Ads::GoogleAds::V25::Services::CampaignSharedSetService::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool, + logger: @config.logger + ) + + @campaign_shared_set_service_stub.stub_logger&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @campaign_shared_set_service_stub.logger + end + + # Service calls + + ## + # Creates or removes campaign shared sets. Operation statuses are returned. + # + # List of thrown errors: + # [AuthenticationError]() + # [AuthorizationError]() + # [CampaignSharedSetError]() + # [ContextError]() + # [DatabaseError]() + # [DateError]() + # [DistinctError]() + # [FieldError]() + # [HeaderError]() + # [IdError]() + # [InternalError]() + # [MutateError]() + # [NewResourceCreationError]() + # [NotEmptyError]() + # [NullError]() + # [OperatorError]() + # [QuotaError]() + # [RangeError]() + # [RequestError]() + # [SizeLimitError]() + # [StringFormatError]() + # [StringLengthError]() + # + # @overload mutate_campaign_shared_sets(request, options = nil) + # Pass arguments to `mutate_campaign_shared_sets` via a request object, either of type + # {::Google::Ads::GoogleAds::V25::Services::MutateCampaignSharedSetsRequest} or an equivalent Hash. + # + # @param request [::Google::Ads::GoogleAds::V25::Services::MutateCampaignSharedSetsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload mutate_campaign_shared_sets(customer_id: nil, operations: nil, partial_failure: nil, validate_only: nil, response_content_type: nil) + # Pass arguments to `mutate_campaign_shared_sets` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param customer_id [::String] + # Required. The ID of the customer whose campaign shared sets are being + # modified. + # @param operations [::Array<::Google::Ads::GoogleAds::V25::Services::CampaignSharedSetOperation, ::Hash>] + # Required. The list of operations to perform on individual campaign shared + # sets. + # @param partial_failure [::Boolean] + # 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. + # @param validate_only [::Boolean] + # If true, the request is validated but not executed. Only errors are + # returned, not results. + # @param response_content_type [::Google::Ads::GoogleAds::V25::Enums::ResponseContentTypeEnum::ResponseContentType] + # The response content type setting. Determines whether the mutable resource + # or just the resource name should be returned post mutation. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Ads::GoogleAds::V25::Services::MutateCampaignSharedSetsResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Ads::GoogleAds::V25::Services::MutateCampaignSharedSetsResponse] + # + # @raise [Google::Ads::GoogleAds::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/ads/google_ads/v25/services" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Ads::GoogleAds::V25::Services::CampaignSharedSetService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Ads::GoogleAds::V25::Services::MutateCampaignSharedSetsRequest.new + # + # # Call the mutate_campaign_shared_sets method. + # result = client.mutate_campaign_shared_sets request + # + # # The returned object is of type Google::Ads::GoogleAds::V25::Services::MutateCampaignSharedSetsResponse. + # p result + # + def mutate_campaign_shared_sets request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::GoogleAds::V25::Services::MutateCampaignSharedSetsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.mutate_campaign_shared_sets.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Ads::GoogleAds::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.customer_id + header_params["customer_id"] = request.customer_id + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.mutate_campaign_shared_sets.timeout, + metadata: metadata, + retry_policy: @config.rpcs.mutate_campaign_shared_sets.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @campaign_shared_set_service_stub.call_rpc :mutate_campaign_shared_sets, request, + options: options do |response, operation| + yield response, operation if block_given? + end + # rescue GRPC::BadStatus => grpc_error + # raise Google::Ads::GoogleAds::Error.new grpc_error.message + end + + ## + # Configuration class for the CampaignSharedSetService API. + # + # This class represents the configuration for CampaignSharedSetService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Ads::GoogleAds::V25::Services::CampaignSharedSetService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # mutate_campaign_shared_sets to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Ads::GoogleAds::V25::Services::CampaignSharedSetService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.mutate_campaign_shared_sets.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Ads::GoogleAds::V25::Services::CampaignSharedSetService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.mutate_campaign_shared_sets.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Ads::GoogleAds::V25::Services::CampaignSharedSetService::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "googleads.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, + ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the CampaignSharedSetService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `mutate_campaign_shared_sets` + # @return [::Gapic::Config::Method] + # + attr_reader :mutate_campaign_shared_sets + + # @private + def initialize parent_rpcs = nil + mutate_campaign_shared_sets_config = parent_rpcs.mutate_campaign_shared_sets if parent_rpcs.respond_to? :mutate_campaign_shared_sets + @mutate_campaign_shared_sets = ::Gapic::Config::Method.new mutate_campaign_shared_sets_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/campaign_shared_set_service/credentials.rb b/lib/google/ads/google_ads/v25/services/campaign_shared_set_service/credentials.rb new file mode 100644 index 000000000..10c880e92 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/campaign_shared_set_service/credentials.rb @@ -0,0 +1,38 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Ads + module GoogleAds + module V25 + module Services + module CampaignSharedSetService + # Credentials for the CampaignSharedSetService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/adwords" + ] + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/campaign_shared_set_service/paths.rb b/lib/google/ads/google_ads/v25/services/campaign_shared_set_service/paths.rb new file mode 100644 index 000000000..09108552a --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/campaign_shared_set_service/paths.rb @@ -0,0 +1,88 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Ads + module GoogleAds + module V25 + module Services + module CampaignSharedSetService + # Path helper methods for the CampaignSharedSetService API. + module Paths + ## + # Create a fully-qualified Campaign resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/campaigns/{campaign_id}` + # + # @param customer_id [String] + # @param campaign_id [String] + # + # @return [::String] + def campaign_path customer_id:, campaign_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/campaigns/#{campaign_id}" + end + + ## + # Create a fully-qualified CampaignSharedSet resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/campaignSharedSets/{campaign_id}~{shared_set_id}` + # + # @param customer_id [String] + # @param campaign_id [String] + # @param shared_set_id [String] + # + # @return [::String] + def campaign_shared_set_path customer_id:, campaign_id:, shared_set_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + raise ::ArgumentError, "campaign_id cannot contain /" if campaign_id.to_s.include? "/" + + "customers/#{customer_id}/campaignSharedSets/#{campaign_id}~#{shared_set_id}" + end + + ## + # Create a fully-qualified SharedSet resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/sharedSets/{shared_set_id}` + # + # @param customer_id [String] + # @param shared_set_id [String] + # + # @return [::String] + def shared_set_path customer_id:, shared_set_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/sharedSets/#{shared_set_id}" + end + + extend self + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/campaign_shared_set_service_pb.rb b/lib/google/ads/google_ads/v25/services/campaign_shared_set_service_pb.rb new file mode 100644 index 000000000..6a26bb9cb --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/campaign_shared_set_service_pb.rb @@ -0,0 +1,34 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/services/campaign_shared_set_service.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/enums/response_content_type_pb' +require 'google/ads/google_ads/v25/resources/campaign_shared_set_pb' +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/rpc/status_pb' + + +descriptor_data = "\nCgoogle/ads/googleads/v25/services/campaign_shared_set_service.proto\x12!google.ads.googleads.v25.services\x1a:google/ads/googleads/v25/enums/response_content_type.proto\x1a] + # Required. The countries to search that apply to the criteria. + # @param sub_country_locations [::Array<::Google::Ads::GoogleAds::V25::Common::LocationInfo, ::Hash>] + # The sub-country geographic locations to search that apply to the criteria. + # Only supported for + # {::Google::Ads::GoogleAds::V25::Services::GenerateCreatorInsightsRequest::SearchAttributes SearchAttributes} + # criteria. + # @param supplemental_data [::Array<::Google::Ads::GoogleAds::V25::Enums::ContentCreatorInsightsSupplementalDataEnum::ContentCreatorInsightsSupplementalData>] + # Optional. Optional features to include in the response. By default, only + # core insight data is returned. Including supplemental data here will + # populate additional fields in the response. + # @param search_attributes [::Google::Ads::GoogleAds::V25::Services::GenerateCreatorInsightsRequest::SearchAttributes, ::Hash] + # The attributes used to identify top creators. Data fetched is based on + # the list of countries or sub-country locations specified in + # {::Google::Ads::GoogleAds::V25::Services::GenerateCreatorInsightsRequest#country_locations country_locations} + # or + # {::Google::Ads::GoogleAds::V25::Services::GenerateCreatorInsightsRequest#sub_country_locations sub_country_locations}. + # + # Note: The following parameters are mutually exclusive: `search_attributes`, `search_channels`, `search_topics`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. + # @param search_channels [::Google::Ads::GoogleAds::V25::Services::GenerateCreatorInsightsRequest::YouTubeChannels, ::Hash] + # YouTube Channel IDs for Creator Insights. Data fetched for channels is + # based on the list of countries specified in + # {::Google::Ads::GoogleAds::V25::Services::GenerateCreatorInsightsRequest#country_locations country_locations}. + # + # Note: The following parameters are mutually exclusive: `search_channels`, `search_attributes`, `search_topics`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. + # @param search_topics [::Google::Ads::GoogleAds::V25::Services::SearchTopics, ::Hash] + # Search for relevant creators who make content about the specified topics. + # Data fetched is based on the country specified in + # {::Google::Ads::GoogleAds::V25::Services::GenerateCreatorInsightsRequest#country_locations country_locations}. + # Note: This option allows searching for one country only. + # + # Note: The following parameters are mutually exclusive: `search_topics`, `search_attributes`, `search_channels`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Ads::GoogleAds::V25::Services::GenerateCreatorInsightsResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Ads::GoogleAds::V25::Services::GenerateCreatorInsightsResponse] + # + # @raise [Google::Ads::GoogleAds::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/ads/google_ads/v25/services" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Ads::GoogleAds::V25::Services::ContentCreatorInsightsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Ads::GoogleAds::V25::Services::GenerateCreatorInsightsRequest.new + # + # # Call the generate_creator_insights method. + # result = client.generate_creator_insights request + # + # # The returned object is of type Google::Ads::GoogleAds::V25::Services::GenerateCreatorInsightsResponse. + # p result + # + def generate_creator_insights request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::GoogleAds::V25::Services::GenerateCreatorInsightsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.generate_creator_insights.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Ads::GoogleAds::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.customer_id + header_params["customer_id"] = request.customer_id + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.generate_creator_insights.timeout, + metadata: metadata, + retry_policy: @config.rpcs.generate_creator_insights.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @content_creator_insights_service_stub.call_rpc :generate_creator_insights, request, + options: options do |response, operation| + yield response, operation if block_given? + end + # rescue GRPC::BadStatus => grpc_error + # raise Google::Ads::GoogleAds::Error.new grpc_error.message + end + + ## + # Returns insights for trending content on YouTube. + # + # List of thrown errors: + # [AuthenticationError]() + # [AuthorizationError]() + # [FieldError]() + # [HeaderError]() + # [InternalError]() + # [QuotaError]() + # [RangeError]() + # [RequestError]() + # + # @overload generate_trending_insights(request, options = nil) + # Pass arguments to `generate_trending_insights` via a request object, either of type + # {::Google::Ads::GoogleAds::V25::Services::GenerateTrendingInsightsRequest} or an equivalent Hash. + # + # @param request [::Google::Ads::GoogleAds::V25::Services::GenerateTrendingInsightsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload generate_trending_insights(customer_id: nil, customer_insights_group: nil, insights_application_info: nil, country_location: nil, sub_country_locations: nil, supplemental_data: nil, search_audience: nil, search_topics: nil) + # Pass arguments to `generate_trending_insights` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param customer_id [::String] + # Required. The ID of the customer. + # @param customer_insights_group [::String] + # Required. The name of the customer being planned for. This is a + # user-defined value. + # @param insights_application_info [::Google::Ads::GoogleAds::V25::Common::AdditionalApplicationInfo, ::Hash] + # Optional. Additional information on the application issuing the request. + # @param country_location [::Google::Ads::GoogleAds::V25::Common::LocationInfo, ::Hash] + # Required. The country to find trends in. + # @param sub_country_locations [::Array<::Google::Ads::GoogleAds::V25::Common::LocationInfo, ::Hash>] + # Optional. The sub-country geographic locations to search that apply to the + # criteria. Only supported for `search_audience` criteria. + # @param supplemental_data [::Array<::Google::Ads::GoogleAds::V25::Enums::ContentCreatorInsightsSupplementalDataEnum::ContentCreatorInsightsSupplementalData>] + # Optional. Optional features to include in the response. By default, only + # core insight data is returned. Including supplemental data here will + # populate additional fields in the response. + # @param search_audience [::Google::Ads::GoogleAds::V25::Services::SearchAudience, ::Hash] + # An audience to search for trending content in. Data fetched is based on + # the country or sub-country locations specified in + # {::Google::Ads::GoogleAds::V25::Services::GenerateTrendingInsightsRequest#country_location country_location} + # or + # {::Google::Ads::GoogleAds::V25::Services::GenerateTrendingInsightsRequest#sub_country_locations sub_country_locations}. + # + # Note: The following parameters are mutually exclusive: `search_audience`, `search_topics`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. + # @param search_topics [::Google::Ads::GoogleAds::V25::Services::SearchTopics, ::Hash] + # Content topics to return trend information for. + # + # Note: The following parameters are mutually exclusive: `search_topics`, `search_audience`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Ads::GoogleAds::V25::Services::GenerateTrendingInsightsResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Ads::GoogleAds::V25::Services::GenerateTrendingInsightsResponse] + # + # @raise [Google::Ads::GoogleAds::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/ads/google_ads/v25/services" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Ads::GoogleAds::V25::Services::ContentCreatorInsightsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Ads::GoogleAds::V25::Services::GenerateTrendingInsightsRequest.new + # + # # Call the generate_trending_insights method. + # result = client.generate_trending_insights request + # + # # The returned object is of type Google::Ads::GoogleAds::V25::Services::GenerateTrendingInsightsResponse. + # p result + # + def generate_trending_insights request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::GoogleAds::V25::Services::GenerateTrendingInsightsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.generate_trending_insights.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Ads::GoogleAds::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.customer_id + header_params["customer_id"] = request.customer_id + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.generate_trending_insights.timeout, + metadata: metadata, + retry_policy: @config.rpcs.generate_trending_insights.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @content_creator_insights_service_stub.call_rpc :generate_trending_insights, request, + options: options do |response, operation| + yield response, operation if block_given? + end + # rescue GRPC::BadStatus => grpc_error + # raise Google::Ads::GoogleAds::Error.new grpc_error.message + end + + ## + # Configuration class for the ContentCreatorInsightsService API. + # + # This class represents the configuration for ContentCreatorInsightsService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Ads::GoogleAds::V25::Services::ContentCreatorInsightsService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # generate_creator_insights to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Ads::GoogleAds::V25::Services::ContentCreatorInsightsService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.generate_creator_insights.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Ads::GoogleAds::V25::Services::ContentCreatorInsightsService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.generate_creator_insights.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Ads::GoogleAds::V25::Services::ContentCreatorInsightsService::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "googleads.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, + ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the ContentCreatorInsightsService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `generate_creator_insights` + # @return [::Gapic::Config::Method] + # + attr_reader :generate_creator_insights + ## + # RPC-specific configuration for `generate_trending_insights` + # @return [::Gapic::Config::Method] + # + attr_reader :generate_trending_insights + + # @private + def initialize parent_rpcs = nil + generate_creator_insights_config = parent_rpcs.generate_creator_insights if parent_rpcs.respond_to? :generate_creator_insights + @generate_creator_insights = ::Gapic::Config::Method.new generate_creator_insights_config + generate_trending_insights_config = parent_rpcs.generate_trending_insights if parent_rpcs.respond_to? :generate_trending_insights + @generate_trending_insights = ::Gapic::Config::Method.new generate_trending_insights_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/content_creator_insights_service/credentials.rb b/lib/google/ads/google_ads/v25/services/content_creator_insights_service/credentials.rb new file mode 100644 index 000000000..74e55bc02 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/content_creator_insights_service/credentials.rb @@ -0,0 +1,38 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Ads + module GoogleAds + module V25 + module Services + module ContentCreatorInsightsService + # Credentials for the ContentCreatorInsightsService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/adwords" + ] + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/content_creator_insights_service_pb.rb b/lib/google/ads/google_ads/v25/services/content_creator_insights_service_pb.rb new file mode 100644 index 000000000..8884b591c --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/content_creator_insights_service_pb.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/services/content_creator_insights_service.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/common/additional_application_info_pb' +require 'google/ads/google_ads/v25/common/audience_insights_attribute_pb' +require 'google/ads/google_ads/v25/common/criteria_pb' +require 'google/ads/google_ads/v25/enums/content_creator_insights_supplemental_data_pb' +require 'google/ads/google_ads/v25/enums/insights_trend_pb' +require 'google/ads/google_ads/v25/enums/partnership_opportunity_pb' +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' + + +descriptor_data = "\nHgoogle/ads/googleads/v25/services/content_creator_insights_service.proto\x12!google.ads.googleads.v25.services\x1a\x41google/ads/googleads/v25/common/additional_application_info.proto\x1a\x41google/ads/googleads/v25/common/audience_insights_attribute.proto\x1a.google/ads/googleads/v25/common/criteria.proto\x1aOgoogle/ads/googleads/v25/enums/content_creator_insights_supplemental_data.proto\x1a\x33google/ads/googleads/v25/enums/insights_trend.proto\x1a] + # Required. The list of operations to perform on individual conversion + # actions. + # @param partial_failure [::Boolean] + # 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. + # @param validate_only [::Boolean] + # If true, the request is validated but not executed. Only errors are + # returned, not results. + # @param response_content_type [::Google::Ads::GoogleAds::V25::Enums::ResponseContentTypeEnum::ResponseContentType] + # The response content type setting. Determines whether the mutable resource + # or just the resource name should be returned post mutation. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Ads::GoogleAds::V25::Services::MutateConversionActionsResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Ads::GoogleAds::V25::Services::MutateConversionActionsResponse] + # + # @raise [Google::Ads::GoogleAds::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/ads/google_ads/v25/services" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Ads::GoogleAds::V25::Services::ConversionActionService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Ads::GoogleAds::V25::Services::MutateConversionActionsRequest.new + # + # # Call the mutate_conversion_actions method. + # result = client.mutate_conversion_actions request + # + # # The returned object is of type Google::Ads::GoogleAds::V25::Services::MutateConversionActionsResponse. + # p result + # + def mutate_conversion_actions request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::GoogleAds::V25::Services::MutateConversionActionsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.mutate_conversion_actions.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Ads::GoogleAds::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.customer_id + header_params["customer_id"] = request.customer_id + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.mutate_conversion_actions.timeout, + metadata: metadata, + retry_policy: @config.rpcs.mutate_conversion_actions.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @conversion_action_service_stub.call_rpc :mutate_conversion_actions, request, + options: options do |response, operation| + yield response, operation if block_given? + end + # rescue GRPC::BadStatus => grpc_error + # raise Google::Ads::GoogleAds::Error.new grpc_error.message + end + + ## + # Configuration class for the ConversionActionService API. + # + # This class represents the configuration for ConversionActionService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Ads::GoogleAds::V25::Services::ConversionActionService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # mutate_conversion_actions to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Ads::GoogleAds::V25::Services::ConversionActionService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.mutate_conversion_actions.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Ads::GoogleAds::V25::Services::ConversionActionService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.mutate_conversion_actions.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Ads::GoogleAds::V25::Services::ConversionActionService::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "googleads.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, + ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the ConversionActionService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `mutate_conversion_actions` + # @return [::Gapic::Config::Method] + # + attr_reader :mutate_conversion_actions + + # @private + def initialize parent_rpcs = nil + mutate_conversion_actions_config = parent_rpcs.mutate_conversion_actions if parent_rpcs.respond_to? :mutate_conversion_actions + @mutate_conversion_actions = ::Gapic::Config::Method.new mutate_conversion_actions_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/conversion_action_service/credentials.rb b/lib/google/ads/google_ads/v25/services/conversion_action_service/credentials.rb new file mode 100644 index 000000000..fab50e486 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/conversion_action_service/credentials.rb @@ -0,0 +1,38 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Ads + module GoogleAds + module V25 + module Services + module ConversionActionService + # Credentials for the ConversionActionService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/adwords" + ] + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/conversion_action_service/paths.rb b/lib/google/ads/google_ads/v25/services/conversion_action_service/paths.rb new file mode 100644 index 000000000..ef37ae0c7 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/conversion_action_service/paths.rb @@ -0,0 +1,66 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Ads + module GoogleAds + module V25 + module Services + module ConversionActionService + # Path helper methods for the ConversionActionService API. + module Paths + ## + # Create a fully-qualified ConversionAction resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/conversionActions/{conversion_action_id}` + # + # @param customer_id [String] + # @param conversion_action_id [String] + # + # @return [::String] + def conversion_action_path customer_id:, conversion_action_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/conversionActions/#{conversion_action_id}" + end + + ## + # Create a fully-qualified Customer resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}` + # + # @param customer_id [String] + # + # @return [::String] + def customer_path customer_id: + "customers/#{customer_id}" + end + + extend self + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/conversion_action_service_pb.rb b/lib/google/ads/google_ads/v25/services/conversion_action_service_pb.rb new file mode 100644 index 000000000..1de2e3550 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/conversion_action_service_pb.rb @@ -0,0 +1,35 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/services/conversion_action_service.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/enums/response_content_type_pb' +require 'google/ads/google_ads/v25/resources/conversion_action_pb' +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/field_mask_pb' +require 'google/rpc/status_pb' + + +descriptor_data = "\nAgoogle/ads/googleads/v25/services/conversion_action_service.proto\x12!google.ads.googleads.v25.services\x1a:google/ads/googleads/v25/enums/response_content_type.proto\x1a:google/ads/googleads/v25/resources/conversion_action.proto\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\x1a\x17google/rpc/status.proto\"\xad\x02\n\x1eMutateConversionActionsRequest\x12\x18\n\x0b\x63ustomer_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12U\n\noperations\x18\x02 \x03(\x0b\x32<.google.ads.googleads.v25.services.ConversionActionOperationB\x03\xe0\x41\x02\x12\x17\n\x0fpartial_failure\x18\x03 \x01(\x08\x12\x15\n\rvalidate_only\x18\x04 \x01(\x08\x12j\n\x15response_content_type\x18\x05 \x01(\x0e\x32K.google.ads.googleads.v25.enums.ResponseContentTypeEnum.ResponseContentType\"\xab\x02\n\x19\x43onversionActionOperation\x12/\n\x0bupdate_mask\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\x12\x46\n\x06\x63reate\x18\x01 \x01(\x0b\x32\x34.google.ads.googleads.v25.resources.ConversionActionH\x00\x12\x46\n\x06update\x18\x02 \x01(\x0b\x32\x34.google.ads.googleads.v25.resources.ConversionActionH\x00\x12@\n\x06remove\x18\x03 \x01(\tB.\xfa\x41+\n)googleads.googleapis.com/ConversionActionH\x00\x42\x0b\n\toperation\"\xa6\x01\n\x1fMutateConversionActionsResponse\x12\x31\n\x15partial_failure_error\x18\x03 \x01(\x0b\x32\x12.google.rpc.Status\x12P\n\x07results\x18\x02 \x03(\x0b\x32?.google.ads.googleads.v25.services.MutateConversionActionResult\"\xb6\x01\n\x1cMutateConversionActionResult\x12\x45\n\rresource_name\x18\x01 \x01(\tB.\xfa\x41+\n)googleads.googleapis.com/ConversionAction\x12O\n\x11\x63onversion_action\x18\x02 \x01(\x0b\x32\x34.google.ads.googleads.v25.resources.ConversionAction2\xe0\x02\n\x17\x43onversionActionService\x12\xfd\x01\n\x17MutateConversionActions\x12\x41.google.ads.googleads.v25.services.MutateConversionActionsRequest\x1a\x42.google.ads.googleads.v25.services.MutateConversionActionsResponse\"[\xda\x41\x16\x63ustomer_id,operations\x82\xd3\xe4\x93\x02<\"7/v25/customers/{customer_id=*}/conversionActions:mutate:\x01*\x1a\x45\xca\x41\x18googleads.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/adwordsB\x88\x02\n%com.google.ads.googleads.v25.servicesB\x1c\x43onversionActionServiceProtoP\x01ZIgoogle.golang.org/genproto/googleapis/ads/googleads/v25/services;services\xa2\x02\x03GAA\xaa\x02!Google.Ads.GoogleAds.V25.Services\xca\x02!Google\\Ads\\GoogleAds\\V25\\Services\xea\x02%Google::Ads::GoogleAds::V25::Servicesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Services + MutateConversionActionsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.MutateConversionActionsRequest").msgclass + ConversionActionOperation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.ConversionActionOperation").msgclass + MutateConversionActionsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.MutateConversionActionsResponse").msgclass + MutateConversionActionResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.MutateConversionActionResult").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/conversion_action_service_services_pb.rb b/lib/google/ads/google_ads/v25/services/conversion_action_service_services_pb.rb new file mode 100644 index 000000000..afa587be7 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/conversion_action_service_services_pb.rb @@ -0,0 +1,68 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/ads/googleads/v25/services/conversion_action_service.proto for package 'Google.Ads.GoogleAds.V25.Services' +# Original file comments: +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +require 'grpc' +require 'google/ads/google_ads/v25/services/conversion_action_service_pb' + +module Google + module Ads + module GoogleAds + module V25 + module Services + module ConversionActionService + # Proto file describing the Conversion Action service. + # + # Service to manage conversion actions. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.ads.googleads.v25.services.ConversionActionService' + + # Creates, updates or removes conversion actions. Operation statuses are + # returned. + # + # List of thrown errors: + # [AuthenticationError]() + # [AuthorizationError]() + # [ConversionActionError]() + # [CurrencyCodeError]() + # [DatabaseError]() + # [FieldError]() + # [FieldMaskError]() + # [HeaderError]() + # [InternalError]() + # [MutateError]() + # [NewResourceCreationError]() + # [QuotaError]() + # [RangeError]() + # [RequestError]() + # [ResourceCountLimitExceededError]() + # [StringLengthError]() + rpc :MutateConversionActions, ::Google::Ads::GoogleAds::V25::Services::MutateConversionActionsRequest, ::Google::Ads::GoogleAds::V25::Services::MutateConversionActionsResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/conversion_adjustment_upload_service.rb b/lib/google/ads/google_ads/v25/services/conversion_adjustment_upload_service.rb new file mode 100644 index 000000000..d381a9803 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/conversion_adjustment_upload_service.rb @@ -0,0 +1,50 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/ads/google_ads/version" + +require "google/ads/google_ads/v25/services/conversion_adjustment_upload_service/credentials" +require "google/ads/google_ads/v25/services/conversion_adjustment_upload_service/client" + +module Google + module Ads + module GoogleAds + module V25 + module Services + ## + # Service to upload conversion adjustments. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/ads/google_ads/v25/services/conversion_adjustment_upload_service" + # client = ::Google::Ads::GoogleAds::V25::Services::ConversionAdjustmentUploadService::Client.new + # + module ConversionAdjustmentUploadService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "conversion_adjustment_upload_service", "helpers.rb" +require "google/ads/google_ads/v25/services/conversion_adjustment_upload_service/helpers" if ::File.file? helper_path diff --git a/lib/google/ads/google_ads/v25/services/conversion_adjustment_upload_service/client.rb b/lib/google/ads/google_ads/v25/services/conversion_adjustment_upload_service/client.rb new file mode 100644 index 000000000..f4c21e7d8 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/conversion_adjustment_upload_service/client.rb @@ -0,0 +1,504 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# require "google/ads/google_ads/error" +require "google/ads/google_ads/v25/services/conversion_adjustment_upload_service_pb" + +module Google + module Ads + module GoogleAds + module V25 + module Services + module ConversionAdjustmentUploadService + ## + # Client for the ConversionAdjustmentUploadService service. + # + # Service to upload conversion adjustments. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "googleads.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :conversion_adjustment_upload_service_stub + + ## + # Configure the ConversionAdjustmentUploadService Client class. + # + # See {::Google::Ads::GoogleAds::V25::Services::ConversionAdjustmentUploadService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all ConversionAdjustmentUploadService clients + # ::Google::Ads::GoogleAds::V25::Services::ConversionAdjustmentUploadService::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + default_config = Client::Configuration.new + + default_config.timeout = 14_400.0 + default_config.retry_policy = { + initial_delay: 5.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the ConversionAdjustmentUploadService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Ads::GoogleAds::V25::Services::ConversionAdjustmentUploadService::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @conversion_adjustment_upload_service_stub.universe_domain + end + + ## + # Create a new ConversionAdjustmentUploadService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Ads::GoogleAds::V25::Services::ConversionAdjustmentUploadService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Ads::GoogleAds::V25::Services::ConversionAdjustmentUploadService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the ConversionAdjustmentUploadService client. + # @yieldparam config [Client::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/ads/google_ads/v25/services/conversion_adjustment_upload_service_services_pb" + + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @conversion_adjustment_upload_service_stub = ::Gapic::ServiceStub.new( + ::Google::Ads::GoogleAds::V25::Services::ConversionAdjustmentUploadService::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool, + logger: @config.logger + ) + + @conversion_adjustment_upload_service_stub.stub_logger&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @conversion_adjustment_upload_service_stub.logger + end + + # Service calls + + ## + # Processes the given conversion adjustments. + # + # List of thrown errors: + # [AuthenticationError]() + # [AuthorizationError]() + # [HeaderError]() + # [InternalError]() + # [PartialFailureError]() + # [QuotaError]() + # [RequestError]() + # + # @overload upload_conversion_adjustments(request, options = nil) + # Pass arguments to `upload_conversion_adjustments` via a request object, either of type + # {::Google::Ads::GoogleAds::V25::Services::UploadConversionAdjustmentsRequest} or an equivalent Hash. + # + # @param request [::Google::Ads::GoogleAds::V25::Services::UploadConversionAdjustmentsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload upload_conversion_adjustments(customer_id: nil, conversion_adjustments: nil, partial_failure: nil, validate_only: nil, job_id: nil) + # Pass arguments to `upload_conversion_adjustments` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param customer_id [::String] + # Required. The ID of the customer performing the upload. + # @param conversion_adjustments [::Array<::Google::Ads::GoogleAds::V25::Services::ConversionAdjustment, ::Hash>] + # Required. The conversion adjustments that are being uploaded. + # @param partial_failure [::Boolean] + # Required. 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. + # See + # https://developers.google.com/google-ads/api/docs/best-practices/partial-failures + # for more information about partial failure. + # @param validate_only [::Boolean] + # If true, the request is validated but not executed. Only errors are + # returned, not results. + # @param job_id [::Integer] + # Optional. Optional input to set job ID. Must be a non-negative number that + # is less than 2^31 if provided. If this field is not provided, the API will + # generate a job ID in the range [2^31, (2^63)-1]. The API will return the + # value for this request in the `job_id` field of the + # `UploadConversionAdjustmentsResponse`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Ads::GoogleAds::V25::Services::UploadConversionAdjustmentsResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Ads::GoogleAds::V25::Services::UploadConversionAdjustmentsResponse] + # + # @raise [Google::Ads::GoogleAds::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/ads/google_ads/v25/services" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Ads::GoogleAds::V25::Services::ConversionAdjustmentUploadService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Ads::GoogleAds::V25::Services::UploadConversionAdjustmentsRequest.new + # + # # Call the upload_conversion_adjustments method. + # result = client.upload_conversion_adjustments request + # + # # The returned object is of type Google::Ads::GoogleAds::V25::Services::UploadConversionAdjustmentsResponse. + # p result + # + def upload_conversion_adjustments request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::GoogleAds::V25::Services::UploadConversionAdjustmentsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.upload_conversion_adjustments.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Ads::GoogleAds::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.customer_id + header_params["customer_id"] = request.customer_id + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.upload_conversion_adjustments.timeout, + metadata: metadata, + retry_policy: @config.rpcs.upload_conversion_adjustments.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @conversion_adjustment_upload_service_stub.call_rpc :upload_conversion_adjustments, request, + options: options do |response, operation| + yield response, operation if block_given? + end + # rescue GRPC::BadStatus => grpc_error + # raise Google::Ads::GoogleAds::Error.new grpc_error.message + end + + ## + # Configuration class for the ConversionAdjustmentUploadService API. + # + # This class represents the configuration for ConversionAdjustmentUploadService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Ads::GoogleAds::V25::Services::ConversionAdjustmentUploadService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # upload_conversion_adjustments to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Ads::GoogleAds::V25::Services::ConversionAdjustmentUploadService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.upload_conversion_adjustments.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Ads::GoogleAds::V25::Services::ConversionAdjustmentUploadService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.upload_conversion_adjustments.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Ads::GoogleAds::V25::Services::ConversionAdjustmentUploadService::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "googleads.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, + ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the ConversionAdjustmentUploadService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `upload_conversion_adjustments` + # @return [::Gapic::Config::Method] + # + attr_reader :upload_conversion_adjustments + + # @private + def initialize parent_rpcs = nil + upload_conversion_adjustments_config = parent_rpcs.upload_conversion_adjustments if parent_rpcs.respond_to? :upload_conversion_adjustments + @upload_conversion_adjustments = ::Gapic::Config::Method.new upload_conversion_adjustments_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/conversion_adjustment_upload_service/credentials.rb b/lib/google/ads/google_ads/v25/services/conversion_adjustment_upload_service/credentials.rb new file mode 100644 index 000000000..648bc285f --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/conversion_adjustment_upload_service/credentials.rb @@ -0,0 +1,38 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Ads + module GoogleAds + module V25 + module Services + module ConversionAdjustmentUploadService + # Credentials for the ConversionAdjustmentUploadService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/adwords" + ] + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/conversion_adjustment_upload_service_pb.rb b/lib/google/ads/google_ads/v25/services/conversion_adjustment_upload_service_pb.rb new file mode 100644 index 000000000..b7d4e742d --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/conversion_adjustment_upload_service_pb.rb @@ -0,0 +1,35 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/services/conversion_adjustment_upload_service.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/common/offline_user_data_pb' +require 'google/ads/google_ads/v25/enums/conversion_adjustment_type_pb' +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/rpc/status_pb' + + +descriptor_data = "\nLgoogle/ads/googleads/v25/services/conversion_adjustment_upload_service.proto\x12!google.ads.googleads.v25.services\x1a\x37google/ads/googleads/v25/common/offline_user_data.proto\x1a?google/ads/googleads/v25/enums/conversion_adjustment_type.proto\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x17google/rpc/status.proto\"\xf6\x01\n\"UploadConversionAdjustmentsRequest\x12\x18\n\x0b\x63ustomer_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\\\n\x16\x63onversion_adjustments\x18\x02 \x03(\x0b\x32\x37.google.ads.googleads.v25.services.ConversionAdjustmentB\x03\xe0\x41\x02\x12\x1c\n\x0fpartial_failure\x18\x03 \x01(\x08\x42\x03\xe0\x41\x02\x12\x15\n\rvalidate_only\x18\x04 \x01(\x08\x12\x18\n\x06job_id\x18\x05 \x01(\x05\x42\x03\xe0\x41\x01H\x00\x88\x01\x01\x42\t\n\x07_job_id\"\xb8\x01\n#UploadConversionAdjustmentsResponse\x12\x31\n\x15partial_failure_error\x18\x01 \x01(\x0b\x32\x12.google.rpc.Status\x12N\n\x07results\x18\x02 \x03(\x0b\x32=.google.ads.googleads.v25.services.ConversionAdjustmentResult\x12\x0e\n\x06job_id\x18\x03 \x01(\x03\"\xb3\x04\n\x14\x43onversionAdjustment\x12R\n\x14gclid_date_time_pair\x18\x0c \x01(\x0b\x32\x34.google.ads.googleads.v25.services.GclidDateTimePair\x12\x15\n\x08order_id\x18\r \x01(\tH\x00\x88\x01\x01\x12\x1e\n\x11\x63onversion_action\x18\x08 \x01(\tH\x01\x88\x01\x01\x12!\n\x14\x61\x64justment_date_time\x18\t \x01(\tH\x02\x88\x01\x01\x12n\n\x0f\x61\x64justment_type\x18\x05 \x01(\x0e\x32U.google.ads.googleads.v25.enums.ConversionAdjustmentTypeEnum.ConversionAdjustmentType\x12N\n\x11restatement_value\x18\x06 \x01(\x0b\x32\x33.google.ads.googleads.v25.services.RestatementValue\x12I\n\x10user_identifiers\x18\n \x03(\x0b\x32/.google.ads.googleads.v25.common.UserIdentifier\x12\x17\n\nuser_agent\x18\x0b \x01(\tH\x03\x88\x01\x01\x42\x0b\n\t_order_idB\x14\n\x12_conversion_actionB\x17\n\x15_adjustment_date_timeB\r\n\x0b_user_agent\"p\n\x10RestatementValue\x12\x1b\n\x0e\x61\x64justed_value\x18\x03 \x01(\x01H\x00\x88\x01\x01\x12\x1a\n\rcurrency_code\x18\x04 \x01(\tH\x01\x88\x01\x01\x42\x11\n\x0f_adjusted_valueB\x10\n\x0e_currency_code\"m\n\x11GclidDateTimePair\x12\x12\n\x05gclid\x18\x03 \x01(\tH\x00\x88\x01\x01\x12!\n\x14\x63onversion_date_time\x18\x04 \x01(\tH\x01\x88\x01\x01\x42\x08\n\x06_gclidB\x17\n\x15_conversion_date_time\"\xe4\x02\n\x1a\x43onversionAdjustmentResult\x12R\n\x14gclid_date_time_pair\x18\t \x01(\x0b\x32\x34.google.ads.googleads.v25.services.GclidDateTimePair\x12\x10\n\x08order_id\x18\n \x01(\t\x12\x1e\n\x11\x63onversion_action\x18\x07 \x01(\tH\x00\x88\x01\x01\x12!\n\x14\x61\x64justment_date_time\x18\x08 \x01(\tH\x01\x88\x01\x01\x12n\n\x0f\x61\x64justment_type\x18\x05 \x01(\x0e\x32U.google.ads.googleads.v25.enums.ConversionAdjustmentTypeEnum.ConversionAdjustmentTypeB\x14\n\x12_conversion_actionB\x17\n\x15_adjustment_date_time2\x95\x03\n!ConversionAdjustmentUploadService\x12\xa8\x02\n\x1bUploadConversionAdjustments\x12\x45.google.ads.googleads.v25.services.UploadConversionAdjustmentsRequest\x1a\x46.google.ads.googleads.v25.services.UploadConversionAdjustmentsResponse\"z\xda\x41\x32\x63ustomer_id,conversion_adjustments,partial_failure\x82\xd3\xe4\x93\x02?\":/v25/customers/{customer_id=*}:uploadConversionAdjustments:\x01*\x1a\x45\xca\x41\x18googleads.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/adwordsB\x92\x02\n%com.google.ads.googleads.v25.servicesB&ConversionAdjustmentUploadServiceProtoP\x01ZIgoogle.golang.org/genproto/googleapis/ads/googleads/v25/services;services\xa2\x02\x03GAA\xaa\x02!Google.Ads.GoogleAds.V25.Services\xca\x02!Google\\Ads\\GoogleAds\\V25\\Services\xea\x02%Google::Ads::GoogleAds::V25::Servicesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Services + UploadConversionAdjustmentsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.UploadConversionAdjustmentsRequest").msgclass + UploadConversionAdjustmentsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.UploadConversionAdjustmentsResponse").msgclass + ConversionAdjustment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.ConversionAdjustment").msgclass + RestatementValue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.RestatementValue").msgclass + GclidDateTimePair = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.GclidDateTimePair").msgclass + ConversionAdjustmentResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.ConversionAdjustmentResult").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/conversion_adjustment_upload_service_services_pb.rb b/lib/google/ads/google_ads/v25/services/conversion_adjustment_upload_service_services_pb.rb new file mode 100644 index 000000000..9a90effcb --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/conversion_adjustment_upload_service_services_pb.rb @@ -0,0 +1,56 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/ads/googleads/v25/services/conversion_adjustment_upload_service.proto for package 'Google.Ads.GoogleAds.V25.Services' +# Original file comments: +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +require 'grpc' +require 'google/ads/google_ads/v25/services/conversion_adjustment_upload_service_pb' + +module Google + module Ads + module GoogleAds + module V25 + module Services + module ConversionAdjustmentUploadService + # Service to upload conversion adjustments. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.ads.googleads.v25.services.ConversionAdjustmentUploadService' + + # Processes the given conversion adjustments. + # + # List of thrown errors: + # [AuthenticationError]() + # [AuthorizationError]() + # [HeaderError]() + # [InternalError]() + # [PartialFailureError]() + # [QuotaError]() + # [RequestError]() + rpc :UploadConversionAdjustments, ::Google::Ads::GoogleAds::V25::Services::UploadConversionAdjustmentsRequest, ::Google::Ads::GoogleAds::V25::Services::UploadConversionAdjustmentsResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/conversion_custom_variable_service.rb b/lib/google/ads/google_ads/v25/services/conversion_custom_variable_service.rb new file mode 100644 index 000000000..6bcc1e27d --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/conversion_custom_variable_service.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/ads/google_ads/version" + +require "google/ads/google_ads/v25/services/conversion_custom_variable_service/credentials" +require "google/ads/google_ads/v25/services/conversion_custom_variable_service/paths" +require "google/ads/google_ads/v25/services/conversion_custom_variable_service/client" + +module Google + module Ads + module GoogleAds + module V25 + module Services + ## + # Service to manage conversion custom variables. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/ads/google_ads/v25/services/conversion_custom_variable_service" + # client = ::Google::Ads::GoogleAds::V25::Services::ConversionCustomVariableService::Client.new + # + module ConversionCustomVariableService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "conversion_custom_variable_service", "helpers.rb" +require "google/ads/google_ads/v25/services/conversion_custom_variable_service/helpers" if ::File.file? helper_path diff --git a/lib/google/ads/google_ads/v25/services/conversion_custom_variable_service/client.rb b/lib/google/ads/google_ads/v25/services/conversion_custom_variable_service/client.rb new file mode 100644 index 000000000..97f8440cf --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/conversion_custom_variable_service/client.rb @@ -0,0 +1,504 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# require "google/ads/google_ads/error" +require "google/ads/google_ads/v25/services/conversion_custom_variable_service_pb" + +module Google + module Ads + module GoogleAds + module V25 + module Services + module ConversionCustomVariableService + ## + # Client for the ConversionCustomVariableService service. + # + # Service to manage conversion custom variables. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "googleads.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :conversion_custom_variable_service_stub + + ## + # Configure the ConversionCustomVariableService Client class. + # + # See {::Google::Ads::GoogleAds::V25::Services::ConversionCustomVariableService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all ConversionCustomVariableService clients + # ::Google::Ads::GoogleAds::V25::Services::ConversionCustomVariableService::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + default_config = Client::Configuration.new + + default_config.timeout = 14_400.0 + default_config.retry_policy = { + initial_delay: 5.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the ConversionCustomVariableService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Ads::GoogleAds::V25::Services::ConversionCustomVariableService::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @conversion_custom_variable_service_stub.universe_domain + end + + ## + # Create a new ConversionCustomVariableService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Ads::GoogleAds::V25::Services::ConversionCustomVariableService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Ads::GoogleAds::V25::Services::ConversionCustomVariableService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the ConversionCustomVariableService client. + # @yieldparam config [Client::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/ads/google_ads/v25/services/conversion_custom_variable_service_services_pb" + + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @conversion_custom_variable_service_stub = ::Gapic::ServiceStub.new( + ::Google::Ads::GoogleAds::V25::Services::ConversionCustomVariableService::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool, + logger: @config.logger + ) + + @conversion_custom_variable_service_stub.stub_logger&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @conversion_custom_variable_service_stub.logger + end + + # Service calls + + ## + # Creates or updates conversion custom variables. Operation statuses are + # returned. + # + # List of thrown errors: + # [AuthenticationError]() + # [AuthorizationError]() + # [ConversionCustomVariableError]() + # [DatabaseError]() + # [HeaderError]() + # [InternalError]() + # [QuotaError]() + # [RequestError]() + # + # @overload mutate_conversion_custom_variables(request, options = nil) + # Pass arguments to `mutate_conversion_custom_variables` via a request object, either of type + # {::Google::Ads::GoogleAds::V25::Services::MutateConversionCustomVariablesRequest} or an equivalent Hash. + # + # @param request [::Google::Ads::GoogleAds::V25::Services::MutateConversionCustomVariablesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload mutate_conversion_custom_variables(customer_id: nil, operations: nil, partial_failure: nil, validate_only: nil, response_content_type: nil) + # Pass arguments to `mutate_conversion_custom_variables` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param customer_id [::String] + # Required. The ID of the customer whose conversion custom variables are + # being modified. + # @param operations [::Array<::Google::Ads::GoogleAds::V25::Services::ConversionCustomVariableOperation, ::Hash>] + # Required. The list of operations to perform on individual conversion custom + # variables. + # @param partial_failure [::Boolean] + # 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. + # @param validate_only [::Boolean] + # If true, the request is validated but not executed. Only errors are + # returned, not results. + # @param response_content_type [::Google::Ads::GoogleAds::V25::Enums::ResponseContentTypeEnum::ResponseContentType] + # The response content type setting. Determines whether the mutable resource + # or just the resource name should be returned post mutation. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Ads::GoogleAds::V25::Services::MutateConversionCustomVariablesResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Ads::GoogleAds::V25::Services::MutateConversionCustomVariablesResponse] + # + # @raise [Google::Ads::GoogleAds::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/ads/google_ads/v25/services" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Ads::GoogleAds::V25::Services::ConversionCustomVariableService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Ads::GoogleAds::V25::Services::MutateConversionCustomVariablesRequest.new + # + # # Call the mutate_conversion_custom_variables method. + # result = client.mutate_conversion_custom_variables request + # + # # The returned object is of type Google::Ads::GoogleAds::V25::Services::MutateConversionCustomVariablesResponse. + # p result + # + def mutate_conversion_custom_variables request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::GoogleAds::V25::Services::MutateConversionCustomVariablesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.mutate_conversion_custom_variables.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Ads::GoogleAds::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.customer_id + header_params["customer_id"] = request.customer_id + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.mutate_conversion_custom_variables.timeout, + metadata: metadata, + retry_policy: @config.rpcs.mutate_conversion_custom_variables.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @conversion_custom_variable_service_stub.call_rpc :mutate_conversion_custom_variables, request, + options: options do |response, operation| + yield response, operation if block_given? + end + # rescue GRPC::BadStatus => grpc_error + # raise Google::Ads::GoogleAds::Error.new grpc_error.message + end + + ## + # Configuration class for the ConversionCustomVariableService API. + # + # This class represents the configuration for ConversionCustomVariableService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Ads::GoogleAds::V25::Services::ConversionCustomVariableService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # mutate_conversion_custom_variables to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Ads::GoogleAds::V25::Services::ConversionCustomVariableService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.mutate_conversion_custom_variables.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Ads::GoogleAds::V25::Services::ConversionCustomVariableService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.mutate_conversion_custom_variables.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Ads::GoogleAds::V25::Services::ConversionCustomVariableService::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "googleads.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, + ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the ConversionCustomVariableService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `mutate_conversion_custom_variables` + # @return [::Gapic::Config::Method] + # + attr_reader :mutate_conversion_custom_variables + + # @private + def initialize parent_rpcs = nil + mutate_conversion_custom_variables_config = parent_rpcs.mutate_conversion_custom_variables if parent_rpcs.respond_to? :mutate_conversion_custom_variables + @mutate_conversion_custom_variables = ::Gapic::Config::Method.new mutate_conversion_custom_variables_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/conversion_custom_variable_service/credentials.rb b/lib/google/ads/google_ads/v25/services/conversion_custom_variable_service/credentials.rb new file mode 100644 index 000000000..9481103c1 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/conversion_custom_variable_service/credentials.rb @@ -0,0 +1,38 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Ads + module GoogleAds + module V25 + module Services + module ConversionCustomVariableService + # Credentials for the ConversionCustomVariableService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/adwords" + ] + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/conversion_custom_variable_service/paths.rb b/lib/google/ads/google_ads/v25/services/conversion_custom_variable_service/paths.rb new file mode 100644 index 000000000..73ce5734e --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/conversion_custom_variable_service/paths.rb @@ -0,0 +1,66 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Ads + module GoogleAds + module V25 + module Services + module ConversionCustomVariableService + # Path helper methods for the ConversionCustomVariableService API. + module Paths + ## + # Create a fully-qualified ConversionCustomVariable resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/conversionCustomVariables/{conversion_custom_variable_id}` + # + # @param customer_id [String] + # @param conversion_custom_variable_id [String] + # + # @return [::String] + def conversion_custom_variable_path customer_id:, conversion_custom_variable_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/conversionCustomVariables/#{conversion_custom_variable_id}" + end + + ## + # Create a fully-qualified Customer resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}` + # + # @param customer_id [String] + # + # @return [::String] + def customer_path customer_id: + "customers/#{customer_id}" + end + + extend self + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/conversion_custom_variable_service_pb.rb b/lib/google/ads/google_ads/v25/services/conversion_custom_variable_service_pb.rb new file mode 100644 index 000000000..a80abe559 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/conversion_custom_variable_service_pb.rb @@ -0,0 +1,35 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/services/conversion_custom_variable_service.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/enums/response_content_type_pb' +require 'google/ads/google_ads/v25/resources/conversion_custom_variable_pb' +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/field_mask_pb' +require 'google/rpc/status_pb' + + +descriptor_data = "\nJgoogle/ads/googleads/v25/services/conversion_custom_variable_service.proto\x12!google.ads.googleads.v25.services\x1a:google/ads/googleads/v25/enums/response_content_type.proto\x1a\x43google/ads/googleads/v25/resources/conversion_custom_variable.proto\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\x1a\x17google/rpc/status.proto\"\xbd\x02\n&MutateConversionCustomVariablesRequest\x12\x18\n\x0b\x63ustomer_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12]\n\noperations\x18\x02 \x03(\x0b\x32\x44.google.ads.googleads.v25.services.ConversionCustomVariableOperationB\x03\xe0\x41\x02\x12\x17\n\x0fpartial_failure\x18\x03 \x01(\x08\x12\x15\n\rvalidate_only\x18\x04 \x01(\x08\x12j\n\x15response_content_type\x18\x05 \x01(\x0e\x32K.google.ads.googleads.v25.enums.ResponseContentTypeEnum.ResponseContentType\"\x81\x02\n!ConversionCustomVariableOperation\x12/\n\x0bupdate_mask\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\x12N\n\x06\x63reate\x18\x01 \x01(\x0b\x32<.google.ads.googleads.v25.resources.ConversionCustomVariableH\x00\x12N\n\x06update\x18\x02 \x01(\x0b\x32<.google.ads.googleads.v25.resources.ConversionCustomVariableH\x00\x42\x0b\n\toperation\"\xb6\x01\n\'MutateConversionCustomVariablesResponse\x12\x31\n\x15partial_failure_error\x18\x01 \x01(\x0b\x32\x12.google.rpc.Status\x12X\n\x07results\x18\x02 \x03(\x0b\x32G.google.ads.googleads.v25.services.MutateConversionCustomVariableResult\"\xd7\x01\n$MutateConversionCustomVariableResult\x12M\n\rresource_name\x18\x01 \x01(\tB6\xfa\x41\x33\n1googleads.googleapis.com/ConversionCustomVariable\x12`\n\x1a\x63onversion_custom_variable\x18\x02 \x01(\x0b\x32<.google.ads.googleads.v25.resources.ConversionCustomVariable2\x88\x03\n\x1f\x43onversionCustomVariableService\x12\x9d\x02\n\x1fMutateConversionCustomVariables\x12I.google.ads.googleads.v25.services.MutateConversionCustomVariablesRequest\x1aJ.google.ads.googleads.v25.services.MutateConversionCustomVariablesResponse\"c\xda\x41\x16\x63ustomer_id,operations\x82\xd3\xe4\x93\x02\x44\"?/v25/customers/{customer_id=*}/conversionCustomVariables:mutate:\x01*\x1a\x45\xca\x41\x18googleads.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/adwordsB\x90\x02\n%com.google.ads.googleads.v25.servicesB$ConversionCustomVariableServiceProtoP\x01ZIgoogle.golang.org/genproto/googleapis/ads/googleads/v25/services;services\xa2\x02\x03GAA\xaa\x02!Google.Ads.GoogleAds.V25.Services\xca\x02!Google\\Ads\\GoogleAds\\V25\\Services\xea\x02%Google::Ads::GoogleAds::V25::Servicesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Services + MutateConversionCustomVariablesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.MutateConversionCustomVariablesRequest").msgclass + ConversionCustomVariableOperation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.ConversionCustomVariableOperation").msgclass + MutateConversionCustomVariablesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.MutateConversionCustomVariablesResponse").msgclass + MutateConversionCustomVariableResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.MutateConversionCustomVariableResult").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/conversion_custom_variable_service_services_pb.rb b/lib/google/ads/google_ads/v25/services/conversion_custom_variable_service_services_pb.rb new file mode 100644 index 000000000..a790a2310 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/conversion_custom_variable_service_services_pb.rb @@ -0,0 +1,60 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/ads/googleads/v25/services/conversion_custom_variable_service.proto for package 'Google.Ads.GoogleAds.V25.Services' +# Original file comments: +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +require 'grpc' +require 'google/ads/google_ads/v25/services/conversion_custom_variable_service_pb' + +module Google + module Ads + module GoogleAds + module V25 + module Services + module ConversionCustomVariableService + # Proto file describing the Conversion Custom Variable service. + # + # Service to manage conversion custom variables. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.ads.googleads.v25.services.ConversionCustomVariableService' + + # Creates or updates conversion custom variables. Operation statuses are + # returned. + # + # List of thrown errors: + # [AuthenticationError]() + # [AuthorizationError]() + # [ConversionCustomVariableError]() + # [DatabaseError]() + # [HeaderError]() + # [InternalError]() + # [QuotaError]() + # [RequestError]() + rpc :MutateConversionCustomVariables, ::Google::Ads::GoogleAds::V25::Services::MutateConversionCustomVariablesRequest, ::Google::Ads::GoogleAds::V25::Services::MutateConversionCustomVariablesResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/conversion_goal_campaign_config_service.rb b/lib/google/ads/google_ads/v25/services/conversion_goal_campaign_config_service.rb new file mode 100644 index 000000000..b85597045 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/conversion_goal_campaign_config_service.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/ads/google_ads/version" + +require "google/ads/google_ads/v25/services/conversion_goal_campaign_config_service/credentials" +require "google/ads/google_ads/v25/services/conversion_goal_campaign_config_service/paths" +require "google/ads/google_ads/v25/services/conversion_goal_campaign_config_service/client" + +module Google + module Ads + module GoogleAds + module V25 + module Services + ## + # Service to manage conversion goal campaign config. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/ads/google_ads/v25/services/conversion_goal_campaign_config_service" + # client = ::Google::Ads::GoogleAds::V25::Services::ConversionGoalCampaignConfigService::Client.new + # + module ConversionGoalCampaignConfigService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "conversion_goal_campaign_config_service", "helpers.rb" +require "google/ads/google_ads/v25/services/conversion_goal_campaign_config_service/helpers" if ::File.file? helper_path diff --git a/lib/google/ads/google_ads/v25/services/conversion_goal_campaign_config_service/client.rb b/lib/google/ads/google_ads/v25/services/conversion_goal_campaign_config_service/client.rb new file mode 100644 index 000000000..091b633db --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/conversion_goal_campaign_config_service/client.rb @@ -0,0 +1,489 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# require "google/ads/google_ads/error" +require "google/ads/google_ads/v25/services/conversion_goal_campaign_config_service_pb" + +module Google + module Ads + module GoogleAds + module V25 + module Services + module ConversionGoalCampaignConfigService + ## + # Client for the ConversionGoalCampaignConfigService service. + # + # Service to manage conversion goal campaign config. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "googleads.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :conversion_goal_campaign_config_service_stub + + ## + # Configure the ConversionGoalCampaignConfigService Client class. + # + # See {::Google::Ads::GoogleAds::V25::Services::ConversionGoalCampaignConfigService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all ConversionGoalCampaignConfigService clients + # ::Google::Ads::GoogleAds::V25::Services::ConversionGoalCampaignConfigService::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + default_config = Client::Configuration.new + + default_config.timeout = 14_400.0 + default_config.retry_policy = { + initial_delay: 5.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the ConversionGoalCampaignConfigService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Ads::GoogleAds::V25::Services::ConversionGoalCampaignConfigService::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @conversion_goal_campaign_config_service_stub.universe_domain + end + + ## + # Create a new ConversionGoalCampaignConfigService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Ads::GoogleAds::V25::Services::ConversionGoalCampaignConfigService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Ads::GoogleAds::V25::Services::ConversionGoalCampaignConfigService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the ConversionGoalCampaignConfigService client. + # @yieldparam config [Client::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/ads/google_ads/v25/services/conversion_goal_campaign_config_service_services_pb" + + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @conversion_goal_campaign_config_service_stub = ::Gapic::ServiceStub.new( + ::Google::Ads::GoogleAds::V25::Services::ConversionGoalCampaignConfigService::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool, + logger: @config.logger + ) + + @conversion_goal_campaign_config_service_stub.stub_logger&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @conversion_goal_campaign_config_service_stub.logger + end + + # Service calls + + ## + # Creates, updates or removes conversion goal campaign config. Operation + # statuses are returned. + # + # @overload mutate_conversion_goal_campaign_configs(request, options = nil) + # Pass arguments to `mutate_conversion_goal_campaign_configs` via a request object, either of type + # {::Google::Ads::GoogleAds::V25::Services::MutateConversionGoalCampaignConfigsRequest} or an equivalent Hash. + # + # @param request [::Google::Ads::GoogleAds::V25::Services::MutateConversionGoalCampaignConfigsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload mutate_conversion_goal_campaign_configs(customer_id: nil, operations: nil, validate_only: nil, response_content_type: nil) + # Pass arguments to `mutate_conversion_goal_campaign_configs` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param customer_id [::String] + # Required. The ID of the customer whose custom conversion goals are being + # modified. + # @param operations [::Array<::Google::Ads::GoogleAds::V25::Services::ConversionGoalCampaignConfigOperation, ::Hash>] + # Required. The list of operations to perform on individual conversion goal + # campaign config. + # @param validate_only [::Boolean] + # If true, the request is validated but not executed. Only errors are + # returned, not results. + # @param response_content_type [::Google::Ads::GoogleAds::V25::Enums::ResponseContentTypeEnum::ResponseContentType] + # The response content type setting. Determines whether the mutable resource + # or just the resource name should be returned post mutation. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Ads::GoogleAds::V25::Services::MutateConversionGoalCampaignConfigsResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Ads::GoogleAds::V25::Services::MutateConversionGoalCampaignConfigsResponse] + # + # @raise [Google::Ads::GoogleAds::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/ads/google_ads/v25/services" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Ads::GoogleAds::V25::Services::ConversionGoalCampaignConfigService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Ads::GoogleAds::V25::Services::MutateConversionGoalCampaignConfigsRequest.new + # + # # Call the mutate_conversion_goal_campaign_configs method. + # result = client.mutate_conversion_goal_campaign_configs request + # + # # The returned object is of type Google::Ads::GoogleAds::V25::Services::MutateConversionGoalCampaignConfigsResponse. + # p result + # + def mutate_conversion_goal_campaign_configs request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::GoogleAds::V25::Services::MutateConversionGoalCampaignConfigsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.mutate_conversion_goal_campaign_configs.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Ads::GoogleAds::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.customer_id + header_params["customer_id"] = request.customer_id + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.mutate_conversion_goal_campaign_configs.timeout, + metadata: metadata, + retry_policy: @config.rpcs.mutate_conversion_goal_campaign_configs.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @conversion_goal_campaign_config_service_stub.call_rpc :mutate_conversion_goal_campaign_configs, + request, options: options do |response, operation| + yield response, operation if block_given? + end + # rescue GRPC::BadStatus => grpc_error + # raise Google::Ads::GoogleAds::Error.new grpc_error.message + end + + ## + # Configuration class for the ConversionGoalCampaignConfigService API. + # + # This class represents the configuration for ConversionGoalCampaignConfigService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Ads::GoogleAds::V25::Services::ConversionGoalCampaignConfigService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # mutate_conversion_goal_campaign_configs to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Ads::GoogleAds::V25::Services::ConversionGoalCampaignConfigService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.mutate_conversion_goal_campaign_configs.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Ads::GoogleAds::V25::Services::ConversionGoalCampaignConfigService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.mutate_conversion_goal_campaign_configs.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Ads::GoogleAds::V25::Services::ConversionGoalCampaignConfigService::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "googleads.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, + ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the ConversionGoalCampaignConfigService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `mutate_conversion_goal_campaign_configs` + # @return [::Gapic::Config::Method] + # + attr_reader :mutate_conversion_goal_campaign_configs + + # @private + def initialize parent_rpcs = nil + mutate_conversion_goal_campaign_configs_config = parent_rpcs.mutate_conversion_goal_campaign_configs if parent_rpcs.respond_to? :mutate_conversion_goal_campaign_configs + @mutate_conversion_goal_campaign_configs = ::Gapic::Config::Method.new mutate_conversion_goal_campaign_configs_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/conversion_goal_campaign_config_service/credentials.rb b/lib/google/ads/google_ads/v25/services/conversion_goal_campaign_config_service/credentials.rb new file mode 100644 index 000000000..523904876 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/conversion_goal_campaign_config_service/credentials.rb @@ -0,0 +1,38 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Ads + module GoogleAds + module V25 + module Services + module ConversionGoalCampaignConfigService + # Credentials for the ConversionGoalCampaignConfigService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/adwords" + ] + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/conversion_goal_campaign_config_service/paths.rb b/lib/google/ads/google_ads/v25/services/conversion_goal_campaign_config_service/paths.rb new file mode 100644 index 000000000..dde692c4b --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/conversion_goal_campaign_config_service/paths.rb @@ -0,0 +1,86 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Ads + module GoogleAds + module V25 + module Services + module ConversionGoalCampaignConfigService + # Path helper methods for the ConversionGoalCampaignConfigService API. + module Paths + ## + # Create a fully-qualified Campaign resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/campaigns/{campaign_id}` + # + # @param customer_id [String] + # @param campaign_id [String] + # + # @return [::String] + def campaign_path customer_id:, campaign_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/campaigns/#{campaign_id}" + end + + ## + # Create a fully-qualified ConversionGoalCampaignConfig resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/conversionGoalCampaignConfigs/{campaign_id}` + # + # @param customer_id [String] + # @param campaign_id [String] + # + # @return [::String] + def conversion_goal_campaign_config_path customer_id:, campaign_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/conversionGoalCampaignConfigs/#{campaign_id}" + end + + ## + # Create a fully-qualified CustomConversionGoal resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/customConversionGoals/{goal_id}` + # + # @param customer_id [String] + # @param goal_id [String] + # + # @return [::String] + def custom_conversion_goal_path customer_id:, goal_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/customConversionGoals/#{goal_id}" + end + + extend self + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/conversion_goal_campaign_config_service_pb.rb b/lib/google/ads/google_ads/v25/services/conversion_goal_campaign_config_service_pb.rb new file mode 100644 index 000000000..177fd9c05 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/conversion_goal_campaign_config_service_pb.rb @@ -0,0 +1,34 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/services/conversion_goal_campaign_config_service.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/enums/response_content_type_pb' +require 'google/ads/google_ads/v25/resources/conversion_goal_campaign_config_pb' +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/field_mask_pb' + + +descriptor_data = "\nOgoogle/ads/googleads/v25/services/conversion_goal_campaign_config_service.proto\x12!google.ads.googleads.v25.services\x1a:google/ads/googleads/v25/enums/response_content_type.proto\x1aHgoogle/ads/googleads/v25/resources/conversion_goal_campaign_config.proto\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\"\xac\x02\n*MutateConversionGoalCampaignConfigsRequest\x12\x18\n\x0b\x63ustomer_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x61\n\noperations\x18\x02 \x03(\x0b\x32H.google.ads.googleads.v25.services.ConversionGoalCampaignConfigOperationB\x03\xe0\x41\x02\x12\x15\n\rvalidate_only\x18\x03 \x01(\x08\x12j\n\x15response_content_type\x18\x04 \x01(\x0e\x32K.google.ads.googleads.v25.enums.ResponseContentTypeEnum.ResponseContentType\"\xb9\x01\n%ConversionGoalCampaignConfigOperation\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\x12R\n\x06update\x18\x01 \x01(\x0b\x32@.google.ads.googleads.v25.resources.ConversionGoalCampaignConfigH\x00\x42\x0b\n\toperation\"\x8b\x01\n+MutateConversionGoalCampaignConfigsResponse\x12\\\n\x07results\x18\x01 \x03(\x0b\x32K.google.ads.googleads.v25.services.MutateConversionGoalCampaignConfigResult\"\xe8\x01\n(MutateConversionGoalCampaignConfigResult\x12Q\n\rresource_name\x18\x01 \x01(\tB:\xfa\x41\x37\n5googleads.googleapis.com/ConversionGoalCampaignConfig\x12i\n\x1f\x63onversion_goal_campaign_config\x18\x02 \x01(\x0b\x32@.google.ads.googleads.v25.resources.ConversionGoalCampaignConfig2\x9c\x03\n#ConversionGoalCampaignConfigService\x12\xad\x02\n#MutateConversionGoalCampaignConfigs\x12M.google.ads.googleads.v25.services.MutateConversionGoalCampaignConfigsRequest\x1aN.google.ads.googleads.v25.services.MutateConversionGoalCampaignConfigsResponse\"g\xda\x41\x16\x63ustomer_id,operations\x82\xd3\xe4\x93\x02H\"C/v25/customers/{customer_id=*}/conversionGoalCampaignConfigs:mutate:\x01*\x1a\x45\xca\x41\x18googleads.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/adwordsB\x94\x02\n%com.google.ads.googleads.v25.servicesB(ConversionGoalCampaignConfigServiceProtoP\x01ZIgoogle.golang.org/genproto/googleapis/ads/googleads/v25/services;services\xa2\x02\x03GAA\xaa\x02!Google.Ads.GoogleAds.V25.Services\xca\x02!Google\\Ads\\GoogleAds\\V25\\Services\xea\x02%Google::Ads::GoogleAds::V25::Servicesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Services + MutateConversionGoalCampaignConfigsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.MutateConversionGoalCampaignConfigsRequest").msgclass + ConversionGoalCampaignConfigOperation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.ConversionGoalCampaignConfigOperation").msgclass + MutateConversionGoalCampaignConfigsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.MutateConversionGoalCampaignConfigsResponse").msgclass + MutateConversionGoalCampaignConfigResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.MutateConversionGoalCampaignConfigResult").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/conversion_goal_campaign_config_service_services_pb.rb b/lib/google/ads/google_ads/v25/services/conversion_goal_campaign_config_service_services_pb.rb new file mode 100644 index 000000000..91722f542 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/conversion_goal_campaign_config_service_services_pb.rb @@ -0,0 +1,50 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/ads/googleads/v25/services/conversion_goal_campaign_config_service.proto for package 'Google.Ads.GoogleAds.V25.Services' +# Original file comments: +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +require 'grpc' +require 'google/ads/google_ads/v25/services/conversion_goal_campaign_config_service_pb' + +module Google + module Ads + module GoogleAds + module V25 + module Services + module ConversionGoalCampaignConfigService + # Proto file describing the ConversionGoalCampaignConfig service. + # + # Service to manage conversion goal campaign config. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.ads.googleads.v25.services.ConversionGoalCampaignConfigService' + + # Creates, updates or removes conversion goal campaign config. Operation + # statuses are returned. + rpc :MutateConversionGoalCampaignConfigs, ::Google::Ads::GoogleAds::V25::Services::MutateConversionGoalCampaignConfigsRequest, ::Google::Ads::GoogleAds::V25::Services::MutateConversionGoalCampaignConfigsResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/conversion_upload_service.rb b/lib/google/ads/google_ads/v25/services/conversion_upload_service.rb new file mode 100644 index 000000000..f02608e2f --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/conversion_upload_service.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/ads/google_ads/version" + +require "google/ads/google_ads/v25/services/conversion_upload_service/credentials" +require "google/ads/google_ads/v25/services/conversion_upload_service/paths" +require "google/ads/google_ads/v25/services/conversion_upload_service/client" + +module Google + module Ads + module GoogleAds + module V25 + module Services + ## + # Service to upload conversions. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/ads/google_ads/v25/services/conversion_upload_service" + # client = ::Google::Ads::GoogleAds::V25::Services::ConversionUploadService::Client.new + # + module ConversionUploadService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "conversion_upload_service", "helpers.rb" +require "google/ads/google_ads/v25/services/conversion_upload_service/helpers" if ::File.file? helper_path diff --git a/lib/google/ads/google_ads/v25/services/conversion_upload_service/client.rb b/lib/google/ads/google_ads/v25/services/conversion_upload_service/client.rb new file mode 100644 index 000000000..f47a9acc3 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/conversion_upload_service/client.rb @@ -0,0 +1,625 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# require "google/ads/google_ads/error" +require "google/ads/google_ads/v25/services/conversion_upload_service_pb" + +module Google + module Ads + module GoogleAds + module V25 + module Services + module ConversionUploadService + ## + # Client for the ConversionUploadService service. + # + # Service to upload conversions. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "googleads.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :conversion_upload_service_stub + + ## + # Configure the ConversionUploadService Client class. + # + # See {::Google::Ads::GoogleAds::V25::Services::ConversionUploadService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all ConversionUploadService clients + # ::Google::Ads::GoogleAds::V25::Services::ConversionUploadService::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + default_config = Client::Configuration.new + + default_config.timeout = 14_400.0 + default_config.retry_policy = { + initial_delay: 5.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the ConversionUploadService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Ads::GoogleAds::V25::Services::ConversionUploadService::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @conversion_upload_service_stub.universe_domain + end + + ## + # Create a new ConversionUploadService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Ads::GoogleAds::V25::Services::ConversionUploadService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Ads::GoogleAds::V25::Services::ConversionUploadService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the ConversionUploadService client. + # @yieldparam config [Client::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/ads/google_ads/v25/services/conversion_upload_service_services_pb" + + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @conversion_upload_service_stub = ::Gapic::ServiceStub.new( + ::Google::Ads::GoogleAds::V25::Services::ConversionUploadService::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool, + logger: @config.logger + ) + + @conversion_upload_service_stub.stub_logger&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @conversion_upload_service_stub.logger + end + + # Service calls + + ## + # Processes the given click conversions. + # + # List of thrown errors: + # [AuthenticationError]() + # [AuthorizationError]() + # [ConversionUploadError]() + # [HeaderError]() + # [InternalError]() + # [PartialFailureError]() + # [QuotaError]() + # [RequestError]() + # + # @overload upload_click_conversions(request, options = nil) + # Pass arguments to `upload_click_conversions` via a request object, either of type + # {::Google::Ads::GoogleAds::V25::Services::UploadClickConversionsRequest} or an equivalent Hash. + # + # @param request [::Google::Ads::GoogleAds::V25::Services::UploadClickConversionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload upload_click_conversions(customer_id: nil, conversions: nil, partial_failure: nil, validate_only: nil, job_id: nil) + # Pass arguments to `upload_click_conversions` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param customer_id [::String] + # Required. The ID of the customer performing the upload. + # @param conversions [::Array<::Google::Ads::GoogleAds::V25::Services::ClickConversion, ::Hash>] + # Required. The conversions that are being uploaded. + # @param partial_failure [::Boolean] + # Required. 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`. + # + # See + # [Best practices for partial + # failures](/google-ads/api/docs/best-practices/partial-failures). + # @param validate_only [::Boolean] + # If `true`, the request is validated but not executed. Only errors are + # returned, not results. + # @param job_id [::Integer] + # Optional. Optional input to set job ID. Must be a non-negative number that + # is less than 2^31 if provided. If this field is not provided, the API will + # generate a job ID in the range [2^31, (2^63)-1]. The API will return the + # value for this request in the `job_id` field of the + # `UploadClickConversionsResponse`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Ads::GoogleAds::V25::Services::UploadClickConversionsResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Ads::GoogleAds::V25::Services::UploadClickConversionsResponse] + # + # @raise [Google::Ads::GoogleAds::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/ads/google_ads/v25/services" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Ads::GoogleAds::V25::Services::ConversionUploadService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Ads::GoogleAds::V25::Services::UploadClickConversionsRequest.new + # + # # Call the upload_click_conversions method. + # result = client.upload_click_conversions request + # + # # The returned object is of type Google::Ads::GoogleAds::V25::Services::UploadClickConversionsResponse. + # p result + # + def upload_click_conversions request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::GoogleAds::V25::Services::UploadClickConversionsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.upload_click_conversions.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Ads::GoogleAds::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.customer_id + header_params["customer_id"] = request.customer_id + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.upload_click_conversions.timeout, + metadata: metadata, + retry_policy: @config.rpcs.upload_click_conversions.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @conversion_upload_service_stub.call_rpc :upload_click_conversions, request, + options: options do |response, operation| + yield response, operation if block_given? + end + # rescue GRPC::BadStatus => grpc_error + # raise Google::Ads::GoogleAds::Error.new grpc_error.message + end + + ## + # Processes the given call conversions. + # + # List of thrown errors: + # [AuthenticationError]() + # [AuthorizationError]() + # [HeaderError]() + # [InternalError]() + # [PartialFailureError]() + # [QuotaError]() + # [RequestError]() + # + # @overload upload_call_conversions(request, options = nil) + # Pass arguments to `upload_call_conversions` via a request object, either of type + # {::Google::Ads::GoogleAds::V25::Services::UploadCallConversionsRequest} or an equivalent Hash. + # + # @param request [::Google::Ads::GoogleAds::V25::Services::UploadCallConversionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload upload_call_conversions(customer_id: nil, conversions: nil, partial_failure: nil, validate_only: nil) + # Pass arguments to `upload_call_conversions` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param customer_id [::String] + # Required. The ID of the customer performing the upload. + # @param conversions [::Array<::Google::Ads::GoogleAds::V25::Services::CallConversion, ::Hash>] + # Required. The conversions that are being uploaded. + # @param partial_failure [::Boolean] + # Required. 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`. + # + # See + # [Best practices for partial + # failures](/google-ads/api/docs/best-practices/partial-failures). + # @param validate_only [::Boolean] + # If true, the request is validated but not executed. Only errors are + # returned, not results. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Ads::GoogleAds::V25::Services::UploadCallConversionsResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Ads::GoogleAds::V25::Services::UploadCallConversionsResponse] + # + # @raise [Google::Ads::GoogleAds::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/ads/google_ads/v25/services" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Ads::GoogleAds::V25::Services::ConversionUploadService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Ads::GoogleAds::V25::Services::UploadCallConversionsRequest.new + # + # # Call the upload_call_conversions method. + # result = client.upload_call_conversions request + # + # # The returned object is of type Google::Ads::GoogleAds::V25::Services::UploadCallConversionsResponse. + # p result + # + def upload_call_conversions request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::GoogleAds::V25::Services::UploadCallConversionsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.upload_call_conversions.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Ads::GoogleAds::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.customer_id + header_params["customer_id"] = request.customer_id + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.upload_call_conversions.timeout, + metadata: metadata, + retry_policy: @config.rpcs.upload_call_conversions.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @conversion_upload_service_stub.call_rpc :upload_call_conversions, request, + options: options do |response, operation| + yield response, operation if block_given? + end + # rescue GRPC::BadStatus => grpc_error + # raise Google::Ads::GoogleAds::Error.new grpc_error.message + end + + ## + # Configuration class for the ConversionUploadService API. + # + # This class represents the configuration for ConversionUploadService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Ads::GoogleAds::V25::Services::ConversionUploadService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # upload_click_conversions to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Ads::GoogleAds::V25::Services::ConversionUploadService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.upload_click_conversions.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Ads::GoogleAds::V25::Services::ConversionUploadService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.upload_click_conversions.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Ads::GoogleAds::V25::Services::ConversionUploadService::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "googleads.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, + ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the ConversionUploadService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `upload_click_conversions` + # @return [::Gapic::Config::Method] + # + attr_reader :upload_click_conversions + ## + # RPC-specific configuration for `upload_call_conversions` + # @return [::Gapic::Config::Method] + # + attr_reader :upload_call_conversions + + # @private + def initialize parent_rpcs = nil + upload_click_conversions_config = parent_rpcs.upload_click_conversions if parent_rpcs.respond_to? :upload_click_conversions + @upload_click_conversions = ::Gapic::Config::Method.new upload_click_conversions_config + upload_call_conversions_config = parent_rpcs.upload_call_conversions if parent_rpcs.respond_to? :upload_call_conversions + @upload_call_conversions = ::Gapic::Config::Method.new upload_call_conversions_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/conversion_upload_service/credentials.rb b/lib/google/ads/google_ads/v25/services/conversion_upload_service/credentials.rb new file mode 100644 index 000000000..d43e4fc14 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/conversion_upload_service/credentials.rb @@ -0,0 +1,38 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Ads + module GoogleAds + module V25 + module Services + module ConversionUploadService + # Credentials for the ConversionUploadService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/adwords" + ] + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/conversion_upload_service/paths.rb b/lib/google/ads/google_ads/v25/services/conversion_upload_service/paths.rb new file mode 100644 index 000000000..fb12ee7a5 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/conversion_upload_service/paths.rb @@ -0,0 +1,52 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Ads + module GoogleAds + module V25 + module Services + module ConversionUploadService + # Path helper methods for the ConversionUploadService API. + module Paths + ## + # Create a fully-qualified ConversionCustomVariable resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/conversionCustomVariables/{conversion_custom_variable_id}` + # + # @param customer_id [String] + # @param conversion_custom_variable_id [String] + # + # @return [::String] + def conversion_custom_variable_path customer_id:, conversion_custom_variable_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/conversionCustomVariables/#{conversion_custom_variable_id}" + end + + extend self + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/conversion_upload_service_pb.rb b/lib/google/ads/google_ads/v25/services/conversion_upload_service_pb.rb new file mode 100644 index 000000000..988de6189 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/conversion_upload_service_pb.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/services/conversion_upload_service.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/common/consent_pb' +require 'google/ads/google_ads/v25/common/offline_user_data_pb' +require 'google/ads/google_ads/v25/enums/conversion_customer_type_pb' +require 'google/ads/google_ads/v25/enums/conversion_environment_enum_pb' +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/field_info_pb' +require 'google/api/resource_pb' +require 'google/rpc/status_pb' + + +descriptor_data = "\nAgoogle/ads/googleads/v25/services/conversion_upload_service.proto\x12!google.ads.googleads.v25.services\x1a-google/ads/googleads/v25/common/consent.proto\x1a\x37google/ads/googleads/v25/common/offline_user_data.proto\x1a=google/ads/googleads/v25/enums/conversion_customer_type.proto\x1a@google/ads/googleads/v25/enums/conversion_environment_enum.proto\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1bgoogle/api/field_info.proto\x1a\x19google/api/resource.proto\x1a\x17google/rpc/status.proto\"\xe1\x01\n\x1dUploadClickConversionsRequest\x12\x18\n\x0b\x63ustomer_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12L\n\x0b\x63onversions\x18\x02 \x03(\x0b\x32\x32.google.ads.googleads.v25.services.ClickConversionB\x03\xe0\x41\x02\x12\x1c\n\x0fpartial_failure\x18\x03 \x01(\x08\x42\x03\xe0\x41\x02\x12\x15\n\rvalidate_only\x18\x04 \x01(\x08\x12\x18\n\x06job_id\x18\x06 \x01(\x05\x42\x03\xe0\x41\x01H\x00\x88\x01\x01\x42\t\n\x07_job_id\"\xae\x01\n\x1eUploadClickConversionsResponse\x12\x31\n\x15partial_failure_error\x18\x01 \x01(\x0b\x32\x12.google.rpc.Status\x12I\n\x07results\x18\x02 \x03(\x0b\x32\x38.google.ads.googleads.v25.services.ClickConversionResult\x12\x0e\n\x06job_id\x18\x03 \x01(\x03\"\xba\x01\n\x1cUploadCallConversionsRequest\x12\x18\n\x0b\x63ustomer_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12K\n\x0b\x63onversions\x18\x02 \x03(\x0b\x32\x31.google.ads.googleads.v25.services.CallConversionB\x03\xe0\x41\x02\x12\x1c\n\x0fpartial_failure\x18\x03 \x01(\x08\x42\x03\xe0\x41\x02\x12\x15\n\rvalidate_only\x18\x04 \x01(\x08\"\x9c\x01\n\x1dUploadCallConversionsResponse\x12\x31\n\x15partial_failure_error\x18\x01 \x01(\x0b\x32\x12.google.rpc.Status\x12H\n\x07results\x18\x02 \x03(\x0b\x32\x37.google.ads.googleads.v25.services.CallConversionResult\"\xfd\x08\n\x0f\x43lickConversion\x12\x12\n\x05gclid\x18\t \x01(\tH\x01\x88\x01\x01\x12\x0e\n\x06gbraid\x18\x12 \x01(\t\x12\x0e\n\x06wbraid\x18\x13 \x01(\t\x12\x1e\n\x11\x63onversion_action\x18\n \x01(\tH\x02\x88\x01\x01\x12!\n\x14\x63onversion_date_time\x18\x0b \x01(\tH\x03\x88\x01\x01\x12\x1d\n\x10\x63onversion_value\x18\x0c \x01(\x01H\x04\x88\x01\x01\x12\x1a\n\rcurrency_code\x18\r \x01(\tH\x05\x88\x01\x01\x12\x15\n\x08order_id\x18\x0e \x01(\tH\x06\x88\x01\x01\x12]\n\x19\x65xternal_attribution_data\x18\x07 \x01(\x0b\x32:.google.ads.googleads.v25.services.ExternalAttributionData\x12K\n\x10\x63ustom_variables\x18\x0f \x03(\x0b\x32\x31.google.ads.googleads.v25.services.CustomVariable\x12>\n\tcart_data\x18\x10 \x01(\x0b\x32+.google.ads.googleads.v25.services.CartData\x12I\n\x10user_identifiers\x18\x11 \x03(\x0b\x32/.google.ads.googleads.v25.common.UserIdentifier\x12o\n\x16\x63onversion_environment\x18\x14 \x01(\x0e\x32O.google.ads.googleads.v25.enums.ConversionEnvironmentEnum.ConversionEnvironment\x12\x39\n\x07\x63onsent\x18\x17 \x01(\x0b\x32(.google.ads.googleads.v25.common.Consent\x12h\n\rcustomer_type\x18\x1a \x01(\x0e\x32Q.google.ads.googleads.v25.enums.ConversionCustomerTypeEnum.ConversionCustomerType\x12&\n\x0fuser_ip_address\x18\x1b \x01(\tB\x08\xe2\x8c\xcf\xd7\x08\x02\x08\x04H\x07\x88\x01\x01\x12$\n\x1asession_attributes_encoded\x18\x18 \x01(\x0cH\x00\x12o\n\"session_attributes_key_value_pairs\x18\x19 \x01(\x0b\x32\x41.google.ads.googleads.v25.services.SessionAttributesKeyValuePairsH\x00\x42\x14\n\x12session_attributesB\x08\n\x06_gclidB\x14\n\x12_conversion_actionB\x17\n\x15_conversion_date_timeB\x13\n\x11_conversion_valueB\x10\n\x0e_currency_codeB\x0b\n\t_order_idB\x12\n\x10_user_ip_address\"\xce\x03\n\x0e\x43\x61llConversion\x12\x16\n\tcaller_id\x18\x07 \x01(\tH\x00\x88\x01\x01\x12!\n\x14\x63\x61ll_start_date_time\x18\x08 \x01(\tH\x01\x88\x01\x01\x12\x1e\n\x11\x63onversion_action\x18\t \x01(\tH\x02\x88\x01\x01\x12!\n\x14\x63onversion_date_time\x18\n \x01(\tH\x03\x88\x01\x01\x12\x1d\n\x10\x63onversion_value\x18\x0b \x01(\x01H\x04\x88\x01\x01\x12\x1a\n\rcurrency_code\x18\x0c \x01(\tH\x05\x88\x01\x01\x12K\n\x10\x63ustom_variables\x18\r \x03(\x0b\x32\x31.google.ads.googleads.v25.services.CustomVariable\x12\x39\n\x07\x63onsent\x18\x0e \x01(\x0b\x32(.google.ads.googleads.v25.common.ConsentB\x0c\n\n_caller_idB\x17\n\x15_call_start_date_timeB\x14\n\x12_conversion_actionB\x17\n\x15_conversion_date_timeB\x13\n\x11_conversion_valueB\x10\n\x0e_currency_code\"\xab\x01\n\x17\x45xternalAttributionData\x12(\n\x1b\x65xternal_attribution_credit\x18\x03 \x01(\x01H\x00\x88\x01\x01\x12\'\n\x1a\x65xternal_attribution_model\x18\x04 \x01(\tH\x01\x88\x01\x01\x42\x1e\n\x1c_external_attribution_creditB\x1d\n\x1b_external_attribution_model\"\x92\x02\n\x15\x43lickConversionResult\x12\x12\n\x05gclid\x18\x04 \x01(\tH\x00\x88\x01\x01\x12\x0e\n\x06gbraid\x18\x08 \x01(\t\x12\x0e\n\x06wbraid\x18\t \x01(\t\x12\x1e\n\x11\x63onversion_action\x18\x05 \x01(\tH\x01\x88\x01\x01\x12!\n\x14\x63onversion_date_time\x18\x06 \x01(\tH\x02\x88\x01\x01\x12I\n\x10user_identifiers\x18\x07 \x03(\x0b\x32/.google.ads.googleads.v25.common.UserIdentifierB\x08\n\x06_gclidB\x14\n\x12_conversion_actionB\x17\n\x15_conversion_date_time\"\xea\x01\n\x14\x43\x61llConversionResult\x12\x16\n\tcaller_id\x18\x05 \x01(\tH\x00\x88\x01\x01\x12!\n\x14\x63\x61ll_start_date_time\x18\x06 \x01(\tH\x01\x88\x01\x01\x12\x1e\n\x11\x63onversion_action\x18\x07 \x01(\tH\x02\x88\x01\x01\x12!\n\x14\x63onversion_date_time\x18\x08 \x01(\tH\x03\x88\x01\x01\x42\x0c\n\n_caller_idB\x17\n\x15_call_start_date_timeB\x14\n\x12_conversion_actionB\x17\n\x15_conversion_date_time\"{\n\x0e\x43ustomVariable\x12Z\n\x1a\x63onversion_custom_variable\x18\x01 \x01(\tB6\xfa\x41\x33\n1googleads.googleapis.com/ConversionCustomVariable\x12\r\n\x05value\x18\x02 \x01(\t\"\xf9\x01\n\x08\x43\x61rtData\x12\x13\n\x0bmerchant_id\x18\x06 \x01(\x03\x12\x19\n\x11\x66\x65\x65\x64_country_code\x18\x02 \x01(\t\x12\x1a\n\x12\x66\x65\x65\x64_language_code\x18\x03 \x01(\t\x12\x1e\n\x16local_transaction_cost\x18\x04 \x01(\x01\x12?\n\x05items\x18\x05 \x03(\x0b\x32\x30.google.ads.googleads.v25.services.CartData.Item\x1a@\n\x04Item\x12\x12\n\nproduct_id\x18\x01 \x01(\t\x12\x10\n\x08quantity\x18\x02 \x01(\x05\x12\x12\n\nunit_price\x18\x03 \x01(\x01\"h\n\x1cSessionAttributeKeyValuePair\x12\"\n\x15session_attribute_key\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12$\n\x17session_attribute_value\x18\x02 \x01(\tB\x03\xe0\x41\x02\"\x7f\n\x1eSessionAttributesKeyValuePairs\x12]\n\x0fkey_value_pairs\x18\x01 \x03(\x0b\x32?.google.ads.googleads.v25.services.SessionAttributeKeyValuePairB\x03\xe0\x41\x02\x32\xf4\x04\n\x17\x43onversionUploadService\x12\x89\x02\n\x16UploadClickConversions\x12@.google.ads.googleads.v25.services.UploadClickConversionsRequest\x1a\x41.google.ads.googleads.v25.services.UploadClickConversionsResponse\"j\xda\x41\'customer_id,conversions,partial_failure\x82\xd3\xe4\x93\x02:\"5/v25/customers/{customer_id=*}:uploadClickConversions:\x01*\x12\x85\x02\n\x15UploadCallConversions\x12?.google.ads.googleads.v25.services.UploadCallConversionsRequest\x1a@.google.ads.googleads.v25.services.UploadCallConversionsResponse\"i\xda\x41\'customer_id,conversions,partial_failure\x82\xd3\xe4\x93\x02\x39\"4/v25/customers/{customer_id=*}:uploadCallConversions:\x01*\x1a\x45\xca\x41\x18googleads.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/adwordsB\x88\x02\n%com.google.ads.googleads.v25.servicesB\x1c\x43onversionUploadServiceProtoP\x01ZIgoogle.golang.org/genproto/googleapis/ads/googleads/v25/services;services\xa2\x02\x03GAA\xaa\x02!Google.Ads.GoogleAds.V25.Services\xca\x02!Google\\Ads\\GoogleAds\\V25\\Services\xea\x02%Google::Ads::GoogleAds::V25::Servicesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Services + UploadClickConversionsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.UploadClickConversionsRequest").msgclass + UploadClickConversionsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.UploadClickConversionsResponse").msgclass + UploadCallConversionsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.UploadCallConversionsRequest").msgclass + UploadCallConversionsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.UploadCallConversionsResponse").msgclass + ClickConversion = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.ClickConversion").msgclass + CallConversion = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.CallConversion").msgclass + ExternalAttributionData = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.ExternalAttributionData").msgclass + ClickConversionResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.ClickConversionResult").msgclass + CallConversionResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.CallConversionResult").msgclass + CustomVariable = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.CustomVariable").msgclass + CartData = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.CartData").msgclass + CartData::Item = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.CartData.Item").msgclass + SessionAttributeKeyValuePair = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.SessionAttributeKeyValuePair").msgclass + SessionAttributesKeyValuePairs = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.SessionAttributesKeyValuePairs").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/conversion_upload_service_services_pb.rb b/lib/google/ads/google_ads/v25/services/conversion_upload_service_services_pb.rb new file mode 100644 index 000000000..09f88c285 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/conversion_upload_service_services_pb.rb @@ -0,0 +1,68 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/ads/googleads/v25/services/conversion_upload_service.proto for package 'Google.Ads.GoogleAds.V25.Services' +# Original file comments: +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +require 'grpc' +require 'google/ads/google_ads/v25/services/conversion_upload_service_pb' + +module Google + module Ads + module GoogleAds + module V25 + module Services + module ConversionUploadService + # Service to upload conversions. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.ads.googleads.v25.services.ConversionUploadService' + + # Processes the given click conversions. + # + # List of thrown errors: + # [AuthenticationError]() + # [AuthorizationError]() + # [ConversionUploadError]() + # [HeaderError]() + # [InternalError]() + # [PartialFailureError]() + # [QuotaError]() + # [RequestError]() + rpc :UploadClickConversions, ::Google::Ads::GoogleAds::V25::Services::UploadClickConversionsRequest, ::Google::Ads::GoogleAds::V25::Services::UploadClickConversionsResponse + # Processes the given call conversions. + # + # List of thrown errors: + # [AuthenticationError]() + # [AuthorizationError]() + # [HeaderError]() + # [InternalError]() + # [PartialFailureError]() + # [QuotaError]() + # [RequestError]() + rpc :UploadCallConversions, ::Google::Ads::GoogleAds::V25::Services::UploadCallConversionsRequest, ::Google::Ads::GoogleAds::V25::Services::UploadCallConversionsResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/conversion_value_rule_service.rb b/lib/google/ads/google_ads/v25/services/conversion_value_rule_service.rb new file mode 100644 index 000000000..a205c7952 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/conversion_value_rule_service.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/ads/google_ads/version" + +require "google/ads/google_ads/v25/services/conversion_value_rule_service/credentials" +require "google/ads/google_ads/v25/services/conversion_value_rule_service/paths" +require "google/ads/google_ads/v25/services/conversion_value_rule_service/client" + +module Google + module Ads + module GoogleAds + module V25 + module Services + ## + # Service to manage conversion value rules. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/ads/google_ads/v25/services/conversion_value_rule_service" + # client = ::Google::Ads::GoogleAds::V25::Services::ConversionValueRuleService::Client.new + # + module ConversionValueRuleService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "conversion_value_rule_service", "helpers.rb" +require "google/ads/google_ads/v25/services/conversion_value_rule_service/helpers" if ::File.file? helper_path diff --git a/lib/google/ads/google_ads/v25/services/conversion_value_rule_service/client.rb b/lib/google/ads/google_ads/v25/services/conversion_value_rule_service/client.rb new file mode 100644 index 000000000..21e852f21 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/conversion_value_rule_service/client.rb @@ -0,0 +1,494 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# require "google/ads/google_ads/error" +require "google/ads/google_ads/v25/services/conversion_value_rule_service_pb" + +module Google + module Ads + module GoogleAds + module V25 + module Services + module ConversionValueRuleService + ## + # Client for the ConversionValueRuleService service. + # + # Service to manage conversion value rules. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "googleads.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :conversion_value_rule_service_stub + + ## + # Configure the ConversionValueRuleService Client class. + # + # See {::Google::Ads::GoogleAds::V25::Services::ConversionValueRuleService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all ConversionValueRuleService clients + # ::Google::Ads::GoogleAds::V25::Services::ConversionValueRuleService::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + default_config = Client::Configuration.new + + default_config.timeout = 14_400.0 + default_config.retry_policy = { + initial_delay: 5.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the ConversionValueRuleService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Ads::GoogleAds::V25::Services::ConversionValueRuleService::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @conversion_value_rule_service_stub.universe_domain + end + + ## + # Create a new ConversionValueRuleService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Ads::GoogleAds::V25::Services::ConversionValueRuleService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Ads::GoogleAds::V25::Services::ConversionValueRuleService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the ConversionValueRuleService client. + # @yieldparam config [Client::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/ads/google_ads/v25/services/conversion_value_rule_service_services_pb" + + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @conversion_value_rule_service_stub = ::Gapic::ServiceStub.new( + ::Google::Ads::GoogleAds::V25::Services::ConversionValueRuleService::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool, + logger: @config.logger + ) + + @conversion_value_rule_service_stub.stub_logger&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @conversion_value_rule_service_stub.logger + end + + # Service calls + + ## + # Creates, updates, or removes conversion value rules. Operation statuses are + # returned. + # + # @overload mutate_conversion_value_rules(request, options = nil) + # Pass arguments to `mutate_conversion_value_rules` via a request object, either of type + # {::Google::Ads::GoogleAds::V25::Services::MutateConversionValueRulesRequest} or an equivalent Hash. + # + # @param request [::Google::Ads::GoogleAds::V25::Services::MutateConversionValueRulesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload mutate_conversion_value_rules(customer_id: nil, operations: nil, partial_failure: nil, validate_only: nil, response_content_type: nil) + # Pass arguments to `mutate_conversion_value_rules` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param customer_id [::String] + # Required. The ID of the customer whose conversion value rules are being + # modified. + # @param operations [::Array<::Google::Ads::GoogleAds::V25::Services::ConversionValueRuleOperation, ::Hash>] + # Required. The list of operations to perform on individual conversion value + # rules. + # @param partial_failure [::Boolean] + # 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. + # @param validate_only [::Boolean] + # If true, the request is validated but not executed. Only errors are + # returned, not results. + # @param response_content_type [::Google::Ads::GoogleAds::V25::Enums::ResponseContentTypeEnum::ResponseContentType] + # The response content type setting. Determines whether the mutable resource + # or just the resource name should be returned post mutation. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Ads::GoogleAds::V25::Services::MutateConversionValueRulesResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Ads::GoogleAds::V25::Services::MutateConversionValueRulesResponse] + # + # @raise [Google::Ads::GoogleAds::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/ads/google_ads/v25/services" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Ads::GoogleAds::V25::Services::ConversionValueRuleService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Ads::GoogleAds::V25::Services::MutateConversionValueRulesRequest.new + # + # # Call the mutate_conversion_value_rules method. + # result = client.mutate_conversion_value_rules request + # + # # The returned object is of type Google::Ads::GoogleAds::V25::Services::MutateConversionValueRulesResponse. + # p result + # + def mutate_conversion_value_rules request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::GoogleAds::V25::Services::MutateConversionValueRulesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.mutate_conversion_value_rules.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Ads::GoogleAds::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.customer_id + header_params["customer_id"] = request.customer_id + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.mutate_conversion_value_rules.timeout, + metadata: metadata, + retry_policy: @config.rpcs.mutate_conversion_value_rules.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @conversion_value_rule_service_stub.call_rpc :mutate_conversion_value_rules, request, + options: options do |response, operation| + yield response, operation if block_given? + end + # rescue GRPC::BadStatus => grpc_error + # raise Google::Ads::GoogleAds::Error.new grpc_error.message + end + + ## + # Configuration class for the ConversionValueRuleService API. + # + # This class represents the configuration for ConversionValueRuleService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Ads::GoogleAds::V25::Services::ConversionValueRuleService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # mutate_conversion_value_rules to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Ads::GoogleAds::V25::Services::ConversionValueRuleService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.mutate_conversion_value_rules.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Ads::GoogleAds::V25::Services::ConversionValueRuleService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.mutate_conversion_value_rules.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Ads::GoogleAds::V25::Services::ConversionValueRuleService::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "googleads.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, + ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the ConversionValueRuleService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `mutate_conversion_value_rules` + # @return [::Gapic::Config::Method] + # + attr_reader :mutate_conversion_value_rules + + # @private + def initialize parent_rpcs = nil + mutate_conversion_value_rules_config = parent_rpcs.mutate_conversion_value_rules if parent_rpcs.respond_to? :mutate_conversion_value_rules + @mutate_conversion_value_rules = ::Gapic::Config::Method.new mutate_conversion_value_rules_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/conversion_value_rule_service/credentials.rb b/lib/google/ads/google_ads/v25/services/conversion_value_rule_service/credentials.rb new file mode 100644 index 000000000..d50c29859 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/conversion_value_rule_service/credentials.rb @@ -0,0 +1,38 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Ads + module GoogleAds + module V25 + module Services + module ConversionValueRuleService + # Credentials for the ConversionValueRuleService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/adwords" + ] + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/conversion_value_rule_service/paths.rb b/lib/google/ads/google_ads/v25/services/conversion_value_rule_service/paths.rb new file mode 100644 index 000000000..cd4bace71 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/conversion_value_rule_service/paths.rb @@ -0,0 +1,114 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Ads + module GoogleAds + module V25 + module Services + module ConversionValueRuleService + # Path helper methods for the ConversionValueRuleService API. + module Paths + ## + # Create a fully-qualified ConversionValueRule resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/conversionValueRules/{conversion_value_rule_id}` + # + # @param customer_id [String] + # @param conversion_value_rule_id [String] + # + # @return [::String] + def conversion_value_rule_path customer_id:, conversion_value_rule_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/conversionValueRules/#{conversion_value_rule_id}" + end + + ## + # Create a fully-qualified Customer resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}` + # + # @param customer_id [String] + # + # @return [::String] + def customer_path customer_id: + "customers/#{customer_id}" + end + + ## + # Create a fully-qualified GeoTargetConstant resource string. + # + # The resource will be in the following format: + # + # `geoTargetConstants/{criterion_id}` + # + # @param criterion_id [String] + # + # @return [::String] + def geo_target_constant_path criterion_id: + "geoTargetConstants/#{criterion_id}" + end + + ## + # Create a fully-qualified UserInterest resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/userInterests/{user_interest_id}` + # + # @param customer_id [String] + # @param user_interest_id [String] + # + # @return [::String] + def user_interest_path customer_id:, user_interest_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/userInterests/#{user_interest_id}" + end + + ## + # Create a fully-qualified UserList resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/userLists/{user_list_id}` + # + # @param customer_id [String] + # @param user_list_id [String] + # + # @return [::String] + def user_list_path customer_id:, user_list_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/userLists/#{user_list_id}" + end + + extend self + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/conversion_value_rule_service_pb.rb b/lib/google/ads/google_ads/v25/services/conversion_value_rule_service_pb.rb new file mode 100644 index 000000000..e687fc203 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/conversion_value_rule_service_pb.rb @@ -0,0 +1,35 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/services/conversion_value_rule_service.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/enums/response_content_type_pb' +require 'google/ads/google_ads/v25/resources/conversion_value_rule_pb' +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/field_mask_pb' +require 'google/rpc/status_pb' + + +descriptor_data = "\nEgoogle/ads/googleads/v25/services/conversion_value_rule_service.proto\x12!google.ads.googleads.v25.services\x1a:google/ads/googleads/v25/enums/response_content_type.proto\x1a>google/ads/googleads/v25/resources/conversion_value_rule.proto\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\x1a\x17google/rpc/status.proto\"\xb3\x02\n!MutateConversionValueRulesRequest\x12\x18\n\x0b\x63ustomer_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12X\n\noperations\x18\x02 \x03(\x0b\x32?.google.ads.googleads.v25.services.ConversionValueRuleOperationB\x03\xe0\x41\x02\x12\x17\n\x0fpartial_failure\x18\x05 \x01(\x08\x12\x15\n\rvalidate_only\x18\x03 \x01(\x08\x12j\n\x15response_content_type\x18\x04 \x01(\x0e\x32K.google.ads.googleads.v25.enums.ResponseContentTypeEnum.ResponseContentType\"\xb7\x02\n\x1c\x43onversionValueRuleOperation\x12/\n\x0bupdate_mask\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\x12I\n\x06\x63reate\x18\x01 \x01(\x0b\x32\x37.google.ads.googleads.v25.resources.ConversionValueRuleH\x00\x12I\n\x06update\x18\x02 \x01(\x0b\x32\x37.google.ads.googleads.v25.resources.ConversionValueRuleH\x00\x12\x43\n\x06remove\x18\x03 \x01(\tB1\xfa\x41.\n,googleads.googleapis.com/ConversionValueRuleH\x00\x42\x0b\n\toperation\"\xac\x01\n\"MutateConversionValueRulesResponse\x12S\n\x07results\x18\x02 \x03(\x0b\x32\x42.google.ads.googleads.v25.services.MutateConversionValueRuleResult\x12\x31\n\x15partial_failure_error\x18\x03 \x01(\x0b\x32\x12.google.rpc.Status\"\xc3\x01\n\x1fMutateConversionValueRuleResult\x12H\n\rresource_name\x18\x01 \x01(\tB1\xfa\x41.\n,googleads.googleapis.com/ConversionValueRule\x12V\n\x15\x63onversion_value_rule\x18\x02 \x01(\x0b\x32\x37.google.ads.googleads.v25.resources.ConversionValueRule2\xef\x02\n\x1a\x43onversionValueRuleService\x12\x89\x02\n\x1aMutateConversionValueRules\x12\x44.google.ads.googleads.v25.services.MutateConversionValueRulesRequest\x1a\x45.google.ads.googleads.v25.services.MutateConversionValueRulesResponse\"^\xda\x41\x16\x63ustomer_id,operations\x82\xd3\xe4\x93\x02?\":/v25/customers/{customer_id=*}/conversionValueRules:mutate:\x01*\x1a\x45\xca\x41\x18googleads.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/adwordsB\x8b\x02\n%com.google.ads.googleads.v25.servicesB\x1f\x43onversionValueRuleServiceProtoP\x01ZIgoogle.golang.org/genproto/googleapis/ads/googleads/v25/services;services\xa2\x02\x03GAA\xaa\x02!Google.Ads.GoogleAds.V25.Services\xca\x02!Google\\Ads\\GoogleAds\\V25\\Services\xea\x02%Google::Ads::GoogleAds::V25::Servicesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Services + MutateConversionValueRulesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.MutateConversionValueRulesRequest").msgclass + ConversionValueRuleOperation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.ConversionValueRuleOperation").msgclass + MutateConversionValueRulesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.MutateConversionValueRulesResponse").msgclass + MutateConversionValueRuleResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.MutateConversionValueRuleResult").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/conversion_value_rule_service_services_pb.rb b/lib/google/ads/google_ads/v25/services/conversion_value_rule_service_services_pb.rb new file mode 100644 index 000000000..c74aff4df --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/conversion_value_rule_service_services_pb.rb @@ -0,0 +1,50 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/ads/googleads/v25/services/conversion_value_rule_service.proto for package 'Google.Ads.GoogleAds.V25.Services' +# Original file comments: +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +require 'grpc' +require 'google/ads/google_ads/v25/services/conversion_value_rule_service_pb' + +module Google + module Ads + module GoogleAds + module V25 + module Services + module ConversionValueRuleService + # Proto file describing the Conversion Value Rule service. + # + # Service to manage conversion value rules. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.ads.googleads.v25.services.ConversionValueRuleService' + + # Creates, updates, or removes conversion value rules. Operation statuses are + # returned. + rpc :MutateConversionValueRules, ::Google::Ads::GoogleAds::V25::Services::MutateConversionValueRulesRequest, ::Google::Ads::GoogleAds::V25::Services::MutateConversionValueRulesResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/conversion_value_rule_set_service.rb b/lib/google/ads/google_ads/v25/services/conversion_value_rule_set_service.rb new file mode 100644 index 000000000..b38d315c6 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/conversion_value_rule_set_service.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/ads/google_ads/version" + +require "google/ads/google_ads/v25/services/conversion_value_rule_set_service/credentials" +require "google/ads/google_ads/v25/services/conversion_value_rule_set_service/paths" +require "google/ads/google_ads/v25/services/conversion_value_rule_set_service/client" + +module Google + module Ads + module GoogleAds + module V25 + module Services + ## + # Service to manage conversion value rule sets. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/ads/google_ads/v25/services/conversion_value_rule_set_service" + # client = ::Google::Ads::GoogleAds::V25::Services::ConversionValueRuleSetService::Client.new + # + module ConversionValueRuleSetService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "conversion_value_rule_set_service", "helpers.rb" +require "google/ads/google_ads/v25/services/conversion_value_rule_set_service/helpers" if ::File.file? helper_path diff --git a/lib/google/ads/google_ads/v25/services/conversion_value_rule_set_service/client.rb b/lib/google/ads/google_ads/v25/services/conversion_value_rule_set_service/client.rb new file mode 100644 index 000000000..63b578c9b --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/conversion_value_rule_set_service/client.rb @@ -0,0 +1,494 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# require "google/ads/google_ads/error" +require "google/ads/google_ads/v25/services/conversion_value_rule_set_service_pb" + +module Google + module Ads + module GoogleAds + module V25 + module Services + module ConversionValueRuleSetService + ## + # Client for the ConversionValueRuleSetService service. + # + # Service to manage conversion value rule sets. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "googleads.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :conversion_value_rule_set_service_stub + + ## + # Configure the ConversionValueRuleSetService Client class. + # + # See {::Google::Ads::GoogleAds::V25::Services::ConversionValueRuleSetService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all ConversionValueRuleSetService clients + # ::Google::Ads::GoogleAds::V25::Services::ConversionValueRuleSetService::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + default_config = Client::Configuration.new + + default_config.timeout = 14_400.0 + default_config.retry_policy = { + initial_delay: 5.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the ConversionValueRuleSetService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Ads::GoogleAds::V25::Services::ConversionValueRuleSetService::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @conversion_value_rule_set_service_stub.universe_domain + end + + ## + # Create a new ConversionValueRuleSetService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Ads::GoogleAds::V25::Services::ConversionValueRuleSetService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Ads::GoogleAds::V25::Services::ConversionValueRuleSetService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the ConversionValueRuleSetService client. + # @yieldparam config [Client::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/ads/google_ads/v25/services/conversion_value_rule_set_service_services_pb" + + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @conversion_value_rule_set_service_stub = ::Gapic::ServiceStub.new( + ::Google::Ads::GoogleAds::V25::Services::ConversionValueRuleSetService::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool, + logger: @config.logger + ) + + @conversion_value_rule_set_service_stub.stub_logger&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @conversion_value_rule_set_service_stub.logger + end + + # Service calls + + ## + # Creates, updates or removes conversion value rule sets. Operation statuses + # are returned. + # + # @overload mutate_conversion_value_rule_sets(request, options = nil) + # Pass arguments to `mutate_conversion_value_rule_sets` via a request object, either of type + # {::Google::Ads::GoogleAds::V25::Services::MutateConversionValueRuleSetsRequest} or an equivalent Hash. + # + # @param request [::Google::Ads::GoogleAds::V25::Services::MutateConversionValueRuleSetsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload mutate_conversion_value_rule_sets(customer_id: nil, operations: nil, partial_failure: nil, validate_only: nil, response_content_type: nil) + # Pass arguments to `mutate_conversion_value_rule_sets` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param customer_id [::String] + # Required. The ID of the customer whose conversion value rule sets are being + # modified. + # @param operations [::Array<::Google::Ads::GoogleAds::V25::Services::ConversionValueRuleSetOperation, ::Hash>] + # Required. The list of operations to perform on individual conversion value + # rule sets. + # @param partial_failure [::Boolean] + # 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. + # @param validate_only [::Boolean] + # If true, the request is validated but not executed. Only errors are + # returned, not results. + # @param response_content_type [::Google::Ads::GoogleAds::V25::Enums::ResponseContentTypeEnum::ResponseContentType] + # The response content type setting. Determines whether the mutable resource + # or just the resource name should be returned post mutation. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Ads::GoogleAds::V25::Services::MutateConversionValueRuleSetsResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Ads::GoogleAds::V25::Services::MutateConversionValueRuleSetsResponse] + # + # @raise [Google::Ads::GoogleAds::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/ads/google_ads/v25/services" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Ads::GoogleAds::V25::Services::ConversionValueRuleSetService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Ads::GoogleAds::V25::Services::MutateConversionValueRuleSetsRequest.new + # + # # Call the mutate_conversion_value_rule_sets method. + # result = client.mutate_conversion_value_rule_sets request + # + # # The returned object is of type Google::Ads::GoogleAds::V25::Services::MutateConversionValueRuleSetsResponse. + # p result + # + def mutate_conversion_value_rule_sets request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::GoogleAds::V25::Services::MutateConversionValueRuleSetsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.mutate_conversion_value_rule_sets.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Ads::GoogleAds::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.customer_id + header_params["customer_id"] = request.customer_id + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.mutate_conversion_value_rule_sets.timeout, + metadata: metadata, + retry_policy: @config.rpcs.mutate_conversion_value_rule_sets.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @conversion_value_rule_set_service_stub.call_rpc :mutate_conversion_value_rule_sets, request, + options: options do |response, operation| + yield response, operation if block_given? + end + # rescue GRPC::BadStatus => grpc_error + # raise Google::Ads::GoogleAds::Error.new grpc_error.message + end + + ## + # Configuration class for the ConversionValueRuleSetService API. + # + # This class represents the configuration for ConversionValueRuleSetService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Ads::GoogleAds::V25::Services::ConversionValueRuleSetService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # mutate_conversion_value_rule_sets to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Ads::GoogleAds::V25::Services::ConversionValueRuleSetService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.mutate_conversion_value_rule_sets.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Ads::GoogleAds::V25::Services::ConversionValueRuleSetService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.mutate_conversion_value_rule_sets.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Ads::GoogleAds::V25::Services::ConversionValueRuleSetService::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "googleads.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, + ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the ConversionValueRuleSetService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `mutate_conversion_value_rule_sets` + # @return [::Gapic::Config::Method] + # + attr_reader :mutate_conversion_value_rule_sets + + # @private + def initialize parent_rpcs = nil + mutate_conversion_value_rule_sets_config = parent_rpcs.mutate_conversion_value_rule_sets if parent_rpcs.respond_to? :mutate_conversion_value_rule_sets + @mutate_conversion_value_rule_sets = ::Gapic::Config::Method.new mutate_conversion_value_rule_sets_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/conversion_value_rule_set_service/credentials.rb b/lib/google/ads/google_ads/v25/services/conversion_value_rule_set_service/credentials.rb new file mode 100644 index 000000000..11d4e8536 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/conversion_value_rule_set_service/credentials.rb @@ -0,0 +1,38 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Ads + module GoogleAds + module V25 + module Services + module ConversionValueRuleSetService + # Credentials for the ConversionValueRuleSetService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/adwords" + ] + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/conversion_value_rule_set_service/paths.rb b/lib/google/ads/google_ads/v25/services/conversion_value_rule_set_service/paths.rb new file mode 100644 index 000000000..ccf0c2988 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/conversion_value_rule_set_service/paths.rb @@ -0,0 +1,100 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Ads + module GoogleAds + module V25 + module Services + module ConversionValueRuleSetService + # Path helper methods for the ConversionValueRuleSetService API. + module Paths + ## + # Create a fully-qualified Campaign resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/campaigns/{campaign_id}` + # + # @param customer_id [String] + # @param campaign_id [String] + # + # @return [::String] + def campaign_path customer_id:, campaign_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/campaigns/#{campaign_id}" + end + + ## + # Create a fully-qualified ConversionValueRule resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/conversionValueRules/{conversion_value_rule_id}` + # + # @param customer_id [String] + # @param conversion_value_rule_id [String] + # + # @return [::String] + def conversion_value_rule_path customer_id:, conversion_value_rule_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/conversionValueRules/#{conversion_value_rule_id}" + end + + ## + # Create a fully-qualified ConversionValueRuleSet resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/conversionValueRuleSets/{conversion_value_rule_set_id}` + # + # @param customer_id [String] + # @param conversion_value_rule_set_id [String] + # + # @return [::String] + def conversion_value_rule_set_path customer_id:, conversion_value_rule_set_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/conversionValueRuleSets/#{conversion_value_rule_set_id}" + end + + ## + # Create a fully-qualified Customer resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}` + # + # @param customer_id [String] + # + # @return [::String] + def customer_path customer_id: + "customers/#{customer_id}" + end + + extend self + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/conversion_value_rule_set_service_pb.rb b/lib/google/ads/google_ads/v25/services/conversion_value_rule_set_service_pb.rb new file mode 100644 index 000000000..983defdb2 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/conversion_value_rule_set_service_pb.rb @@ -0,0 +1,35 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/services/conversion_value_rule_set_service.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/enums/response_content_type_pb' +require 'google/ads/google_ads/v25/resources/conversion_value_rule_set_pb' +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/field_mask_pb' +require 'google/rpc/status_pb' + + +descriptor_data = "\nIgoogle/ads/googleads/v25/services/conversion_value_rule_set_service.proto\x12!google.ads.googleads.v25.services\x1a:google/ads/googleads/v25/enums/response_content_type.proto\x1a\x42google/ads/googleads/v25/resources/conversion_value_rule_set.proto\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\x1a\x17google/rpc/status.proto\"\xb9\x02\n$MutateConversionValueRuleSetsRequest\x12\x18\n\x0b\x63ustomer_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12[\n\noperations\x18\x02 \x03(\x0b\x32\x42.google.ads.googleads.v25.services.ConversionValueRuleSetOperationB\x03\xe0\x41\x02\x12\x17\n\x0fpartial_failure\x18\x05 \x01(\x08\x12\x15\n\rvalidate_only\x18\x03 \x01(\x08\x12j\n\x15response_content_type\x18\x04 \x01(\x0e\x32K.google.ads.googleads.v25.enums.ResponseContentTypeEnum.ResponseContentType\"\xc3\x02\n\x1f\x43onversionValueRuleSetOperation\x12/\n\x0bupdate_mask\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\x12L\n\x06\x63reate\x18\x01 \x01(\x0b\x32:.google.ads.googleads.v25.resources.ConversionValueRuleSetH\x00\x12L\n\x06update\x18\x02 \x01(\x0b\x32:.google.ads.googleads.v25.resources.ConversionValueRuleSetH\x00\x12\x46\n\x06remove\x18\x03 \x01(\tB4\xfa\x41\x31\n/googleads.googleapis.com/ConversionValueRuleSetH\x00\x42\x0b\n\toperation\"\xb2\x01\n%MutateConversionValueRuleSetsResponse\x12V\n\x07results\x18\x01 \x03(\x0b\x32\x45.google.ads.googleads.v25.services.MutateConversionValueRuleSetResult\x12\x31\n\x15partial_failure_error\x18\x02 \x01(\x0b\x32\x12.google.rpc.Status\"\xd0\x01\n\"MutateConversionValueRuleSetResult\x12K\n\rresource_name\x18\x01 \x01(\tB4\xfa\x41\x31\n/googleads.googleapis.com/ConversionValueRuleSet\x12]\n\x19\x63onversion_value_rule_set\x18\x02 \x01(\x0b\x32:.google.ads.googleads.v25.resources.ConversionValueRuleSet2\xfe\x02\n\x1d\x43onversionValueRuleSetService\x12\x95\x02\n\x1dMutateConversionValueRuleSets\x12G.google.ads.googleads.v25.services.MutateConversionValueRuleSetsRequest\x1aH.google.ads.googleads.v25.services.MutateConversionValueRuleSetsResponse\"a\xda\x41\x16\x63ustomer_id,operations\x82\xd3\xe4\x93\x02\x42\"=/v25/customers/{customer_id=*}/conversionValueRuleSets:mutate:\x01*\x1a\x45\xca\x41\x18googleads.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/adwordsB\x8e\x02\n%com.google.ads.googleads.v25.servicesB\"ConversionValueRuleSetServiceProtoP\x01ZIgoogle.golang.org/genproto/googleapis/ads/googleads/v25/services;services\xa2\x02\x03GAA\xaa\x02!Google.Ads.GoogleAds.V25.Services\xca\x02!Google\\Ads\\GoogleAds\\V25\\Services\xea\x02%Google::Ads::GoogleAds::V25::Servicesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Services + MutateConversionValueRuleSetsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.MutateConversionValueRuleSetsRequest").msgclass + ConversionValueRuleSetOperation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.ConversionValueRuleSetOperation").msgclass + MutateConversionValueRuleSetsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.MutateConversionValueRuleSetsResponse").msgclass + MutateConversionValueRuleSetResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.MutateConversionValueRuleSetResult").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/conversion_value_rule_set_service_services_pb.rb b/lib/google/ads/google_ads/v25/services/conversion_value_rule_set_service_services_pb.rb new file mode 100644 index 000000000..b97d5772e --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/conversion_value_rule_set_service_services_pb.rb @@ -0,0 +1,50 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/ads/googleads/v25/services/conversion_value_rule_set_service.proto for package 'Google.Ads.GoogleAds.V25.Services' +# Original file comments: +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +require 'grpc' +require 'google/ads/google_ads/v25/services/conversion_value_rule_set_service_pb' + +module Google + module Ads + module GoogleAds + module V25 + module Services + module ConversionValueRuleSetService + # Proto file describing the Conversion Value Rule Set service. + # + # Service to manage conversion value rule sets. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.ads.googleads.v25.services.ConversionValueRuleSetService' + + # Creates, updates or removes conversion value rule sets. Operation statuses + # are returned. + rpc :MutateConversionValueRuleSets, ::Google::Ads::GoogleAds::V25::Services::MutateConversionValueRuleSetsRequest, ::Google::Ads::GoogleAds::V25::Services::MutateConversionValueRuleSetsResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/custom_audience_service.rb b/lib/google/ads/google_ads/v25/services/custom_audience_service.rb new file mode 100644 index 000000000..71ab5d440 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/custom_audience_service.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/ads/google_ads/version" + +require "google/ads/google_ads/v25/services/custom_audience_service/credentials" +require "google/ads/google_ads/v25/services/custom_audience_service/paths" +require "google/ads/google_ads/v25/services/custom_audience_service/client" + +module Google + module Ads + module GoogleAds + module V25 + module Services + ## + # Service to manage custom audiences. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/ads/google_ads/v25/services/custom_audience_service" + # client = ::Google::Ads::GoogleAds::V25::Services::CustomAudienceService::Client.new + # + module CustomAudienceService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "custom_audience_service", "helpers.rb" +require "google/ads/google_ads/v25/services/custom_audience_service/helpers" if ::File.file? helper_path diff --git a/lib/google/ads/google_ads/v25/services/custom_audience_service/client.rb b/lib/google/ads/google_ads/v25/services/custom_audience_service/client.rb new file mode 100644 index 000000000..1aeef8afb --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/custom_audience_service/client.rb @@ -0,0 +1,498 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# require "google/ads/google_ads/error" +require "google/ads/google_ads/v25/services/custom_audience_service_pb" + +module Google + module Ads + module GoogleAds + module V25 + module Services + module CustomAudienceService + ## + # Client for the CustomAudienceService service. + # + # Service to manage custom audiences. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "googleads.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :custom_audience_service_stub + + ## + # Configure the CustomAudienceService Client class. + # + # See {::Google::Ads::GoogleAds::V25::Services::CustomAudienceService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all CustomAudienceService clients + # ::Google::Ads::GoogleAds::V25::Services::CustomAudienceService::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + default_config = Client::Configuration.new + + default_config.timeout = 14_400.0 + default_config.retry_policy = { + initial_delay: 5.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the CustomAudienceService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Ads::GoogleAds::V25::Services::CustomAudienceService::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @custom_audience_service_stub.universe_domain + end + + ## + # Create a new CustomAudienceService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Ads::GoogleAds::V25::Services::CustomAudienceService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Ads::GoogleAds::V25::Services::CustomAudienceService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the CustomAudienceService client. + # @yieldparam config [Client::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/ads/google_ads/v25/services/custom_audience_service_services_pb" + + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @custom_audience_service_stub = ::Gapic::ServiceStub.new( + ::Google::Ads::GoogleAds::V25::Services::CustomAudienceService::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool, + logger: @config.logger + ) + + @custom_audience_service_stub.stub_logger&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @custom_audience_service_stub.logger + end + + # Service calls + + ## + # Creates or updates custom audiences. Operation statuses are returned. + # + # List of thrown errors: + # [AuthenticationError]() + # [AuthorizationError]() + # [CustomAudienceError]() + # [CustomInterestError]() + # [FieldError]() + # [FieldMaskError]() + # [HeaderError]() + # [InternalError]() + # [MutateError]() + # [OperationAccessDeniedError]() + # [PolicyViolationError]() + # [QuotaError]() + # [RequestError]() + # + # @overload mutate_custom_audiences(request, options = nil) + # Pass arguments to `mutate_custom_audiences` via a request object, either of type + # {::Google::Ads::GoogleAds::V25::Services::MutateCustomAudiencesRequest} or an equivalent Hash. + # + # @param request [::Google::Ads::GoogleAds::V25::Services::MutateCustomAudiencesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload mutate_custom_audiences(customer_id: nil, operations: nil, validate_only: nil) + # Pass arguments to `mutate_custom_audiences` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param customer_id [::String] + # Required. The ID of the customer whose custom audiences are being modified. + # @param operations [::Array<::Google::Ads::GoogleAds::V25::Services::CustomAudienceOperation, ::Hash>] + # Required. The list of operations to perform on individual custom audiences. + # @param validate_only [::Boolean] + # If true, the request is validated but not executed. Only errors are + # returned, not results. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Ads::GoogleAds::V25::Services::MutateCustomAudiencesResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Ads::GoogleAds::V25::Services::MutateCustomAudiencesResponse] + # + # @raise [Google::Ads::GoogleAds::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/ads/google_ads/v25/services" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Ads::GoogleAds::V25::Services::CustomAudienceService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Ads::GoogleAds::V25::Services::MutateCustomAudiencesRequest.new + # + # # Call the mutate_custom_audiences method. + # result = client.mutate_custom_audiences request + # + # # The returned object is of type Google::Ads::GoogleAds::V25::Services::MutateCustomAudiencesResponse. + # p result + # + def mutate_custom_audiences request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::GoogleAds::V25::Services::MutateCustomAudiencesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.mutate_custom_audiences.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Ads::GoogleAds::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.customer_id + header_params["customer_id"] = request.customer_id + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.mutate_custom_audiences.timeout, + metadata: metadata, + retry_policy: @config.rpcs.mutate_custom_audiences.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @custom_audience_service_stub.call_rpc :mutate_custom_audiences, request, + options: options do |response, operation| + yield response, operation if block_given? + end + # rescue GRPC::BadStatus => grpc_error + # raise Google::Ads::GoogleAds::Error.new grpc_error.message + end + + ## + # Configuration class for the CustomAudienceService API. + # + # This class represents the configuration for CustomAudienceService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Ads::GoogleAds::V25::Services::CustomAudienceService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # mutate_custom_audiences to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Ads::GoogleAds::V25::Services::CustomAudienceService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.mutate_custom_audiences.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Ads::GoogleAds::V25::Services::CustomAudienceService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.mutate_custom_audiences.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Ads::GoogleAds::V25::Services::CustomAudienceService::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "googleads.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, + ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the CustomAudienceService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `mutate_custom_audiences` + # @return [::Gapic::Config::Method] + # + attr_reader :mutate_custom_audiences + + # @private + def initialize parent_rpcs = nil + mutate_custom_audiences_config = parent_rpcs.mutate_custom_audiences if parent_rpcs.respond_to? :mutate_custom_audiences + @mutate_custom_audiences = ::Gapic::Config::Method.new mutate_custom_audiences_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/custom_audience_service/credentials.rb b/lib/google/ads/google_ads/v25/services/custom_audience_service/credentials.rb new file mode 100644 index 000000000..78066cdd0 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/custom_audience_service/credentials.rb @@ -0,0 +1,38 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Ads + module GoogleAds + module V25 + module Services + module CustomAudienceService + # Credentials for the CustomAudienceService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/adwords" + ] + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/custom_audience_service/paths.rb b/lib/google/ads/google_ads/v25/services/custom_audience_service/paths.rb new file mode 100644 index 000000000..f1c6814a7 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/custom_audience_service/paths.rb @@ -0,0 +1,52 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Ads + module GoogleAds + module V25 + module Services + module CustomAudienceService + # Path helper methods for the CustomAudienceService API. + module Paths + ## + # Create a fully-qualified CustomAudience resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/customAudiences/{custom_audience_id}` + # + # @param customer_id [String] + # @param custom_audience_id [String] + # + # @return [::String] + def custom_audience_path customer_id:, custom_audience_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/customAudiences/#{custom_audience_id}" + end + + extend self + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/custom_audience_service_pb.rb b/lib/google/ads/google_ads/v25/services/custom_audience_service_pb.rb new file mode 100644 index 000000000..1281e7254 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/custom_audience_service_pb.rb @@ -0,0 +1,33 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/services/custom_audience_service.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/resources/custom_audience_pb' +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/field_mask_pb' + + +descriptor_data = "\n?google/ads/googleads/v25/services/custom_audience_service.proto\x12!google.ads.googleads.v25.services\x1a\x38google/ads/googleads/v25/resources/custom_audience.proto\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\"\xa4\x01\n\x1cMutateCustomAudiencesRequest\x12\x18\n\x0b\x63ustomer_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12S\n\noperations\x18\x02 \x03(\x0b\x32:.google.ads.googleads.v25.services.CustomAudienceOperationB\x03\xe0\x41\x02\x12\x15\n\rvalidate_only\x18\x03 \x01(\x08\"\xa3\x02\n\x17\x43ustomAudienceOperation\x12/\n\x0bupdate_mask\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\x12\x44\n\x06\x63reate\x18\x01 \x01(\x0b\x32\x32.google.ads.googleads.v25.resources.CustomAudienceH\x00\x12\x44\n\x06update\x18\x02 \x01(\x0b\x32\x32.google.ads.googleads.v25.resources.CustomAudienceH\x00\x12>\n\x06remove\x18\x03 \x01(\tB,\xfa\x41)\n\'googleads.googleapis.com/CustomAudienceH\x00\x42\x0b\n\toperation\"o\n\x1dMutateCustomAudiencesResponse\x12N\n\x07results\x18\x01 \x03(\x0b\x32=.google.ads.googleads.v25.services.MutateCustomAudienceResult\"a\n\x1aMutateCustomAudienceResult\x12\x43\n\rresource_name\x18\x01 \x01(\tB,\xfa\x41)\n\'googleads.googleapis.com/CustomAudience2\xd6\x02\n\x15\x43ustomAudienceService\x12\xf5\x01\n\x15MutateCustomAudiences\x12?.google.ads.googleads.v25.services.MutateCustomAudiencesRequest\x1a@.google.ads.googleads.v25.services.MutateCustomAudiencesResponse\"Y\xda\x41\x16\x63ustomer_id,operations\x82\xd3\xe4\x93\x02:\"5/v25/customers/{customer_id=*}/customAudiences:mutate:\x01*\x1a\x45\xca\x41\x18googleads.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/adwordsB\x86\x02\n%com.google.ads.googleads.v25.servicesB\x1a\x43ustomAudienceServiceProtoP\x01ZIgoogle.golang.org/genproto/googleapis/ads/googleads/v25/services;services\xa2\x02\x03GAA\xaa\x02!Google.Ads.GoogleAds.V25.Services\xca\x02!Google\\Ads\\GoogleAds\\V25\\Services\xea\x02%Google::Ads::GoogleAds::V25::Servicesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Services + MutateCustomAudiencesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.MutateCustomAudiencesRequest").msgclass + CustomAudienceOperation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.CustomAudienceOperation").msgclass + MutateCustomAudiencesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.MutateCustomAudiencesResponse").msgclass + MutateCustomAudienceResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.MutateCustomAudienceResult").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/custom_audience_service_services_pb.rb b/lib/google/ads/google_ads/v25/services/custom_audience_service_services_pb.rb new file mode 100644 index 000000000..a2d2404e9 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/custom_audience_service_services_pb.rb @@ -0,0 +1,64 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/ads/googleads/v25/services/custom_audience_service.proto for package 'Google.Ads.GoogleAds.V25.Services' +# Original file comments: +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +require 'grpc' +require 'google/ads/google_ads/v25/services/custom_audience_service_pb' + +module Google + module Ads + module GoogleAds + module V25 + module Services + module CustomAudienceService + # Proto file describing the Custom Audience service. + # + # Service to manage custom audiences. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.ads.googleads.v25.services.CustomAudienceService' + + # Creates or updates custom audiences. Operation statuses are returned. + # + # List of thrown errors: + # [AuthenticationError]() + # [AuthorizationError]() + # [CustomAudienceError]() + # [CustomInterestError]() + # [FieldError]() + # [FieldMaskError]() + # [HeaderError]() + # [InternalError]() + # [MutateError]() + # [OperationAccessDeniedError]() + # [PolicyViolationError]() + # [QuotaError]() + # [RequestError]() + rpc :MutateCustomAudiences, ::Google::Ads::GoogleAds::V25::Services::MutateCustomAudiencesRequest, ::Google::Ads::GoogleAds::V25::Services::MutateCustomAudiencesResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/custom_conversion_goal_service.rb b/lib/google/ads/google_ads/v25/services/custom_conversion_goal_service.rb new file mode 100644 index 000000000..e63c9198f --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/custom_conversion_goal_service.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/ads/google_ads/version" + +require "google/ads/google_ads/v25/services/custom_conversion_goal_service/credentials" +require "google/ads/google_ads/v25/services/custom_conversion_goal_service/paths" +require "google/ads/google_ads/v25/services/custom_conversion_goal_service/client" + +module Google + module Ads + module GoogleAds + module V25 + module Services + ## + # Service to manage custom conversion goal. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/ads/google_ads/v25/services/custom_conversion_goal_service" + # client = ::Google::Ads::GoogleAds::V25::Services::CustomConversionGoalService::Client.new + # + module CustomConversionGoalService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "custom_conversion_goal_service", "helpers.rb" +require "google/ads/google_ads/v25/services/custom_conversion_goal_service/helpers" if ::File.file? helper_path diff --git a/lib/google/ads/google_ads/v25/services/custom_conversion_goal_service/client.rb b/lib/google/ads/google_ads/v25/services/custom_conversion_goal_service/client.rb new file mode 100644 index 000000000..d38451cd3 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/custom_conversion_goal_service/client.rb @@ -0,0 +1,489 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# require "google/ads/google_ads/error" +require "google/ads/google_ads/v25/services/custom_conversion_goal_service_pb" + +module Google + module Ads + module GoogleAds + module V25 + module Services + module CustomConversionGoalService + ## + # Client for the CustomConversionGoalService service. + # + # Service to manage custom conversion goal. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "googleads.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :custom_conversion_goal_service_stub + + ## + # Configure the CustomConversionGoalService Client class. + # + # See {::Google::Ads::GoogleAds::V25::Services::CustomConversionGoalService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all CustomConversionGoalService clients + # ::Google::Ads::GoogleAds::V25::Services::CustomConversionGoalService::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + default_config = Client::Configuration.new + + default_config.timeout = 14_400.0 + default_config.retry_policy = { + initial_delay: 5.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the CustomConversionGoalService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Ads::GoogleAds::V25::Services::CustomConversionGoalService::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @custom_conversion_goal_service_stub.universe_domain + end + + ## + # Create a new CustomConversionGoalService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Ads::GoogleAds::V25::Services::CustomConversionGoalService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Ads::GoogleAds::V25::Services::CustomConversionGoalService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the CustomConversionGoalService client. + # @yieldparam config [Client::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/ads/google_ads/v25/services/custom_conversion_goal_service_services_pb" + + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @custom_conversion_goal_service_stub = ::Gapic::ServiceStub.new( + ::Google::Ads::GoogleAds::V25::Services::CustomConversionGoalService::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool, + logger: @config.logger + ) + + @custom_conversion_goal_service_stub.stub_logger&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @custom_conversion_goal_service_stub.logger + end + + # Service calls + + ## + # Creates, updates or removes custom conversion goals. Operation statuses + # are returned. + # + # @overload mutate_custom_conversion_goals(request, options = nil) + # Pass arguments to `mutate_custom_conversion_goals` via a request object, either of type + # {::Google::Ads::GoogleAds::V25::Services::MutateCustomConversionGoalsRequest} or an equivalent Hash. + # + # @param request [::Google::Ads::GoogleAds::V25::Services::MutateCustomConversionGoalsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload mutate_custom_conversion_goals(customer_id: nil, operations: nil, validate_only: nil, response_content_type: nil) + # Pass arguments to `mutate_custom_conversion_goals` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param customer_id [::String] + # Required. The ID of the customer whose custom conversion goals are being + # modified. + # @param operations [::Array<::Google::Ads::GoogleAds::V25::Services::CustomConversionGoalOperation, ::Hash>] + # Required. The list of operations to perform on individual custom conversion + # goal. + # @param validate_only [::Boolean] + # If true, the request is validated but not executed. Only errors are + # returned, not results. + # @param response_content_type [::Google::Ads::GoogleAds::V25::Enums::ResponseContentTypeEnum::ResponseContentType] + # The response content type setting. Determines whether the mutable resource + # or just the resource name should be returned post mutation. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Ads::GoogleAds::V25::Services::MutateCustomConversionGoalsResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Ads::GoogleAds::V25::Services::MutateCustomConversionGoalsResponse] + # + # @raise [Google::Ads::GoogleAds::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/ads/google_ads/v25/services" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Ads::GoogleAds::V25::Services::CustomConversionGoalService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Ads::GoogleAds::V25::Services::MutateCustomConversionGoalsRequest.new + # + # # Call the mutate_custom_conversion_goals method. + # result = client.mutate_custom_conversion_goals request + # + # # The returned object is of type Google::Ads::GoogleAds::V25::Services::MutateCustomConversionGoalsResponse. + # p result + # + def mutate_custom_conversion_goals request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::GoogleAds::V25::Services::MutateCustomConversionGoalsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.mutate_custom_conversion_goals.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Ads::GoogleAds::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.customer_id + header_params["customer_id"] = request.customer_id + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.mutate_custom_conversion_goals.timeout, + metadata: metadata, + retry_policy: @config.rpcs.mutate_custom_conversion_goals.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @custom_conversion_goal_service_stub.call_rpc :mutate_custom_conversion_goals, request, + options: options do |response, operation| + yield response, operation if block_given? + end + # rescue GRPC::BadStatus => grpc_error + # raise Google::Ads::GoogleAds::Error.new grpc_error.message + end + + ## + # Configuration class for the CustomConversionGoalService API. + # + # This class represents the configuration for CustomConversionGoalService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Ads::GoogleAds::V25::Services::CustomConversionGoalService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # mutate_custom_conversion_goals to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Ads::GoogleAds::V25::Services::CustomConversionGoalService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.mutate_custom_conversion_goals.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Ads::GoogleAds::V25::Services::CustomConversionGoalService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.mutate_custom_conversion_goals.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Ads::GoogleAds::V25::Services::CustomConversionGoalService::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "googleads.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, + ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the CustomConversionGoalService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `mutate_custom_conversion_goals` + # @return [::Gapic::Config::Method] + # + attr_reader :mutate_custom_conversion_goals + + # @private + def initialize parent_rpcs = nil + mutate_custom_conversion_goals_config = parent_rpcs.mutate_custom_conversion_goals if parent_rpcs.respond_to? :mutate_custom_conversion_goals + @mutate_custom_conversion_goals = ::Gapic::Config::Method.new mutate_custom_conversion_goals_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/custom_conversion_goal_service/credentials.rb b/lib/google/ads/google_ads/v25/services/custom_conversion_goal_service/credentials.rb new file mode 100644 index 000000000..a087e70d4 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/custom_conversion_goal_service/credentials.rb @@ -0,0 +1,38 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Ads + module GoogleAds + module V25 + module Services + module CustomConversionGoalService + # Credentials for the CustomConversionGoalService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/adwords" + ] + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/custom_conversion_goal_service/paths.rb b/lib/google/ads/google_ads/v25/services/custom_conversion_goal_service/paths.rb new file mode 100644 index 000000000..e5bab5fcd --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/custom_conversion_goal_service/paths.rb @@ -0,0 +1,69 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Ads + module GoogleAds + module V25 + module Services + module CustomConversionGoalService + # Path helper methods for the CustomConversionGoalService API. + module Paths + ## + # Create a fully-qualified ConversionAction resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/conversionActions/{conversion_action_id}` + # + # @param customer_id [String] + # @param conversion_action_id [String] + # + # @return [::String] + def conversion_action_path customer_id:, conversion_action_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/conversionActions/#{conversion_action_id}" + end + + ## + # Create a fully-qualified CustomConversionGoal resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/customConversionGoals/{goal_id}` + # + # @param customer_id [String] + # @param goal_id [String] + # + # @return [::String] + def custom_conversion_goal_path customer_id:, goal_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/customConversionGoals/#{goal_id}" + end + + extend self + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/custom_conversion_goal_service_pb.rb b/lib/google/ads/google_ads/v25/services/custom_conversion_goal_service_pb.rb new file mode 100644 index 000000000..afcfe34fd --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/custom_conversion_goal_service_pb.rb @@ -0,0 +1,34 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/services/custom_conversion_goal_service.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/enums/response_content_type_pb' +require 'google/ads/google_ads/v25/resources/custom_conversion_goal_pb' +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/field_mask_pb' + + +descriptor_data = "\nFgoogle/ads/googleads/v25/services/custom_conversion_goal_service.proto\x12!google.ads.googleads.v25.services\x1a:google/ads/googleads/v25/enums/response_content_type.proto\x1a?google/ads/googleads/v25/resources/custom_conversion_goal.proto\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\"\x9c\x02\n\"MutateCustomConversionGoalsRequest\x12\x18\n\x0b\x63ustomer_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12Y\n\noperations\x18\x02 \x03(\x0b\x32@.google.ads.googleads.v25.services.CustomConversionGoalOperationB\x03\xe0\x41\x02\x12\x15\n\rvalidate_only\x18\x03 \x01(\x08\x12j\n\x15response_content_type\x18\x04 \x01(\x0e\x32K.google.ads.googleads.v25.enums.ResponseContentTypeEnum.ResponseContentType\"\xbb\x02\n\x1d\x43ustomConversionGoalOperation\x12/\n\x0bupdate_mask\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\x12J\n\x06\x63reate\x18\x01 \x01(\x0b\x32\x38.google.ads.googleads.v25.resources.CustomConversionGoalH\x00\x12J\n\x06update\x18\x02 \x01(\x0b\x32\x38.google.ads.googleads.v25.resources.CustomConversionGoalH\x00\x12\x44\n\x06remove\x18\x03 \x01(\tB2\xfa\x41/\n-googleads.googleapis.com/CustomConversionGoalH\x00\x42\x0b\n\toperation\"{\n#MutateCustomConversionGoalsResponse\x12T\n\x07results\x18\x01 \x03(\x0b\x32\x43.google.ads.googleads.v25.services.MutateCustomConversionGoalResult\"\xc7\x01\n MutateCustomConversionGoalResult\x12I\n\rresource_name\x18\x01 \x01(\tB2\xfa\x41/\n-googleads.googleapis.com/CustomConversionGoal\x12X\n\x16\x63ustom_conversion_goal\x18\x02 \x01(\x0b\x32\x38.google.ads.googleads.v25.resources.CustomConversionGoal2\xf4\x02\n\x1b\x43ustomConversionGoalService\x12\x8d\x02\n\x1bMutateCustomConversionGoals\x12\x45.google.ads.googleads.v25.services.MutateCustomConversionGoalsRequest\x1a\x46.google.ads.googleads.v25.services.MutateCustomConversionGoalsResponse\"_\xda\x41\x16\x63ustomer_id,operations\x82\xd3\xe4\x93\x02@\";/v25/customers/{customer_id=*}/customConversionGoals:mutate:\x01*\x1a\x45\xca\x41\x18googleads.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/adwordsB\x8c\x02\n%com.google.ads.googleads.v25.servicesB CustomConversionGoalServiceProtoP\x01ZIgoogle.golang.org/genproto/googleapis/ads/googleads/v25/services;services\xa2\x02\x03GAA\xaa\x02!Google.Ads.GoogleAds.V25.Services\xca\x02!Google\\Ads\\GoogleAds\\V25\\Services\xea\x02%Google::Ads::GoogleAds::V25::Servicesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Services + MutateCustomConversionGoalsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.MutateCustomConversionGoalsRequest").msgclass + CustomConversionGoalOperation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.CustomConversionGoalOperation").msgclass + MutateCustomConversionGoalsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.MutateCustomConversionGoalsResponse").msgclass + MutateCustomConversionGoalResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.MutateCustomConversionGoalResult").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/custom_conversion_goal_service_services_pb.rb b/lib/google/ads/google_ads/v25/services/custom_conversion_goal_service_services_pb.rb new file mode 100644 index 000000000..5bc863237 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/custom_conversion_goal_service_services_pb.rb @@ -0,0 +1,50 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/ads/googleads/v25/services/custom_conversion_goal_service.proto for package 'Google.Ads.GoogleAds.V25.Services' +# Original file comments: +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +require 'grpc' +require 'google/ads/google_ads/v25/services/custom_conversion_goal_service_pb' + +module Google + module Ads + module GoogleAds + module V25 + module Services + module CustomConversionGoalService + # Proto file describing the CustomConversionGoal service. + # + # Service to manage custom conversion goal. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.ads.googleads.v25.services.CustomConversionGoalService' + + # Creates, updates or removes custom conversion goals. Operation statuses + # are returned. + rpc :MutateCustomConversionGoals, ::Google::Ads::GoogleAds::V25::Services::MutateCustomConversionGoalsRequest, ::Google::Ads::GoogleAds::V25::Services::MutateCustomConversionGoalsResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/custom_interest_service.rb b/lib/google/ads/google_ads/v25/services/custom_interest_service.rb new file mode 100644 index 000000000..b62cd34bc --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/custom_interest_service.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/ads/google_ads/version" + +require "google/ads/google_ads/v25/services/custom_interest_service/credentials" +require "google/ads/google_ads/v25/services/custom_interest_service/paths" +require "google/ads/google_ads/v25/services/custom_interest_service/client" + +module Google + module Ads + module GoogleAds + module V25 + module Services + ## + # Service to manage custom interests. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/ads/google_ads/v25/services/custom_interest_service" + # client = ::Google::Ads::GoogleAds::V25::Services::CustomInterestService::Client.new + # + module CustomInterestService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "custom_interest_service", "helpers.rb" +require "google/ads/google_ads/v25/services/custom_interest_service/helpers" if ::File.file? helper_path diff --git a/lib/google/ads/google_ads/v25/services/custom_interest_service/client.rb b/lib/google/ads/google_ads/v25/services/custom_interest_service/client.rb new file mode 100644 index 000000000..5f0445498 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/custom_interest_service/client.rb @@ -0,0 +1,496 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# require "google/ads/google_ads/error" +require "google/ads/google_ads/v25/services/custom_interest_service_pb" + +module Google + module Ads + module GoogleAds + module V25 + module Services + module CustomInterestService + ## + # Client for the CustomInterestService service. + # + # Service to manage custom interests. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "googleads.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :custom_interest_service_stub + + ## + # Configure the CustomInterestService Client class. + # + # See {::Google::Ads::GoogleAds::V25::Services::CustomInterestService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all CustomInterestService clients + # ::Google::Ads::GoogleAds::V25::Services::CustomInterestService::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + default_config = Client::Configuration.new + + default_config.timeout = 14_400.0 + default_config.retry_policy = { + initial_delay: 5.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the CustomInterestService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Ads::GoogleAds::V25::Services::CustomInterestService::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @custom_interest_service_stub.universe_domain + end + + ## + # Create a new CustomInterestService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Ads::GoogleAds::V25::Services::CustomInterestService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Ads::GoogleAds::V25::Services::CustomInterestService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the CustomInterestService client. + # @yieldparam config [Client::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/ads/google_ads/v25/services/custom_interest_service_services_pb" + + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @custom_interest_service_stub = ::Gapic::ServiceStub.new( + ::Google::Ads::GoogleAds::V25::Services::CustomInterestService::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool, + logger: @config.logger + ) + + @custom_interest_service_stub.stub_logger&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @custom_interest_service_stub.logger + end + + # Service calls + + ## + # Creates or updates custom interests. Operation statuses are returned. + # + # List of thrown errors: + # [AuthenticationError]() + # [AuthorizationError]() + # [CriterionError]() + # [CustomInterestError]() + # [HeaderError]() + # [InternalError]() + # [MutateError]() + # [PolicyViolationError]() + # [QuotaError]() + # [RequestError]() + # [StringLengthError]() + # + # @overload mutate_custom_interests(request, options = nil) + # Pass arguments to `mutate_custom_interests` via a request object, either of type + # {::Google::Ads::GoogleAds::V25::Services::MutateCustomInterestsRequest} or an equivalent Hash. + # + # @param request [::Google::Ads::GoogleAds::V25::Services::MutateCustomInterestsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload mutate_custom_interests(customer_id: nil, operations: nil, validate_only: nil) + # Pass arguments to `mutate_custom_interests` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param customer_id [::String] + # Required. The ID of the customer whose custom interests are being modified. + # @param operations [::Array<::Google::Ads::GoogleAds::V25::Services::CustomInterestOperation, ::Hash>] + # Required. The list of operations to perform on individual custom interests. + # @param validate_only [::Boolean] + # If true, the request is validated but not executed. Only errors are + # returned, not results. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Ads::GoogleAds::V25::Services::MutateCustomInterestsResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Ads::GoogleAds::V25::Services::MutateCustomInterestsResponse] + # + # @raise [Google::Ads::GoogleAds::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/ads/google_ads/v25/services" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Ads::GoogleAds::V25::Services::CustomInterestService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Ads::GoogleAds::V25::Services::MutateCustomInterestsRequest.new + # + # # Call the mutate_custom_interests method. + # result = client.mutate_custom_interests request + # + # # The returned object is of type Google::Ads::GoogleAds::V25::Services::MutateCustomInterestsResponse. + # p result + # + def mutate_custom_interests request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::GoogleAds::V25::Services::MutateCustomInterestsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.mutate_custom_interests.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Ads::GoogleAds::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.customer_id + header_params["customer_id"] = request.customer_id + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.mutate_custom_interests.timeout, + metadata: metadata, + retry_policy: @config.rpcs.mutate_custom_interests.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @custom_interest_service_stub.call_rpc :mutate_custom_interests, request, + options: options do |response, operation| + yield response, operation if block_given? + end + # rescue GRPC::BadStatus => grpc_error + # raise Google::Ads::GoogleAds::Error.new grpc_error.message + end + + ## + # Configuration class for the CustomInterestService API. + # + # This class represents the configuration for CustomInterestService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Ads::GoogleAds::V25::Services::CustomInterestService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # mutate_custom_interests to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Ads::GoogleAds::V25::Services::CustomInterestService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.mutate_custom_interests.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Ads::GoogleAds::V25::Services::CustomInterestService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.mutate_custom_interests.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Ads::GoogleAds::V25::Services::CustomInterestService::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "googleads.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, + ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the CustomInterestService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `mutate_custom_interests` + # @return [::Gapic::Config::Method] + # + attr_reader :mutate_custom_interests + + # @private + def initialize parent_rpcs = nil + mutate_custom_interests_config = parent_rpcs.mutate_custom_interests if parent_rpcs.respond_to? :mutate_custom_interests + @mutate_custom_interests = ::Gapic::Config::Method.new mutate_custom_interests_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/custom_interest_service/credentials.rb b/lib/google/ads/google_ads/v25/services/custom_interest_service/credentials.rb new file mode 100644 index 000000000..33178e940 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/custom_interest_service/credentials.rb @@ -0,0 +1,38 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Ads + module GoogleAds + module V25 + module Services + module CustomInterestService + # Credentials for the CustomInterestService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/adwords" + ] + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/custom_interest_service/paths.rb b/lib/google/ads/google_ads/v25/services/custom_interest_service/paths.rb new file mode 100644 index 000000000..8eca15c34 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/custom_interest_service/paths.rb @@ -0,0 +1,52 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Ads + module GoogleAds + module V25 + module Services + module CustomInterestService + # Path helper methods for the CustomInterestService API. + module Paths + ## + # Create a fully-qualified CustomInterest resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/customInterests/{custom_interest_id}` + # + # @param customer_id [String] + # @param custom_interest_id [String] + # + # @return [::String] + def custom_interest_path customer_id:, custom_interest_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/customInterests/#{custom_interest_id}" + end + + extend self + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/custom_interest_service_pb.rb b/lib/google/ads/google_ads/v25/services/custom_interest_service_pb.rb new file mode 100644 index 000000000..e014ea3fe --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/custom_interest_service_pb.rb @@ -0,0 +1,33 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/services/custom_interest_service.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/resources/custom_interest_pb' +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/field_mask_pb' + + +descriptor_data = "\n?google/ads/googleads/v25/services/custom_interest_service.proto\x12!google.ads.googleads.v25.services\x1a\x38google/ads/googleads/v25/resources/custom_interest.proto\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\"\xa4\x01\n\x1cMutateCustomInterestsRequest\x12\x18\n\x0b\x63ustomer_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12S\n\noperations\x18\x02 \x03(\x0b\x32:.google.ads.googleads.v25.services.CustomInterestOperationB\x03\xe0\x41\x02\x12\x15\n\rvalidate_only\x18\x04 \x01(\x08\"\xe3\x01\n\x17\x43ustomInterestOperation\x12/\n\x0bupdate_mask\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\x12\x44\n\x06\x63reate\x18\x01 \x01(\x0b\x32\x32.google.ads.googleads.v25.resources.CustomInterestH\x00\x12\x44\n\x06update\x18\x02 \x01(\x0b\x32\x32.google.ads.googleads.v25.resources.CustomInterestH\x00\x42\x0b\n\toperation\"o\n\x1dMutateCustomInterestsResponse\x12N\n\x07results\x18\x02 \x03(\x0b\x32=.google.ads.googleads.v25.services.MutateCustomInterestResult\"a\n\x1aMutateCustomInterestResult\x12\x43\n\rresource_name\x18\x01 \x01(\tB,\xfa\x41)\n\'googleads.googleapis.com/CustomInterest2\xd6\x02\n\x15\x43ustomInterestService\x12\xf5\x01\n\x15MutateCustomInterests\x12?.google.ads.googleads.v25.services.MutateCustomInterestsRequest\x1a@.google.ads.googleads.v25.services.MutateCustomInterestsResponse\"Y\xda\x41\x16\x63ustomer_id,operations\x82\xd3\xe4\x93\x02:\"5/v25/customers/{customer_id=*}/customInterests:mutate:\x01*\x1a\x45\xca\x41\x18googleads.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/adwordsB\x86\x02\n%com.google.ads.googleads.v25.servicesB\x1a\x43ustomInterestServiceProtoP\x01ZIgoogle.golang.org/genproto/googleapis/ads/googleads/v25/services;services\xa2\x02\x03GAA\xaa\x02!Google.Ads.GoogleAds.V25.Services\xca\x02!Google\\Ads\\GoogleAds\\V25\\Services\xea\x02%Google::Ads::GoogleAds::V25::Servicesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Services + MutateCustomInterestsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.MutateCustomInterestsRequest").msgclass + CustomInterestOperation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.CustomInterestOperation").msgclass + MutateCustomInterestsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.MutateCustomInterestsResponse").msgclass + MutateCustomInterestResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.MutateCustomInterestResult").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/custom_interest_service_services_pb.rb b/lib/google/ads/google_ads/v25/services/custom_interest_service_services_pb.rb new file mode 100644 index 000000000..667add5ef --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/custom_interest_service_services_pb.rb @@ -0,0 +1,62 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/ads/googleads/v25/services/custom_interest_service.proto for package 'Google.Ads.GoogleAds.V25.Services' +# Original file comments: +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +require 'grpc' +require 'google/ads/google_ads/v25/services/custom_interest_service_pb' + +module Google + module Ads + module GoogleAds + module V25 + module Services + module CustomInterestService + # Proto file describing the Custom Interest service. + # + # Service to manage custom interests. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.ads.googleads.v25.services.CustomInterestService' + + # Creates or updates custom interests. Operation statuses are returned. + # + # List of thrown errors: + # [AuthenticationError]() + # [AuthorizationError]() + # [CriterionError]() + # [CustomInterestError]() + # [HeaderError]() + # [InternalError]() + # [MutateError]() + # [PolicyViolationError]() + # [QuotaError]() + # [RequestError]() + # [StringLengthError]() + rpc :MutateCustomInterests, ::Google::Ads::GoogleAds::V25::Services::MutateCustomInterestsRequest, ::Google::Ads::GoogleAds::V25::Services::MutateCustomInterestsResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/customer_asset_service.rb b/lib/google/ads/google_ads/v25/services/customer_asset_service.rb new file mode 100644 index 000000000..6e8c171a8 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/customer_asset_service.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/ads/google_ads/version" + +require "google/ads/google_ads/v25/services/customer_asset_service/credentials" +require "google/ads/google_ads/v25/services/customer_asset_service/paths" +require "google/ads/google_ads/v25/services/customer_asset_service/client" + +module Google + module Ads + module GoogleAds + module V25 + module Services + ## + # Service to manage customer assets. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/ads/google_ads/v25/services/customer_asset_service" + # client = ::Google::Ads::GoogleAds::V25::Services::CustomerAssetService::Client.new + # + module CustomerAssetService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "customer_asset_service", "helpers.rb" +require "google/ads/google_ads/v25/services/customer_asset_service/helpers" if ::File.file? helper_path diff --git a/lib/google/ads/google_ads/v25/services/customer_asset_service/client.rb b/lib/google/ads/google_ads/v25/services/customer_asset_service/client.rb new file mode 100644 index 000000000..05460db91 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/customer_asset_service/client.rb @@ -0,0 +1,503 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# require "google/ads/google_ads/error" +require "google/ads/google_ads/v25/services/customer_asset_service_pb" + +module Google + module Ads + module GoogleAds + module V25 + module Services + module CustomerAssetService + ## + # Client for the CustomerAssetService service. + # + # Service to manage customer assets. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "googleads.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :customer_asset_service_stub + + ## + # Configure the CustomerAssetService Client class. + # + # See {::Google::Ads::GoogleAds::V25::Services::CustomerAssetService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all CustomerAssetService clients + # ::Google::Ads::GoogleAds::V25::Services::CustomerAssetService::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + default_config = Client::Configuration.new + + default_config.timeout = 14_400.0 + default_config.retry_policy = { + initial_delay: 5.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the CustomerAssetService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Ads::GoogleAds::V25::Services::CustomerAssetService::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @customer_asset_service_stub.universe_domain + end + + ## + # Create a new CustomerAssetService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Ads::GoogleAds::V25::Services::CustomerAssetService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Ads::GoogleAds::V25::Services::CustomerAssetService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the CustomerAssetService client. + # @yieldparam config [Client::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/ads/google_ads/v25/services/customer_asset_service_services_pb" + + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @customer_asset_service_stub = ::Gapic::ServiceStub.new( + ::Google::Ads::GoogleAds::V25::Services::CustomerAssetService::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool, + logger: @config.logger + ) + + @customer_asset_service_stub.stub_logger&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @customer_asset_service_stub.logger + end + + # Service calls + + ## + # Creates, updates, or removes customer assets. Operation statuses are + # returned. + # + # List of thrown errors: + # [AssetLinkError]() + # [AuthenticationError]() + # [AuthorizationError]() + # [FieldError]() + # [HeaderError]() + # [InternalError]() + # [MutateError]() + # [QuotaError]() + # [RequestError]() + # + # @overload mutate_customer_assets(request, options = nil) + # Pass arguments to `mutate_customer_assets` via a request object, either of type + # {::Google::Ads::GoogleAds::V25::Services::MutateCustomerAssetsRequest} or an equivalent Hash. + # + # @param request [::Google::Ads::GoogleAds::V25::Services::MutateCustomerAssetsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload mutate_customer_assets(customer_id: nil, operations: nil, partial_failure: nil, validate_only: nil, response_content_type: nil) + # Pass arguments to `mutate_customer_assets` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param customer_id [::String] + # Required. The ID of the customer whose customer assets are being modified. + # @param operations [::Array<::Google::Ads::GoogleAds::V25::Services::CustomerAssetOperation, ::Hash>] + # Required. The list of operations to perform on individual customer assets. + # @param partial_failure [::Boolean] + # 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. + # @param validate_only [::Boolean] + # If true, the request is validated but not executed. Only errors are + # returned, not results. + # @param response_content_type [::Google::Ads::GoogleAds::V25::Enums::ResponseContentTypeEnum::ResponseContentType] + # The response content type setting. Determines whether the mutable resource + # or just the resource name should be returned post mutation. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Ads::GoogleAds::V25::Services::MutateCustomerAssetsResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Ads::GoogleAds::V25::Services::MutateCustomerAssetsResponse] + # + # @raise [Google::Ads::GoogleAds::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/ads/google_ads/v25/services" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Ads::GoogleAds::V25::Services::CustomerAssetService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Ads::GoogleAds::V25::Services::MutateCustomerAssetsRequest.new + # + # # Call the mutate_customer_assets method. + # result = client.mutate_customer_assets request + # + # # The returned object is of type Google::Ads::GoogleAds::V25::Services::MutateCustomerAssetsResponse. + # p result + # + def mutate_customer_assets request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::GoogleAds::V25::Services::MutateCustomerAssetsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.mutate_customer_assets.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Ads::GoogleAds::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.customer_id + header_params["customer_id"] = request.customer_id + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.mutate_customer_assets.timeout, + metadata: metadata, + retry_policy: @config.rpcs.mutate_customer_assets.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @customer_asset_service_stub.call_rpc :mutate_customer_assets, request, + options: options do |response, operation| + yield response, operation if block_given? + end + # rescue GRPC::BadStatus => grpc_error + # raise Google::Ads::GoogleAds::Error.new grpc_error.message + end + + ## + # Configuration class for the CustomerAssetService API. + # + # This class represents the configuration for CustomerAssetService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Ads::GoogleAds::V25::Services::CustomerAssetService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # mutate_customer_assets to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Ads::GoogleAds::V25::Services::CustomerAssetService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.mutate_customer_assets.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Ads::GoogleAds::V25::Services::CustomerAssetService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.mutate_customer_assets.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Ads::GoogleAds::V25::Services::CustomerAssetService::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "googleads.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, + ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the CustomerAssetService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `mutate_customer_assets` + # @return [::Gapic::Config::Method] + # + attr_reader :mutate_customer_assets + + # @private + def initialize parent_rpcs = nil + mutate_customer_assets_config = parent_rpcs.mutate_customer_assets if parent_rpcs.respond_to? :mutate_customer_assets + @mutate_customer_assets = ::Gapic::Config::Method.new mutate_customer_assets_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/customer_asset_service/credentials.rb b/lib/google/ads/google_ads/v25/services/customer_asset_service/credentials.rb new file mode 100644 index 000000000..572e78afd --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/customer_asset_service/credentials.rb @@ -0,0 +1,38 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Ads + module GoogleAds + module V25 + module Services + module CustomerAssetService + # Credentials for the CustomerAssetService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/adwords" + ] + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/customer_asset_service/paths.rb b/lib/google/ads/google_ads/v25/services/customer_asset_service/paths.rb new file mode 100644 index 000000000..8e2493066 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/customer_asset_service/paths.rb @@ -0,0 +1,71 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Ads + module GoogleAds + module V25 + module Services + module CustomerAssetService + # Path helper methods for the CustomerAssetService API. + module Paths + ## + # Create a fully-qualified Asset resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/assets/{asset_id}` + # + # @param customer_id [String] + # @param asset_id [String] + # + # @return [::String] + def asset_path customer_id:, asset_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/assets/#{asset_id}" + end + + ## + # Create a fully-qualified CustomerAsset resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/customerAssets/{asset_id}~{field_type}` + # + # @param customer_id [String] + # @param asset_id [String] + # @param field_type [String] + # + # @return [::String] + def customer_asset_path customer_id:, asset_id:, field_type: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + raise ::ArgumentError, "asset_id cannot contain /" if asset_id.to_s.include? "/" + + "customers/#{customer_id}/customerAssets/#{asset_id}~#{field_type}" + end + + extend self + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/customer_asset_service_pb.rb b/lib/google/ads/google_ads/v25/services/customer_asset_service_pb.rb new file mode 100644 index 000000000..6801982db --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/customer_asset_service_pb.rb @@ -0,0 +1,35 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/services/customer_asset_service.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/enums/response_content_type_pb' +require 'google/ads/google_ads/v25/resources/customer_asset_pb' +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/field_mask_pb' +require 'google/rpc/status_pb' + + +descriptor_data = "\n>google/ads/googleads/v25/services/customer_asset_service.proto\x12!google.ads.googleads.v25.services\x1a:google/ads/googleads/v25/enums/response_content_type.proto\x1a\x37google/ads/googleads/v25/resources/customer_asset.proto\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\x1a\x17google/rpc/status.proto\"\xa7\x02\n\x1bMutateCustomerAssetsRequest\x12\x18\n\x0b\x63ustomer_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12R\n\noperations\x18\x02 \x03(\x0b\x32\x39.google.ads.googleads.v25.services.CustomerAssetOperationB\x03\xe0\x41\x02\x12\x17\n\x0fpartial_failure\x18\x03 \x01(\x08\x12\x15\n\rvalidate_only\x18\x04 \x01(\x08\x12j\n\x15response_content_type\x18\x05 \x01(\x0e\x32K.google.ads.googleads.v25.enums.ResponseContentTypeEnum.ResponseContentType\"\x9f\x02\n\x16\x43ustomerAssetOperation\x12/\n\x0bupdate_mask\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\x12\x43\n\x06\x63reate\x18\x01 \x01(\x0b\x32\x31.google.ads.googleads.v25.resources.CustomerAssetH\x00\x12\x43\n\x06update\x18\x03 \x01(\x0b\x32\x31.google.ads.googleads.v25.resources.CustomerAssetH\x00\x12=\n\x06remove\x18\x02 \x01(\tB+\xfa\x41(\n&googleads.googleapis.com/CustomerAssetH\x00\x42\x0b\n\toperation\"\xa0\x01\n\x1cMutateCustomerAssetsResponse\x12\x31\n\x15partial_failure_error\x18\x01 \x01(\x0b\x32\x12.google.rpc.Status\x12M\n\x07results\x18\x02 \x03(\x0b\x32<.google.ads.googleads.v25.services.MutateCustomerAssetResult\"\xaa\x01\n\x19MutateCustomerAssetResult\x12\x42\n\rresource_name\x18\x01 \x01(\tB+\xfa\x41(\n&googleads.googleapis.com/CustomerAsset\x12I\n\x0e\x63ustomer_asset\x18\x02 \x01(\x0b\x32\x31.google.ads.googleads.v25.resources.CustomerAsset2\xd1\x02\n\x14\x43ustomerAssetService\x12\xf1\x01\n\x14MutateCustomerAssets\x12>.google.ads.googleads.v25.services.MutateCustomerAssetsRequest\x1a?.google.ads.googleads.v25.services.MutateCustomerAssetsResponse\"X\xda\x41\x16\x63ustomer_id,operations\x82\xd3\xe4\x93\x02\x39\"4/v25/customers/{customer_id=*}/customerAssets:mutate:\x01*\x1a\x45\xca\x41\x18googleads.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/adwordsB\x85\x02\n%com.google.ads.googleads.v25.servicesB\x19\x43ustomerAssetServiceProtoP\x01ZIgoogle.golang.org/genproto/googleapis/ads/googleads/v25/services;services\xa2\x02\x03GAA\xaa\x02!Google.Ads.GoogleAds.V25.Services\xca\x02!Google\\Ads\\GoogleAds\\V25\\Services\xea\x02%Google::Ads::GoogleAds::V25::Servicesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Services + MutateCustomerAssetsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.MutateCustomerAssetsRequest").msgclass + CustomerAssetOperation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.CustomerAssetOperation").msgclass + MutateCustomerAssetsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.MutateCustomerAssetsResponse").msgclass + MutateCustomerAssetResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.MutateCustomerAssetResult").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/customer_asset_service_services_pb.rb b/lib/google/ads/google_ads/v25/services/customer_asset_service_services_pb.rb new file mode 100644 index 000000000..e035065df --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/customer_asset_service_services_pb.rb @@ -0,0 +1,61 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/ads/googleads/v25/services/customer_asset_service.proto for package 'Google.Ads.GoogleAds.V25.Services' +# Original file comments: +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +require 'grpc' +require 'google/ads/google_ads/v25/services/customer_asset_service_pb' + +module Google + module Ads + module GoogleAds + module V25 + module Services + module CustomerAssetService + # Proto file describing the CustomerAsset service. + # + # Service to manage customer assets. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.ads.googleads.v25.services.CustomerAssetService' + + # Creates, updates, or removes customer assets. Operation statuses are + # returned. + # + # List of thrown errors: + # [AssetLinkError]() + # [AuthenticationError]() + # [AuthorizationError]() + # [FieldError]() + # [HeaderError]() + # [InternalError]() + # [MutateError]() + # [QuotaError]() + # [RequestError]() + rpc :MutateCustomerAssets, ::Google::Ads::GoogleAds::V25::Services::MutateCustomerAssetsRequest, ::Google::Ads::GoogleAds::V25::Services::MutateCustomerAssetsResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/customer_asset_set_service.rb b/lib/google/ads/google_ads/v25/services/customer_asset_set_service.rb new file mode 100644 index 000000000..d5a19b14c --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/customer_asset_set_service.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/ads/google_ads/version" + +require "google/ads/google_ads/v25/services/customer_asset_set_service/credentials" +require "google/ads/google_ads/v25/services/customer_asset_set_service/paths" +require "google/ads/google_ads/v25/services/customer_asset_set_service/client" + +module Google + module Ads + module GoogleAds + module V25 + module Services + ## + # Service to manage customer asset set + # + # @example Load this service and instantiate a gRPC client + # + # require "google/ads/google_ads/v25/services/customer_asset_set_service" + # client = ::Google::Ads::GoogleAds::V25::Services::CustomerAssetSetService::Client.new + # + module CustomerAssetSetService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "customer_asset_set_service", "helpers.rb" +require "google/ads/google_ads/v25/services/customer_asset_set_service/helpers" if ::File.file? helper_path diff --git a/lib/google/ads/google_ads/v25/services/customer_asset_set_service/client.rb b/lib/google/ads/google_ads/v25/services/customer_asset_set_service/client.rb new file mode 100644 index 000000000..446e228c5 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/customer_asset_set_service/client.rb @@ -0,0 +1,494 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# require "google/ads/google_ads/error" +require "google/ads/google_ads/v25/services/customer_asset_set_service_pb" + +module Google + module Ads + module GoogleAds + module V25 + module Services + module CustomerAssetSetService + ## + # Client for the CustomerAssetSetService service. + # + # Service to manage customer asset set + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "googleads.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :customer_asset_set_service_stub + + ## + # Configure the CustomerAssetSetService Client class. + # + # See {::Google::Ads::GoogleAds::V25::Services::CustomerAssetSetService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all CustomerAssetSetService clients + # ::Google::Ads::GoogleAds::V25::Services::CustomerAssetSetService::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + default_config = Client::Configuration.new + + default_config.timeout = 14_400.0 + default_config.retry_policy = { + initial_delay: 5.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the CustomerAssetSetService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Ads::GoogleAds::V25::Services::CustomerAssetSetService::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @customer_asset_set_service_stub.universe_domain + end + + ## + # Create a new CustomerAssetSetService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Ads::GoogleAds::V25::Services::CustomerAssetSetService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Ads::GoogleAds::V25::Services::CustomerAssetSetService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the CustomerAssetSetService client. + # @yieldparam config [Client::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/ads/google_ads/v25/services/customer_asset_set_service_services_pb" + + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @customer_asset_set_service_stub = ::Gapic::ServiceStub.new( + ::Google::Ads::GoogleAds::V25::Services::CustomerAssetSetService::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool, + logger: @config.logger + ) + + @customer_asset_set_service_stub.stub_logger&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @customer_asset_set_service_stub.logger + end + + # Service calls + + ## + # Creates, or removes customer asset sets. Operation statuses are + # returned. + # + # @overload mutate_customer_asset_sets(request, options = nil) + # Pass arguments to `mutate_customer_asset_sets` via a request object, either of type + # {::Google::Ads::GoogleAds::V25::Services::MutateCustomerAssetSetsRequest} or an equivalent Hash. + # + # @param request [::Google::Ads::GoogleAds::V25::Services::MutateCustomerAssetSetsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload mutate_customer_asset_sets(customer_id: nil, operations: nil, partial_failure: nil, validate_only: nil, response_content_type: nil) + # Pass arguments to `mutate_customer_asset_sets` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param customer_id [::String] + # Required. The ID of the customer whose customer asset sets are being + # modified. + # @param operations [::Array<::Google::Ads::GoogleAds::V25::Services::CustomerAssetSetOperation, ::Hash>] + # Required. The list of operations to perform on individual customer asset + # sets. + # @param partial_failure [::Boolean] + # 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. + # @param validate_only [::Boolean] + # If true, the request is validated but not executed. Only errors are + # returned, not results. + # @param response_content_type [::Google::Ads::GoogleAds::V25::Enums::ResponseContentTypeEnum::ResponseContentType] + # The response content type setting. Determines whether the mutable resource + # or just the resource name should be returned post mutation. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Ads::GoogleAds::V25::Services::MutateCustomerAssetSetsResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Ads::GoogleAds::V25::Services::MutateCustomerAssetSetsResponse] + # + # @raise [Google::Ads::GoogleAds::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/ads/google_ads/v25/services" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Ads::GoogleAds::V25::Services::CustomerAssetSetService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Ads::GoogleAds::V25::Services::MutateCustomerAssetSetsRequest.new + # + # # Call the mutate_customer_asset_sets method. + # result = client.mutate_customer_asset_sets request + # + # # The returned object is of type Google::Ads::GoogleAds::V25::Services::MutateCustomerAssetSetsResponse. + # p result + # + def mutate_customer_asset_sets request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::GoogleAds::V25::Services::MutateCustomerAssetSetsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.mutate_customer_asset_sets.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Ads::GoogleAds::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.customer_id + header_params["customer_id"] = request.customer_id + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.mutate_customer_asset_sets.timeout, + metadata: metadata, + retry_policy: @config.rpcs.mutate_customer_asset_sets.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @customer_asset_set_service_stub.call_rpc :mutate_customer_asset_sets, request, + options: options do |response, operation| + yield response, operation if block_given? + end + # rescue GRPC::BadStatus => grpc_error + # raise Google::Ads::GoogleAds::Error.new grpc_error.message + end + + ## + # Configuration class for the CustomerAssetSetService API. + # + # This class represents the configuration for CustomerAssetSetService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Ads::GoogleAds::V25::Services::CustomerAssetSetService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # mutate_customer_asset_sets to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Ads::GoogleAds::V25::Services::CustomerAssetSetService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.mutate_customer_asset_sets.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Ads::GoogleAds::V25::Services::CustomerAssetSetService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.mutate_customer_asset_sets.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Ads::GoogleAds::V25::Services::CustomerAssetSetService::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "googleads.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, + ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the CustomerAssetSetService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `mutate_customer_asset_sets` + # @return [::Gapic::Config::Method] + # + attr_reader :mutate_customer_asset_sets + + # @private + def initialize parent_rpcs = nil + mutate_customer_asset_sets_config = parent_rpcs.mutate_customer_asset_sets if parent_rpcs.respond_to? :mutate_customer_asset_sets + @mutate_customer_asset_sets = ::Gapic::Config::Method.new mutate_customer_asset_sets_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/customer_asset_set_service/credentials.rb b/lib/google/ads/google_ads/v25/services/customer_asset_set_service/credentials.rb new file mode 100644 index 000000000..52a0a101f --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/customer_asset_set_service/credentials.rb @@ -0,0 +1,38 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Ads + module GoogleAds + module V25 + module Services + module CustomerAssetSetService + # Credentials for the CustomerAssetSetService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/adwords" + ] + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/customer_asset_set_service/paths.rb b/lib/google/ads/google_ads/v25/services/customer_asset_set_service/paths.rb new file mode 100644 index 000000000..fc81bcfe2 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/customer_asset_set_service/paths.rb @@ -0,0 +1,83 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Ads + module GoogleAds + module V25 + module Services + module CustomerAssetSetService + # Path helper methods for the CustomerAssetSetService API. + module Paths + ## + # Create a fully-qualified AssetSet resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/assetSets/{asset_set_id}` + # + # @param customer_id [String] + # @param asset_set_id [String] + # + # @return [::String] + def asset_set_path customer_id:, asset_set_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/assetSets/#{asset_set_id}" + end + + ## + # Create a fully-qualified Customer resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}` + # + # @param customer_id [String] + # + # @return [::String] + def customer_path customer_id: + "customers/#{customer_id}" + end + + ## + # Create a fully-qualified CustomerAssetSet resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/customerAssetSets/{asset_set_id}` + # + # @param customer_id [String] + # @param asset_set_id [String] + # + # @return [::String] + def customer_asset_set_path customer_id:, asset_set_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/customerAssetSets/#{asset_set_id}" + end + + extend self + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/customer_asset_set_service_pb.rb b/lib/google/ads/google_ads/v25/services/customer_asset_set_service_pb.rb new file mode 100644 index 000000000..6ffa6ad3f --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/customer_asset_set_service_pb.rb @@ -0,0 +1,34 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/services/customer_asset_set_service.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/enums/response_content_type_pb' +require 'google/ads/google_ads/v25/resources/customer_asset_set_pb' +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/rpc/status_pb' + + +descriptor_data = "\nBgoogle/ads/googleads/v25/services/customer_asset_set_service.proto\x12!google.ads.googleads.v25.services\x1a:google/ads/googleads/v25/enums/response_content_type.proto\x1a;google/ads/googleads/v25/resources/customer_asset_set.proto\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x17google/rpc/status.proto\"\xad\x02\n\x1eMutateCustomerAssetSetsRequest\x12\x18\n\x0b\x63ustomer_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12U\n\noperations\x18\x02 \x03(\x0b\x32<.google.ads.googleads.v25.services.CustomerAssetSetOperationB\x03\xe0\x41\x02\x12\x17\n\x0fpartial_failure\x18\x03 \x01(\x08\x12\x15\n\rvalidate_only\x18\x04 \x01(\x08\x12j\n\x15response_content_type\x18\x05 \x01(\x0e\x32K.google.ads.googleads.v25.enums.ResponseContentTypeEnum.ResponseContentType\"\xb2\x01\n\x19\x43ustomerAssetSetOperation\x12\x46\n\x06\x63reate\x18\x01 \x01(\x0b\x32\x34.google.ads.googleads.v25.resources.CustomerAssetSetH\x00\x12@\n\x06remove\x18\x02 \x01(\tB.\xfa\x41+\n)googleads.googleapis.com/CustomerAssetSetH\x00\x42\x0b\n\toperation\"\xa6\x01\n\x1fMutateCustomerAssetSetsResponse\x12P\n\x07results\x18\x01 \x03(\x0b\x32?.google.ads.googleads.v25.services.MutateCustomerAssetSetResult\x12\x31\n\x15partial_failure_error\x18\x02 \x01(\x0b\x32\x12.google.rpc.Status\"\xb7\x01\n\x1cMutateCustomerAssetSetResult\x12\x45\n\rresource_name\x18\x01 \x01(\tB.\xfa\x41+\n)googleads.googleapis.com/CustomerAssetSet\x12P\n\x12\x63ustomer_asset_set\x18\x02 \x01(\x0b\x32\x34.google.ads.googleads.v25.resources.CustomerAssetSet2\xe0\x02\n\x17\x43ustomerAssetSetService\x12\xfd\x01\n\x17MutateCustomerAssetSets\x12\x41.google.ads.googleads.v25.services.MutateCustomerAssetSetsRequest\x1a\x42.google.ads.googleads.v25.services.MutateCustomerAssetSetsResponse\"[\xda\x41\x16\x63ustomer_id,operations\x82\xd3\xe4\x93\x02<\"7/v25/customers/{customer_id=*}/customerAssetSets:mutate:\x01*\x1a\x45\xca\x41\x18googleads.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/adwordsB\x88\x02\n%com.google.ads.googleads.v25.servicesB\x1c\x43ustomerAssetSetServiceProtoP\x01ZIgoogle.golang.org/genproto/googleapis/ads/googleads/v25/services;services\xa2\x02\x03GAA\xaa\x02!Google.Ads.GoogleAds.V25.Services\xca\x02!Google\\Ads\\GoogleAds\\V25\\Services\xea\x02%Google::Ads::GoogleAds::V25::Servicesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Services + MutateCustomerAssetSetsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.MutateCustomerAssetSetsRequest").msgclass + CustomerAssetSetOperation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.CustomerAssetSetOperation").msgclass + MutateCustomerAssetSetsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.MutateCustomerAssetSetsResponse").msgclass + MutateCustomerAssetSetResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.MutateCustomerAssetSetResult").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/customer_asset_set_service_services_pb.rb b/lib/google/ads/google_ads/v25/services/customer_asset_set_service_services_pb.rb new file mode 100644 index 000000000..301a4e8e6 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/customer_asset_set_service_services_pb.rb @@ -0,0 +1,50 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/ads/googleads/v25/services/customer_asset_set_service.proto for package 'Google.Ads.GoogleAds.V25.Services' +# Original file comments: +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +require 'grpc' +require 'google/ads/google_ads/v25/services/customer_asset_set_service_pb' + +module Google + module Ads + module GoogleAds + module V25 + module Services + module CustomerAssetSetService + # Proto file describing the CustomerAssetSet service. + # + # Service to manage customer asset set + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.ads.googleads.v25.services.CustomerAssetSetService' + + # Creates, or removes customer asset sets. Operation statuses are + # returned. + rpc :MutateCustomerAssetSets, ::Google::Ads::GoogleAds::V25::Services::MutateCustomerAssetSetsRequest, ::Google::Ads::GoogleAds::V25::Services::MutateCustomerAssetSetsResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/customer_client_link_service.rb b/lib/google/ads/google_ads/v25/services/customer_client_link_service.rb new file mode 100644 index 000000000..864f0c889 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/customer_client_link_service.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/ads/google_ads/version" + +require "google/ads/google_ads/v25/services/customer_client_link_service/credentials" +require "google/ads/google_ads/v25/services/customer_client_link_service/paths" +require "google/ads/google_ads/v25/services/customer_client_link_service/client" + +module Google + module Ads + module GoogleAds + module V25 + module Services + ## + # Service to manage customer client links. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/ads/google_ads/v25/services/customer_client_link_service" + # client = ::Google::Ads::GoogleAds::V25::Services::CustomerClientLinkService::Client.new + # + module CustomerClientLinkService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "customer_client_link_service", "helpers.rb" +require "google/ads/google_ads/v25/services/customer_client_link_service/helpers" if ::File.file? helper_path diff --git a/lib/google/ads/google_ads/v25/services/customer_client_link_service/client.rb b/lib/google/ads/google_ads/v25/services/customer_client_link_service/client.rb new file mode 100644 index 000000000..3277525a7 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/customer_client_link_service/client.rb @@ -0,0 +1,497 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# require "google/ads/google_ads/error" +require "google/ads/google_ads/v25/services/customer_client_link_service_pb" + +module Google + module Ads + module GoogleAds + module V25 + module Services + module CustomerClientLinkService + ## + # Client for the CustomerClientLinkService service. + # + # Service to manage customer client links. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "googleads.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :customer_client_link_service_stub + + ## + # Configure the CustomerClientLinkService Client class. + # + # See {::Google::Ads::GoogleAds::V25::Services::CustomerClientLinkService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all CustomerClientLinkService clients + # ::Google::Ads::GoogleAds::V25::Services::CustomerClientLinkService::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + default_config = Client::Configuration.new + + default_config.timeout = 14_400.0 + default_config.retry_policy = { + initial_delay: 5.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the CustomerClientLinkService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Ads::GoogleAds::V25::Services::CustomerClientLinkService::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @customer_client_link_service_stub.universe_domain + end + + ## + # Create a new CustomerClientLinkService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Ads::GoogleAds::V25::Services::CustomerClientLinkService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Ads::GoogleAds::V25::Services::CustomerClientLinkService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the CustomerClientLinkService client. + # @yieldparam config [Client::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/ads/google_ads/v25/services/customer_client_link_service_services_pb" + + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @customer_client_link_service_stub = ::Gapic::ServiceStub.new( + ::Google::Ads::GoogleAds::V25::Services::CustomerClientLinkService::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool, + logger: @config.logger + ) + + @customer_client_link_service_stub.stub_logger&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @customer_client_link_service_stub.logger + end + + # Service calls + + ## + # Creates or updates a customer client link. Operation statuses are returned. + # + # List of thrown errors: + # [AuthenticationError]() + # [AuthorizationError]() + # [DatabaseError]() + # [FieldError]() + # [FieldMaskError]() + # [HeaderError]() + # [InternalError]() + # [ManagerLinkError]() + # [MutateError]() + # [NewResourceCreationError]() + # [QuotaError]() + # [RequestError]() + # + # @overload mutate_customer_client_link(request, options = nil) + # Pass arguments to `mutate_customer_client_link` via a request object, either of type + # {::Google::Ads::GoogleAds::V25::Services::MutateCustomerClientLinkRequest} or an equivalent Hash. + # + # @param request [::Google::Ads::GoogleAds::V25::Services::MutateCustomerClientLinkRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload mutate_customer_client_link(customer_id: nil, operation: nil, validate_only: nil) + # Pass arguments to `mutate_customer_client_link` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param customer_id [::String] + # Required. The ID of the customer whose customer link are being modified. + # @param operation [::Google::Ads::GoogleAds::V25::Services::CustomerClientLinkOperation, ::Hash] + # Required. The operation to perform on the individual CustomerClientLink. + # @param validate_only [::Boolean] + # If true, the request is validated but not executed. Only errors are + # returned, not results. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Ads::GoogleAds::V25::Services::MutateCustomerClientLinkResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Ads::GoogleAds::V25::Services::MutateCustomerClientLinkResponse] + # + # @raise [Google::Ads::GoogleAds::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/ads/google_ads/v25/services" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Ads::GoogleAds::V25::Services::CustomerClientLinkService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Ads::GoogleAds::V25::Services::MutateCustomerClientLinkRequest.new + # + # # Call the mutate_customer_client_link method. + # result = client.mutate_customer_client_link request + # + # # The returned object is of type Google::Ads::GoogleAds::V25::Services::MutateCustomerClientLinkResponse. + # p result + # + def mutate_customer_client_link request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::GoogleAds::V25::Services::MutateCustomerClientLinkRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.mutate_customer_client_link.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Ads::GoogleAds::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.customer_id + header_params["customer_id"] = request.customer_id + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.mutate_customer_client_link.timeout, + metadata: metadata, + retry_policy: @config.rpcs.mutate_customer_client_link.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @customer_client_link_service_stub.call_rpc :mutate_customer_client_link, request, + options: options do |response, operation| + yield response, operation if block_given? + end + # rescue GRPC::BadStatus => grpc_error + # raise Google::Ads::GoogleAds::Error.new grpc_error.message + end + + ## + # Configuration class for the CustomerClientLinkService API. + # + # This class represents the configuration for CustomerClientLinkService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Ads::GoogleAds::V25::Services::CustomerClientLinkService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # mutate_customer_client_link to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Ads::GoogleAds::V25::Services::CustomerClientLinkService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.mutate_customer_client_link.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Ads::GoogleAds::V25::Services::CustomerClientLinkService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.mutate_customer_client_link.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Ads::GoogleAds::V25::Services::CustomerClientLinkService::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "googleads.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, + ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the CustomerClientLinkService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `mutate_customer_client_link` + # @return [::Gapic::Config::Method] + # + attr_reader :mutate_customer_client_link + + # @private + def initialize parent_rpcs = nil + mutate_customer_client_link_config = parent_rpcs.mutate_customer_client_link if parent_rpcs.respond_to? :mutate_customer_client_link + @mutate_customer_client_link = ::Gapic::Config::Method.new mutate_customer_client_link_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/customer_client_link_service/credentials.rb b/lib/google/ads/google_ads/v25/services/customer_client_link_service/credentials.rb new file mode 100644 index 000000000..6ff12d316 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/customer_client_link_service/credentials.rb @@ -0,0 +1,38 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Ads + module GoogleAds + module V25 + module Services + module CustomerClientLinkService + # Credentials for the CustomerClientLinkService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/adwords" + ] + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/customer_client_link_service/paths.rb b/lib/google/ads/google_ads/v25/services/customer_client_link_service/paths.rb new file mode 100644 index 000000000..728ca627e --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/customer_client_link_service/paths.rb @@ -0,0 +1,68 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Ads + module GoogleAds + module V25 + module Services + module CustomerClientLinkService + # Path helper methods for the CustomerClientLinkService API. + module Paths + ## + # Create a fully-qualified Customer resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}` + # + # @param customer_id [String] + # + # @return [::String] + def customer_path customer_id: + "customers/#{customer_id}" + end + + ## + # Create a fully-qualified CustomerClientLink resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/customerClientLinks/{client_customer_id}~{manager_link_id}` + # + # @param customer_id [String] + # @param client_customer_id [String] + # @param manager_link_id [String] + # + # @return [::String] + def customer_client_link_path customer_id:, client_customer_id:, manager_link_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + raise ::ArgumentError, "client_customer_id cannot contain /" if client_customer_id.to_s.include? "/" + + "customers/#{customer_id}/customerClientLinks/#{client_customer_id}~#{manager_link_id}" + end + + extend self + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/customer_client_link_service_pb.rb b/lib/google/ads/google_ads/v25/services/customer_client_link_service_pb.rb new file mode 100644 index 000000000..af3687435 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/customer_client_link_service_pb.rb @@ -0,0 +1,33 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/services/customer_client_link_service.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/resources/customer_client_link_pb' +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/field_mask_pb' + + +descriptor_data = "\nDgoogle/ads/googleads/v25/services/customer_client_link_service.proto\x12!google.ads.googleads.v25.services\x1a=google/ads/googleads/v25/resources/customer_client_link.proto\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\"\xaa\x01\n\x1fMutateCustomerClientLinkRequest\x12\x18\n\x0b\x63ustomer_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12V\n\toperation\x18\x02 \x01(\x0b\x32>.google.ads.googleads.v25.services.CustomerClientLinkOperationB\x03\xe0\x41\x02\x12\x15\n\rvalidate_only\x18\x03 \x01(\x08\"\xef\x01\n\x1b\x43ustomerClientLinkOperation\x12/\n\x0bupdate_mask\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\x12H\n\x06\x63reate\x18\x01 \x01(\x0b\x32\x36.google.ads.googleads.v25.resources.CustomerClientLinkH\x00\x12H\n\x06update\x18\x02 \x01(\x0b\x32\x36.google.ads.googleads.v25.resources.CustomerClientLinkH\x00\x42\x0b\n\toperation\"u\n MutateCustomerClientLinkResponse\x12Q\n\x06result\x18\x01 \x01(\x0b\x32\x41.google.ads.googleads.v25.services.MutateCustomerClientLinkResult\"i\n\x1eMutateCustomerClientLinkResult\x12G\n\rresource_name\x18\x01 \x01(\tB0\xfa\x41-\n+googleads.googleapis.com/CustomerClientLink2\xe6\x02\n\x19\x43ustomerClientLinkService\x12\x81\x02\n\x18MutateCustomerClientLink\x12\x42.google.ads.googleads.v25.services.MutateCustomerClientLinkRequest\x1a\x43.google.ads.googleads.v25.services.MutateCustomerClientLinkResponse\"\\\xda\x41\x15\x63ustomer_id,operation\x82\xd3\xe4\x93\x02>\"9/v25/customers/{customer_id=*}/customerClientLinks:mutate:\x01*\x1a\x45\xca\x41\x18googleads.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/adwordsB\x8a\x02\n%com.google.ads.googleads.v25.servicesB\x1e\x43ustomerClientLinkServiceProtoP\x01ZIgoogle.golang.org/genproto/googleapis/ads/googleads/v25/services;services\xa2\x02\x03GAA\xaa\x02!Google.Ads.GoogleAds.V25.Services\xca\x02!Google\\Ads\\GoogleAds\\V25\\Services\xea\x02%Google::Ads::GoogleAds::V25::Servicesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Services + MutateCustomerClientLinkRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.MutateCustomerClientLinkRequest").msgclass + CustomerClientLinkOperation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.CustomerClientLinkOperation").msgclass + MutateCustomerClientLinkResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.MutateCustomerClientLinkResponse").msgclass + MutateCustomerClientLinkResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.MutateCustomerClientLinkResult").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/customer_client_link_service_services_pb.rb b/lib/google/ads/google_ads/v25/services/customer_client_link_service_services_pb.rb new file mode 100644 index 000000000..111c89cc2 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/customer_client_link_service_services_pb.rb @@ -0,0 +1,61 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/ads/googleads/v25/services/customer_client_link_service.proto for package 'Google.Ads.GoogleAds.V25.Services' +# Original file comments: +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +require 'grpc' +require 'google/ads/google_ads/v25/services/customer_client_link_service_pb' + +module Google + module Ads + module GoogleAds + module V25 + module Services + module CustomerClientLinkService + # Service to manage customer client links. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.ads.googleads.v25.services.CustomerClientLinkService' + + # Creates or updates a customer client link. Operation statuses are returned. + # + # List of thrown errors: + # [AuthenticationError]() + # [AuthorizationError]() + # [DatabaseError]() + # [FieldError]() + # [FieldMaskError]() + # [HeaderError]() + # [InternalError]() + # [ManagerLinkError]() + # [MutateError]() + # [NewResourceCreationError]() + # [QuotaError]() + # [RequestError]() + rpc :MutateCustomerClientLink, ::Google::Ads::GoogleAds::V25::Services::MutateCustomerClientLinkRequest, ::Google::Ads::GoogleAds::V25::Services::MutateCustomerClientLinkResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/customer_conversion_goal_service.rb b/lib/google/ads/google_ads/v25/services/customer_conversion_goal_service.rb new file mode 100644 index 000000000..e41dc7a34 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/customer_conversion_goal_service.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/ads/google_ads/version" + +require "google/ads/google_ads/v25/services/customer_conversion_goal_service/credentials" +require "google/ads/google_ads/v25/services/customer_conversion_goal_service/paths" +require "google/ads/google_ads/v25/services/customer_conversion_goal_service/client" + +module Google + module Ads + module GoogleAds + module V25 + module Services + ## + # Service to manage customer conversion goal. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/ads/google_ads/v25/services/customer_conversion_goal_service" + # client = ::Google::Ads::GoogleAds::V25::Services::CustomerConversionGoalService::Client.new + # + module CustomerConversionGoalService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "customer_conversion_goal_service", "helpers.rb" +require "google/ads/google_ads/v25/services/customer_conversion_goal_service/helpers" if ::File.file? helper_path diff --git a/lib/google/ads/google_ads/v25/services/customer_conversion_goal_service/client.rb b/lib/google/ads/google_ads/v25/services/customer_conversion_goal_service/client.rb new file mode 100644 index 000000000..3853d8211 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/customer_conversion_goal_service/client.rb @@ -0,0 +1,486 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# require "google/ads/google_ads/error" +require "google/ads/google_ads/v25/services/customer_conversion_goal_service_pb" + +module Google + module Ads + module GoogleAds + module V25 + module Services + module CustomerConversionGoalService + ## + # Client for the CustomerConversionGoalService service. + # + # Service to manage customer conversion goal. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "googleads.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :customer_conversion_goal_service_stub + + ## + # Configure the CustomerConversionGoalService Client class. + # + # See {::Google::Ads::GoogleAds::V25::Services::CustomerConversionGoalService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all CustomerConversionGoalService clients + # ::Google::Ads::GoogleAds::V25::Services::CustomerConversionGoalService::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + default_config = Client::Configuration.new + + default_config.timeout = 14_400.0 + default_config.retry_policy = { + initial_delay: 5.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the CustomerConversionGoalService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Ads::GoogleAds::V25::Services::CustomerConversionGoalService::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @customer_conversion_goal_service_stub.universe_domain + end + + ## + # Create a new CustomerConversionGoalService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Ads::GoogleAds::V25::Services::CustomerConversionGoalService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Ads::GoogleAds::V25::Services::CustomerConversionGoalService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the CustomerConversionGoalService client. + # @yieldparam config [Client::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/ads/google_ads/v25/services/customer_conversion_goal_service_services_pb" + + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @customer_conversion_goal_service_stub = ::Gapic::ServiceStub.new( + ::Google::Ads::GoogleAds::V25::Services::CustomerConversionGoalService::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool, + logger: @config.logger + ) + + @customer_conversion_goal_service_stub.stub_logger&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @customer_conversion_goal_service_stub.logger + end + + # Service calls + + ## + # Creates, updates or removes customer conversion goals. Operation statuses + # are returned. + # + # @overload mutate_customer_conversion_goals(request, options = nil) + # Pass arguments to `mutate_customer_conversion_goals` via a request object, either of type + # {::Google::Ads::GoogleAds::V25::Services::MutateCustomerConversionGoalsRequest} or an equivalent Hash. + # + # @param request [::Google::Ads::GoogleAds::V25::Services::MutateCustomerConversionGoalsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload mutate_customer_conversion_goals(customer_id: nil, operations: nil, validate_only: nil) + # Pass arguments to `mutate_customer_conversion_goals` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param customer_id [::String] + # Required. The ID of the customer whose customer conversion goals are being + # modified. + # @param operations [::Array<::Google::Ads::GoogleAds::V25::Services::CustomerConversionGoalOperation, ::Hash>] + # Required. The list of operations to perform on individual customer + # conversion goal. + # @param validate_only [::Boolean] + # If true, the request is validated but not executed. Only errors are + # returned, not results. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Ads::GoogleAds::V25::Services::MutateCustomerConversionGoalsResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Ads::GoogleAds::V25::Services::MutateCustomerConversionGoalsResponse] + # + # @raise [Google::Ads::GoogleAds::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/ads/google_ads/v25/services" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Ads::GoogleAds::V25::Services::CustomerConversionGoalService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Ads::GoogleAds::V25::Services::MutateCustomerConversionGoalsRequest.new + # + # # Call the mutate_customer_conversion_goals method. + # result = client.mutate_customer_conversion_goals request + # + # # The returned object is of type Google::Ads::GoogleAds::V25::Services::MutateCustomerConversionGoalsResponse. + # p result + # + def mutate_customer_conversion_goals request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::GoogleAds::V25::Services::MutateCustomerConversionGoalsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.mutate_customer_conversion_goals.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Ads::GoogleAds::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.customer_id + header_params["customer_id"] = request.customer_id + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.mutate_customer_conversion_goals.timeout, + metadata: metadata, + retry_policy: @config.rpcs.mutate_customer_conversion_goals.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @customer_conversion_goal_service_stub.call_rpc :mutate_customer_conversion_goals, request, + options: options do |response, operation| + yield response, operation if block_given? + end + # rescue GRPC::BadStatus => grpc_error + # raise Google::Ads::GoogleAds::Error.new grpc_error.message + end + + ## + # Configuration class for the CustomerConversionGoalService API. + # + # This class represents the configuration for CustomerConversionGoalService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Ads::GoogleAds::V25::Services::CustomerConversionGoalService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # mutate_customer_conversion_goals to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Ads::GoogleAds::V25::Services::CustomerConversionGoalService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.mutate_customer_conversion_goals.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Ads::GoogleAds::V25::Services::CustomerConversionGoalService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.mutate_customer_conversion_goals.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Ads::GoogleAds::V25::Services::CustomerConversionGoalService::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "googleads.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, + ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the CustomerConversionGoalService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `mutate_customer_conversion_goals` + # @return [::Gapic::Config::Method] + # + attr_reader :mutate_customer_conversion_goals + + # @private + def initialize parent_rpcs = nil + mutate_customer_conversion_goals_config = parent_rpcs.mutate_customer_conversion_goals if parent_rpcs.respond_to? :mutate_customer_conversion_goals + @mutate_customer_conversion_goals = ::Gapic::Config::Method.new mutate_customer_conversion_goals_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/customer_conversion_goal_service/credentials.rb b/lib/google/ads/google_ads/v25/services/customer_conversion_goal_service/credentials.rb new file mode 100644 index 000000000..c76aa7c1c --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/customer_conversion_goal_service/credentials.rb @@ -0,0 +1,38 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Ads + module GoogleAds + module V25 + module Services + module CustomerConversionGoalService + # Credentials for the CustomerConversionGoalService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/adwords" + ] + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/customer_conversion_goal_service/paths.rb b/lib/google/ads/google_ads/v25/services/customer_conversion_goal_service/paths.rb new file mode 100644 index 000000000..040aef708 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/customer_conversion_goal_service/paths.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Ads + module GoogleAds + module V25 + module Services + module CustomerConversionGoalService + # Path helper methods for the CustomerConversionGoalService API. + module Paths + ## + # Create a fully-qualified CustomerConversionGoal resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/customerConversionGoals/{category}~{source}` + # + # @param customer_id [String] + # @param category [String] + # @param source [String] + # + # @return [::String] + def customer_conversion_goal_path customer_id:, category:, source: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + raise ::ArgumentError, "category cannot contain /" if category.to_s.include? "/" + + "customers/#{customer_id}/customerConversionGoals/#{category}~#{source}" + end + + extend self + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/customer_conversion_goal_service_pb.rb b/lib/google/ads/google_ads/v25/services/customer_conversion_goal_service_pb.rb new file mode 100644 index 000000000..99e0f73e6 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/customer_conversion_goal_service_pb.rb @@ -0,0 +1,33 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/services/customer_conversion_goal_service.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/resources/customer_conversion_goal_pb' +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/field_mask_pb' + + +descriptor_data = "\nHgoogle/ads/googleads/v25/services/customer_conversion_goal_service.proto\x12!google.ads.googleads.v25.services\x1a\x41google/ads/googleads/v25/resources/customer_conversion_goal.proto\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\"\xb4\x01\n$MutateCustomerConversionGoalsRequest\x12\x18\n\x0b\x63ustomer_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12[\n\noperations\x18\x02 \x03(\x0b\x32\x42.google.ads.googleads.v25.services.CustomerConversionGoalOperationB\x03\xe0\x41\x02\x12\x15\n\rvalidate_only\x18\x03 \x01(\x08\"\xad\x01\n\x1f\x43ustomerConversionGoalOperation\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\x12L\n\x06update\x18\x01 \x01(\x0b\x32:.google.ads.googleads.v25.resources.CustomerConversionGoalH\x00\x42\x0b\n\toperation\"\x7f\n%MutateCustomerConversionGoalsResponse\x12V\n\x07results\x18\x01 \x03(\x0b\x32\x45.google.ads.googleads.v25.services.MutateCustomerConversionGoalResult\"q\n\"MutateCustomerConversionGoalResult\x12K\n\rresource_name\x18\x01 \x01(\tB4\xfa\x41\x31\n/googleads.googleapis.com/CustomerConversionGoal2\xfe\x02\n\x1d\x43ustomerConversionGoalService\x12\x95\x02\n\x1dMutateCustomerConversionGoals\x12G.google.ads.googleads.v25.services.MutateCustomerConversionGoalsRequest\x1aH.google.ads.googleads.v25.services.MutateCustomerConversionGoalsResponse\"a\xda\x41\x16\x63ustomer_id,operations\x82\xd3\xe4\x93\x02\x42\"=/v25/customers/{customer_id=*}/customerConversionGoals:mutate:\x01*\x1a\x45\xca\x41\x18googleads.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/adwordsB\x8e\x02\n%com.google.ads.googleads.v25.servicesB\"CustomerConversionGoalServiceProtoP\x01ZIgoogle.golang.org/genproto/googleapis/ads/googleads/v25/services;services\xa2\x02\x03GAA\xaa\x02!Google.Ads.GoogleAds.V25.Services\xca\x02!Google\\Ads\\GoogleAds\\V25\\Services\xea\x02%Google::Ads::GoogleAds::V25::Servicesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Services + MutateCustomerConversionGoalsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.MutateCustomerConversionGoalsRequest").msgclass + CustomerConversionGoalOperation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.CustomerConversionGoalOperation").msgclass + MutateCustomerConversionGoalsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.MutateCustomerConversionGoalsResponse").msgclass + MutateCustomerConversionGoalResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.MutateCustomerConversionGoalResult").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/customer_conversion_goal_service_services_pb.rb b/lib/google/ads/google_ads/v25/services/customer_conversion_goal_service_services_pb.rb new file mode 100644 index 000000000..8d114bb74 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/customer_conversion_goal_service_services_pb.rb @@ -0,0 +1,50 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/ads/googleads/v25/services/customer_conversion_goal_service.proto for package 'Google.Ads.GoogleAds.V25.Services' +# Original file comments: +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +require 'grpc' +require 'google/ads/google_ads/v25/services/customer_conversion_goal_service_pb' + +module Google + module Ads + module GoogleAds + module V25 + module Services + module CustomerConversionGoalService + # Proto file describing the CustomerConversionGoal service. + # + # Service to manage customer conversion goal. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.ads.googleads.v25.services.CustomerConversionGoalService' + + # Creates, updates or removes customer conversion goals. Operation statuses + # are returned. + rpc :MutateCustomerConversionGoals, ::Google::Ads::GoogleAds::V25::Services::MutateCustomerConversionGoalsRequest, ::Google::Ads::GoogleAds::V25::Services::MutateCustomerConversionGoalsResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/customer_customizer_service.rb b/lib/google/ads/google_ads/v25/services/customer_customizer_service.rb new file mode 100644 index 000000000..c3753dabd --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/customer_customizer_service.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/ads/google_ads/version" + +require "google/ads/google_ads/v25/services/customer_customizer_service/credentials" +require "google/ads/google_ads/v25/services/customer_customizer_service/paths" +require "google/ads/google_ads/v25/services/customer_customizer_service/client" + +module Google + module Ads + module GoogleAds + module V25 + module Services + ## + # Service to manage customer customizer + # + # @example Load this service and instantiate a gRPC client + # + # require "google/ads/google_ads/v25/services/customer_customizer_service" + # client = ::Google::Ads::GoogleAds::V25::Services::CustomerCustomizerService::Client.new + # + module CustomerCustomizerService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "customer_customizer_service", "helpers.rb" +require "google/ads/google_ads/v25/services/customer_customizer_service/helpers" if ::File.file? helper_path diff --git a/lib/google/ads/google_ads/v25/services/customer_customizer_service/client.rb b/lib/google/ads/google_ads/v25/services/customer_customizer_service/client.rb new file mode 100644 index 000000000..5e560f7d3 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/customer_customizer_service/client.rb @@ -0,0 +1,494 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# require "google/ads/google_ads/error" +require "google/ads/google_ads/v25/services/customer_customizer_service_pb" + +module Google + module Ads + module GoogleAds + module V25 + module Services + module CustomerCustomizerService + ## + # Client for the CustomerCustomizerService service. + # + # Service to manage customer customizer + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "googleads.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :customer_customizer_service_stub + + ## + # Configure the CustomerCustomizerService Client class. + # + # See {::Google::Ads::GoogleAds::V25::Services::CustomerCustomizerService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all CustomerCustomizerService clients + # ::Google::Ads::GoogleAds::V25::Services::CustomerCustomizerService::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + default_config = Client::Configuration.new + + default_config.timeout = 14_400.0 + default_config.retry_policy = { + initial_delay: 5.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the CustomerCustomizerService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Ads::GoogleAds::V25::Services::CustomerCustomizerService::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @customer_customizer_service_stub.universe_domain + end + + ## + # Create a new CustomerCustomizerService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Ads::GoogleAds::V25::Services::CustomerCustomizerService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Ads::GoogleAds::V25::Services::CustomerCustomizerService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the CustomerCustomizerService client. + # @yieldparam config [Client::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/ads/google_ads/v25/services/customer_customizer_service_services_pb" + + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @customer_customizer_service_stub = ::Gapic::ServiceStub.new( + ::Google::Ads::GoogleAds::V25::Services::CustomerCustomizerService::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool, + logger: @config.logger + ) + + @customer_customizer_service_stub.stub_logger&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @customer_customizer_service_stub.logger + end + + # Service calls + + ## + # Creates, updates or removes customer customizers. Operation statuses are + # returned. + # + # @overload mutate_customer_customizers(request, options = nil) + # Pass arguments to `mutate_customer_customizers` via a request object, either of type + # {::Google::Ads::GoogleAds::V25::Services::MutateCustomerCustomizersRequest} or an equivalent Hash. + # + # @param request [::Google::Ads::GoogleAds::V25::Services::MutateCustomerCustomizersRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload mutate_customer_customizers(customer_id: nil, operations: nil, partial_failure: nil, validate_only: nil, response_content_type: nil) + # Pass arguments to `mutate_customer_customizers` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param customer_id [::String] + # Required. The ID of the customer whose customer customizers are being + # modified. + # @param operations [::Array<::Google::Ads::GoogleAds::V25::Services::CustomerCustomizerOperation, ::Hash>] + # Required. The list of operations to perform on individual customer + # customizers. + # @param partial_failure [::Boolean] + # 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. + # @param validate_only [::Boolean] + # If true, the request is validated but not executed. Only errors are + # returned, not results. + # @param response_content_type [::Google::Ads::GoogleAds::V25::Enums::ResponseContentTypeEnum::ResponseContentType] + # The response content type setting. Determines whether the mutable resource + # or just the resource name should be returned post mutation. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Ads::GoogleAds::V25::Services::MutateCustomerCustomizersResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Ads::GoogleAds::V25::Services::MutateCustomerCustomizersResponse] + # + # @raise [Google::Ads::GoogleAds::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/ads/google_ads/v25/services" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Ads::GoogleAds::V25::Services::CustomerCustomizerService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Ads::GoogleAds::V25::Services::MutateCustomerCustomizersRequest.new + # + # # Call the mutate_customer_customizers method. + # result = client.mutate_customer_customizers request + # + # # The returned object is of type Google::Ads::GoogleAds::V25::Services::MutateCustomerCustomizersResponse. + # p result + # + def mutate_customer_customizers request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::GoogleAds::V25::Services::MutateCustomerCustomizersRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.mutate_customer_customizers.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Ads::GoogleAds::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.customer_id + header_params["customer_id"] = request.customer_id + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.mutate_customer_customizers.timeout, + metadata: metadata, + retry_policy: @config.rpcs.mutate_customer_customizers.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @customer_customizer_service_stub.call_rpc :mutate_customer_customizers, request, + options: options do |response, operation| + yield response, operation if block_given? + end + # rescue GRPC::BadStatus => grpc_error + # raise Google::Ads::GoogleAds::Error.new grpc_error.message + end + + ## + # Configuration class for the CustomerCustomizerService API. + # + # This class represents the configuration for CustomerCustomizerService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Ads::GoogleAds::V25::Services::CustomerCustomizerService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # mutate_customer_customizers to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Ads::GoogleAds::V25::Services::CustomerCustomizerService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.mutate_customer_customizers.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Ads::GoogleAds::V25::Services::CustomerCustomizerService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.mutate_customer_customizers.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Ads::GoogleAds::V25::Services::CustomerCustomizerService::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "googleads.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, + ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the CustomerCustomizerService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `mutate_customer_customizers` + # @return [::Gapic::Config::Method] + # + attr_reader :mutate_customer_customizers + + # @private + def initialize parent_rpcs = nil + mutate_customer_customizers_config = parent_rpcs.mutate_customer_customizers if parent_rpcs.respond_to? :mutate_customer_customizers + @mutate_customer_customizers = ::Gapic::Config::Method.new mutate_customer_customizers_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/customer_customizer_service/credentials.rb b/lib/google/ads/google_ads/v25/services/customer_customizer_service/credentials.rb new file mode 100644 index 000000000..b9e1deb5d --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/customer_customizer_service/credentials.rb @@ -0,0 +1,38 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Ads + module GoogleAds + module V25 + module Services + module CustomerCustomizerService + # Credentials for the CustomerCustomizerService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/adwords" + ] + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/customer_customizer_service/paths.rb b/lib/google/ads/google_ads/v25/services/customer_customizer_service/paths.rb new file mode 100644 index 000000000..37cc5676c --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/customer_customizer_service/paths.rb @@ -0,0 +1,69 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Ads + module GoogleAds + module V25 + module Services + module CustomerCustomizerService + # Path helper methods for the CustomerCustomizerService API. + module Paths + ## + # Create a fully-qualified CustomerCustomizer resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/customerCustomizers/{customizer_attribute_id}` + # + # @param customer_id [String] + # @param customizer_attribute_id [String] + # + # @return [::String] + def customer_customizer_path customer_id:, customizer_attribute_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/customerCustomizers/#{customizer_attribute_id}" + end + + ## + # Create a fully-qualified CustomizerAttribute resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/customizerAttributes/{customizer_attribute_id}` + # + # @param customer_id [String] + # @param customizer_attribute_id [String] + # + # @return [::String] + def customizer_attribute_path customer_id:, customizer_attribute_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/customizerAttributes/#{customizer_attribute_id}" + end + + extend self + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/customer_customizer_service_pb.rb b/lib/google/ads/google_ads/v25/services/customer_customizer_service_pb.rb new file mode 100644 index 000000000..02bad1706 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/customer_customizer_service_pb.rb @@ -0,0 +1,34 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/services/customer_customizer_service.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/enums/response_content_type_pb' +require 'google/ads/google_ads/v25/resources/customer_customizer_pb' +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/rpc/status_pb' + + +descriptor_data = "\nCgoogle/ads/googleads/v25/services/customer_customizer_service.proto\x12!google.ads.googleads.v25.services\x1a:google/ads/googleads/v25/enums/response_content_type.proto\x1a.google.ads.googleads.v25.services.CustomerCustomizerOperationB\x03\xe0\x41\x02\x12\x17\n\x0fpartial_failure\x18\x03 \x01(\x08\x12\x15\n\rvalidate_only\x18\x04 \x01(\x08\x12j\n\x15response_content_type\x18\x05 \x01(\x0e\x32K.google.ads.googleads.v25.enums.ResponseContentTypeEnum.ResponseContentType\"\xb8\x01\n\x1b\x43ustomerCustomizerOperation\x12H\n\x06\x63reate\x18\x01 \x01(\x0b\x32\x36.google.ads.googleads.v25.resources.CustomerCustomizerH\x00\x12\x42\n\x06remove\x18\x02 \x01(\tB0\xfa\x41-\n+googleads.googleapis.com/CustomerCustomizerH\x00\x42\x0b\n\toperation\"\xaa\x01\n!MutateCustomerCustomizersResponse\x12R\n\x07results\x18\x01 \x03(\x0b\x32\x41.google.ads.googleads.v25.services.MutateCustomerCustomizerResult\x12\x31\n\x15partial_failure_error\x18\x02 \x01(\x0b\x32\x12.google.rpc.Status\"\xbe\x01\n\x1eMutateCustomerCustomizerResult\x12G\n\rresource_name\x18\x01 \x01(\tB0\xfa\x41-\n+googleads.googleapis.com/CustomerCustomizer\x12S\n\x13\x63ustomer_customizer\x18\x02 \x01(\x0b\x32\x36.google.ads.googleads.v25.resources.CustomerCustomizer2\xea\x02\n\x19\x43ustomerCustomizerService\x12\x85\x02\n\x19MutateCustomerCustomizers\x12\x43.google.ads.googleads.v25.services.MutateCustomerCustomizersRequest\x1a\x44.google.ads.googleads.v25.services.MutateCustomerCustomizersResponse\"]\xda\x41\x16\x63ustomer_id,operations\x82\xd3\xe4\x93\x02>\"9/v25/customers/{customer_id=*}/CustomerCustomizers:mutate:\x01*\x1a\x45\xca\x41\x18googleads.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/adwordsB\x8a\x02\n%com.google.ads.googleads.v25.servicesB\x1e\x43ustomerCustomizerServiceProtoP\x01ZIgoogle.golang.org/genproto/googleapis/ads/googleads/v25/services;services\xa2\x02\x03GAA\xaa\x02!Google.Ads.GoogleAds.V25.Services\xca\x02!Google\\Ads\\GoogleAds\\V25\\Services\xea\x02%Google::Ads::GoogleAds::V25::Servicesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Services + MutateCustomerCustomizersRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.MutateCustomerCustomizersRequest").msgclass + CustomerCustomizerOperation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.CustomerCustomizerOperation").msgclass + MutateCustomerCustomizersResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.MutateCustomerCustomizersResponse").msgclass + MutateCustomerCustomizerResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.MutateCustomerCustomizerResult").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/customer_customizer_service_services_pb.rb b/lib/google/ads/google_ads/v25/services/customer_customizer_service_services_pb.rb new file mode 100644 index 000000000..8cf51c2a3 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/customer_customizer_service_services_pb.rb @@ -0,0 +1,50 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/ads/googleads/v25/services/customer_customizer_service.proto for package 'Google.Ads.GoogleAds.V25.Services' +# Original file comments: +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +require 'grpc' +require 'google/ads/google_ads/v25/services/customer_customizer_service_pb' + +module Google + module Ads + module GoogleAds + module V25 + module Services + module CustomerCustomizerService + # Proto file describing the CustomerCustomizer service. + # + # Service to manage customer customizer + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.ads.googleads.v25.services.CustomerCustomizerService' + + # Creates, updates or removes customer customizers. Operation statuses are + # returned. + rpc :MutateCustomerCustomizers, ::Google::Ads::GoogleAds::V25::Services::MutateCustomerCustomizersRequest, ::Google::Ads::GoogleAds::V25::Services::MutateCustomerCustomizersResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/customer_label_service.rb b/lib/google/ads/google_ads/v25/services/customer_label_service.rb new file mode 100644 index 000000000..cad999509 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/customer_label_service.rb @@ -0,0 +1,55 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/ads/google_ads/version" + +require "google/ads/google_ads/v25/services/customer_label_service/credentials" +require "google/ads/google_ads/v25/services/customer_label_service/paths" +require "google/ads/google_ads/v25/services/customer_label_service/client" + +module Google + module Ads + module GoogleAds + module V25 + module Services + ## + # Service to manage labels on Google Ads customers. + # + # This service is commonly used by manager accounts to apply their own labels + # to their client accounts. The label entity must exist under the manager + # account. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/ads/google_ads/v25/services/customer_label_service" + # client = ::Google::Ads::GoogleAds::V25::Services::CustomerLabelService::Client.new + # + module CustomerLabelService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "customer_label_service", "helpers.rb" +require "google/ads/google_ads/v25/services/customer_label_service/helpers" if ::File.file? helper_path diff --git a/lib/google/ads/google_ads/v25/services/customer_label_service/client.rb b/lib/google/ads/google_ads/v25/services/customer_label_service/client.rb new file mode 100644 index 000000000..e7bcc845e --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/customer_label_service/client.rb @@ -0,0 +1,506 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# require "google/ads/google_ads/error" +require "google/ads/google_ads/v25/services/customer_label_service_pb" + +module Google + module Ads + module GoogleAds + module V25 + module Services + module CustomerLabelService + ## + # Client for the CustomerLabelService service. + # + # Service to manage labels on Google Ads customers. + # + # This service is commonly used by manager accounts to apply their own labels + # to their client accounts. The label entity must exist under the manager + # account. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "googleads.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :customer_label_service_stub + + ## + # Configure the CustomerLabelService Client class. + # + # See {::Google::Ads::GoogleAds::V25::Services::CustomerLabelService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all CustomerLabelService clients + # ::Google::Ads::GoogleAds::V25::Services::CustomerLabelService::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + default_config = Client::Configuration.new + + default_config.timeout = 14_400.0 + default_config.retry_policy = { + initial_delay: 5.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the CustomerLabelService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Ads::GoogleAds::V25::Services::CustomerLabelService::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @customer_label_service_stub.universe_domain + end + + ## + # Create a new CustomerLabelService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Ads::GoogleAds::V25::Services::CustomerLabelService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Ads::GoogleAds::V25::Services::CustomerLabelService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the CustomerLabelService client. + # @yieldparam config [Client::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/ads/google_ads/v25/services/customer_label_service_services_pb" + + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @customer_label_service_stub = ::Gapic::ServiceStub.new( + ::Google::Ads::GoogleAds::V25::Services::CustomerLabelService::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool, + logger: @config.logger + ) + + @customer_label_service_stub.stub_logger&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @customer_label_service_stub.logger + end + + # Service calls + + ## + # Creates and removes customer-label relationships. + # Operation statuses are returned. + # + # List of thrown errors: + # [AuthenticationError]() + # [AuthorizationError]() + # [DatabaseError]() + # [HeaderError]() + # [InternalError]() + # [LabelError]() + # [MutateError]() + # [QuotaError]() + # [RequestError]() + # + # @overload mutate_customer_labels(request, options = nil) + # Pass arguments to `mutate_customer_labels` via a request object, either of type + # {::Google::Ads::GoogleAds::V25::Services::MutateCustomerLabelsRequest} or an equivalent Hash. + # + # @param request [::Google::Ads::GoogleAds::V25::Services::MutateCustomerLabelsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload mutate_customer_labels(customer_id: nil, operations: nil, partial_failure: nil, validate_only: nil) + # Pass arguments to `mutate_customer_labels` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param customer_id [::String] + # Required. ID of the customer whose customer-label relationships are being + # modified. + # @param operations [::Array<::Google::Ads::GoogleAds::V25::Services::CustomerLabelOperation, ::Hash>] + # Required. The list of operations to perform on customer-label + # relationships. + # @param partial_failure [::Boolean] + # 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. + # @param validate_only [::Boolean] + # If true, the request is validated but not executed. Only errors are + # returned, not results. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Ads::GoogleAds::V25::Services::MutateCustomerLabelsResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Ads::GoogleAds::V25::Services::MutateCustomerLabelsResponse] + # + # @raise [Google::Ads::GoogleAds::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/ads/google_ads/v25/services" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Ads::GoogleAds::V25::Services::CustomerLabelService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Ads::GoogleAds::V25::Services::MutateCustomerLabelsRequest.new + # + # # Call the mutate_customer_labels method. + # result = client.mutate_customer_labels request + # + # # The returned object is of type Google::Ads::GoogleAds::V25::Services::MutateCustomerLabelsResponse. + # p result + # + def mutate_customer_labels request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::GoogleAds::V25::Services::MutateCustomerLabelsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.mutate_customer_labels.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Ads::GoogleAds::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.customer_id + header_params["customer_id"] = request.customer_id + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.mutate_customer_labels.timeout, + metadata: metadata, + retry_policy: @config.rpcs.mutate_customer_labels.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @customer_label_service_stub.call_rpc :mutate_customer_labels, request, + options: options do |response, operation| + yield response, operation if block_given? + end + # rescue GRPC::BadStatus => grpc_error + # raise Google::Ads::GoogleAds::Error.new grpc_error.message + end + + ## + # Configuration class for the CustomerLabelService API. + # + # This class represents the configuration for CustomerLabelService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Ads::GoogleAds::V25::Services::CustomerLabelService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # mutate_customer_labels to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Ads::GoogleAds::V25::Services::CustomerLabelService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.mutate_customer_labels.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Ads::GoogleAds::V25::Services::CustomerLabelService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.mutate_customer_labels.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Ads::GoogleAds::V25::Services::CustomerLabelService::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "googleads.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, + ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the CustomerLabelService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `mutate_customer_labels` + # @return [::Gapic::Config::Method] + # + attr_reader :mutate_customer_labels + + # @private + def initialize parent_rpcs = nil + mutate_customer_labels_config = parent_rpcs.mutate_customer_labels if parent_rpcs.respond_to? :mutate_customer_labels + @mutate_customer_labels = ::Gapic::Config::Method.new mutate_customer_labels_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/customer_label_service/credentials.rb b/lib/google/ads/google_ads/v25/services/customer_label_service/credentials.rb new file mode 100644 index 000000000..9f024e914 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/customer_label_service/credentials.rb @@ -0,0 +1,38 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Ads + module GoogleAds + module V25 + module Services + module CustomerLabelService + # Credentials for the CustomerLabelService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/adwords" + ] + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/customer_label_service/paths.rb b/lib/google/ads/google_ads/v25/services/customer_label_service/paths.rb new file mode 100644 index 000000000..8ccfa1e22 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/customer_label_service/paths.rb @@ -0,0 +1,83 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Ads + module GoogleAds + module V25 + module Services + module CustomerLabelService + # Path helper methods for the CustomerLabelService API. + module Paths + ## + # Create a fully-qualified Customer resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}` + # + # @param customer_id [String] + # + # @return [::String] + def customer_path customer_id: + "customers/#{customer_id}" + end + + ## + # Create a fully-qualified CustomerLabel resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/customerLabels/{label_id}` + # + # @param customer_id [String] + # @param label_id [String] + # + # @return [::String] + def customer_label_path customer_id:, label_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/customerLabels/#{label_id}" + end + + ## + # Create a fully-qualified Label resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/labels/{label_id}` + # + # @param customer_id [String] + # @param label_id [String] + # + # @return [::String] + def label_path customer_id:, label_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/labels/#{label_id}" + end + + extend self + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/customer_label_service_pb.rb b/lib/google/ads/google_ads/v25/services/customer_label_service_pb.rb new file mode 100644 index 000000000..9b3181c9c --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/customer_label_service_pb.rb @@ -0,0 +1,33 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/services/customer_label_service.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/resources/customer_label_pb' +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/rpc/status_pb' + + +descriptor_data = "\n>google/ads/googleads/v25/services/customer_label_service.proto\x12!google.ads.googleads.v25.services\x1a\x37google/ads/googleads/v25/resources/customer_label.proto\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x17google/rpc/status.proto\"\xbb\x01\n\x1bMutateCustomerLabelsRequest\x12\x18\n\x0b\x63ustomer_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12R\n\noperations\x18\x02 \x03(\x0b\x32\x39.google.ads.googleads.v25.services.CustomerLabelOperationB\x03\xe0\x41\x02\x12\x17\n\x0fpartial_failure\x18\x03 \x01(\x08\x12\x15\n\rvalidate_only\x18\x04 \x01(\x08\"\xa9\x01\n\x16\x43ustomerLabelOperation\x12\x43\n\x06\x63reate\x18\x01 \x01(\x0b\x32\x31.google.ads.googleads.v25.resources.CustomerLabelH\x00\x12=\n\x06remove\x18\x02 \x01(\tB+\xfa\x41(\n&googleads.googleapis.com/CustomerLabelH\x00\x42\x0b\n\toperation\"\xa0\x01\n\x1cMutateCustomerLabelsResponse\x12\x31\n\x15partial_failure_error\x18\x03 \x01(\x0b\x32\x12.google.rpc.Status\x12M\n\x07results\x18\x02 \x03(\x0b\x32<.google.ads.googleads.v25.services.MutateCustomerLabelResult\"_\n\x19MutateCustomerLabelResult\x12\x42\n\rresource_name\x18\x01 \x01(\tB+\xfa\x41(\n&googleads.googleapis.com/CustomerLabel2\xd1\x02\n\x14\x43ustomerLabelService\x12\xf1\x01\n\x14MutateCustomerLabels\x12>.google.ads.googleads.v25.services.MutateCustomerLabelsRequest\x1a?.google.ads.googleads.v25.services.MutateCustomerLabelsResponse\"X\xda\x41\x16\x63ustomer_id,operations\x82\xd3\xe4\x93\x02\x39\"4/v25/customers/{customer_id=*}/customerLabels:mutate:\x01*\x1a\x45\xca\x41\x18googleads.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/adwordsB\x85\x02\n%com.google.ads.googleads.v25.servicesB\x19\x43ustomerLabelServiceProtoP\x01ZIgoogle.golang.org/genproto/googleapis/ads/googleads/v25/services;services\xa2\x02\x03GAA\xaa\x02!Google.Ads.GoogleAds.V25.Services\xca\x02!Google\\Ads\\GoogleAds\\V25\\Services\xea\x02%Google::Ads::GoogleAds::V25::Servicesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Services + MutateCustomerLabelsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.MutateCustomerLabelsRequest").msgclass + CustomerLabelOperation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.CustomerLabelOperation").msgclass + MutateCustomerLabelsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.MutateCustomerLabelsResponse").msgclass + MutateCustomerLabelResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.MutateCustomerLabelResult").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/customer_label_service_services_pb.rb b/lib/google/ads/google_ads/v25/services/customer_label_service_services_pb.rb new file mode 100644 index 000000000..a31d6443a --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/customer_label_service_services_pb.rb @@ -0,0 +1,65 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/ads/googleads/v25/services/customer_label_service.proto for package 'Google.Ads.GoogleAds.V25.Services' +# Original file comments: +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +require 'grpc' +require 'google/ads/google_ads/v25/services/customer_label_service_pb' + +module Google + module Ads + module GoogleAds + module V25 + module Services + module CustomerLabelService + # Proto file describing the Customer Label service. + # + # Service to manage labels on Google Ads customers. + # + # This service is commonly used by manager accounts to apply their own labels + # to their client accounts. The label entity must exist under the manager + # account. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.ads.googleads.v25.services.CustomerLabelService' + + # Creates and removes customer-label relationships. + # Operation statuses are returned. + # + # List of thrown errors: + # [AuthenticationError]() + # [AuthorizationError]() + # [DatabaseError]() + # [HeaderError]() + # [InternalError]() + # [LabelError]() + # [MutateError]() + # [QuotaError]() + # [RequestError]() + rpc :MutateCustomerLabels, ::Google::Ads::GoogleAds::V25::Services::MutateCustomerLabelsRequest, ::Google::Ads::GoogleAds::V25::Services::MutateCustomerLabelsResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/customer_manager_link_service.rb b/lib/google/ads/google_ads/v25/services/customer_manager_link_service.rb new file mode 100644 index 000000000..db0ee9e31 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/customer_manager_link_service.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/ads/google_ads/version" + +require "google/ads/google_ads/v25/services/customer_manager_link_service/credentials" +require "google/ads/google_ads/v25/services/customer_manager_link_service/paths" +require "google/ads/google_ads/v25/services/customer_manager_link_service/client" + +module Google + module Ads + module GoogleAds + module V25 + module Services + ## + # Service to manage customer-manager links. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/ads/google_ads/v25/services/customer_manager_link_service" + # client = ::Google::Ads::GoogleAds::V25::Services::CustomerManagerLinkService::Client.new + # + module CustomerManagerLinkService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "customer_manager_link_service", "helpers.rb" +require "google/ads/google_ads/v25/services/customer_manager_link_service/helpers" if ::File.file? helper_path diff --git a/lib/google/ads/google_ads/v25/services/customer_manager_link_service/client.rb b/lib/google/ads/google_ads/v25/services/customer_manager_link_service/client.rb new file mode 100644 index 000000000..cbaf9ed2e --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/customer_manager_link_service/client.rb @@ -0,0 +1,617 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# require "google/ads/google_ads/error" +require "google/ads/google_ads/v25/services/customer_manager_link_service_pb" + +module Google + module Ads + module GoogleAds + module V25 + module Services + module CustomerManagerLinkService + ## + # Client for the CustomerManagerLinkService service. + # + # Service to manage customer-manager links. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "googleads.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :customer_manager_link_service_stub + + ## + # Configure the CustomerManagerLinkService Client class. + # + # See {::Google::Ads::GoogleAds::V25::Services::CustomerManagerLinkService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all CustomerManagerLinkService clients + # ::Google::Ads::GoogleAds::V25::Services::CustomerManagerLinkService::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + default_config = Client::Configuration.new + + default_config.timeout = 14_400.0 + default_config.retry_policy = { + initial_delay: 5.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the CustomerManagerLinkService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Ads::GoogleAds::V25::Services::CustomerManagerLinkService::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @customer_manager_link_service_stub.universe_domain + end + + ## + # Create a new CustomerManagerLinkService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Ads::GoogleAds::V25::Services::CustomerManagerLinkService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Ads::GoogleAds::V25::Services::CustomerManagerLinkService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the CustomerManagerLinkService client. + # @yieldparam config [Client::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/ads/google_ads/v25/services/customer_manager_link_service_services_pb" + + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @customer_manager_link_service_stub = ::Gapic::ServiceStub.new( + ::Google::Ads::GoogleAds::V25::Services::CustomerManagerLinkService::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool, + logger: @config.logger + ) + + @customer_manager_link_service_stub.stub_logger&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @customer_manager_link_service_stub.logger + end + + # Service calls + + ## + # Updates customer manager links. Operation statuses are returned. + # + # List of thrown errors: + # [AuthenticationError]() + # [AuthorizationError]() + # [DatabaseError]() + # [FieldError]() + # [FieldMaskError]() + # [HeaderError]() + # [InternalError]() + # [ManagerLinkError]() + # [MutateError]() + # [QuotaError]() + # [RequestError]() + # + # @overload mutate_customer_manager_link(request, options = nil) + # Pass arguments to `mutate_customer_manager_link` via a request object, either of type + # {::Google::Ads::GoogleAds::V25::Services::MutateCustomerManagerLinkRequest} or an equivalent Hash. + # + # @param request [::Google::Ads::GoogleAds::V25::Services::MutateCustomerManagerLinkRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload mutate_customer_manager_link(customer_id: nil, operations: nil, validate_only: nil) + # Pass arguments to `mutate_customer_manager_link` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param customer_id [::String] + # Required. The ID of the customer whose customer manager links are being + # modified. + # @param operations [::Array<::Google::Ads::GoogleAds::V25::Services::CustomerManagerLinkOperation, ::Hash>] + # Required. The list of operations to perform on individual customer manager + # links. + # @param validate_only [::Boolean] + # If true, the request is validated but not executed. Only errors are + # returned, not results. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Ads::GoogleAds::V25::Services::MutateCustomerManagerLinkResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Ads::GoogleAds::V25::Services::MutateCustomerManagerLinkResponse] + # + # @raise [Google::Ads::GoogleAds::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/ads/google_ads/v25/services" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Ads::GoogleAds::V25::Services::CustomerManagerLinkService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Ads::GoogleAds::V25::Services::MutateCustomerManagerLinkRequest.new + # + # # Call the mutate_customer_manager_link method. + # result = client.mutate_customer_manager_link request + # + # # The returned object is of type Google::Ads::GoogleAds::V25::Services::MutateCustomerManagerLinkResponse. + # p result + # + def mutate_customer_manager_link request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::GoogleAds::V25::Services::MutateCustomerManagerLinkRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.mutate_customer_manager_link.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Ads::GoogleAds::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.customer_id + header_params["customer_id"] = request.customer_id + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.mutate_customer_manager_link.timeout, + metadata: metadata, + retry_policy: @config.rpcs.mutate_customer_manager_link.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @customer_manager_link_service_stub.call_rpc :mutate_customer_manager_link, request, + options: options do |response, operation| + yield response, operation if block_given? + end + # rescue GRPC::BadStatus => grpc_error + # raise Google::Ads::GoogleAds::Error.new grpc_error.message + end + + ## + # Moves a client customer to a new manager customer. + # This simplifies the complex request that requires two operations to move + # a client customer to a new manager, for example: + # 1. Update operation with Status INACTIVE (previous manager) and, + # 2. Update operation with Status ACTIVE (new manager). + # + # List of thrown errors: + # [AuthenticationError]() + # [AuthorizationError]() + # [DatabaseError]() + # [FieldError]() + # [HeaderError]() + # [InternalError]() + # [MutateError]() + # [QuotaError]() + # [RequestError]() + # + # @overload move_manager_link(request, options = nil) + # Pass arguments to `move_manager_link` via a request object, either of type + # {::Google::Ads::GoogleAds::V25::Services::MoveManagerLinkRequest} or an equivalent Hash. + # + # @param request [::Google::Ads::GoogleAds::V25::Services::MoveManagerLinkRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload move_manager_link(customer_id: nil, previous_customer_manager_link: nil, new_manager: nil, validate_only: nil) + # Pass arguments to `move_manager_link` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param customer_id [::String] + # Required. The ID of the client customer that is being moved. + # @param previous_customer_manager_link [::String] + # Required. The resource name of the previous CustomerManagerLink. + # The resource name has the form: + # `customers/{customer_id}/customerManagerLinks/{manager_customer_id}~{manager_link_id}` + # @param new_manager [::String] + # Required. The resource name of the new manager customer that the client + # wants to move to. Customer resource names have the format: + # "customers/\\{customer_id}" + # @param validate_only [::Boolean] + # If true, the request is validated but not executed. Only errors are + # returned, not results. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Ads::GoogleAds::V25::Services::MoveManagerLinkResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Ads::GoogleAds::V25::Services::MoveManagerLinkResponse] + # + # @raise [Google::Ads::GoogleAds::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/ads/google_ads/v25/services" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Ads::GoogleAds::V25::Services::CustomerManagerLinkService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Ads::GoogleAds::V25::Services::MoveManagerLinkRequest.new + # + # # Call the move_manager_link method. + # result = client.move_manager_link request + # + # # The returned object is of type Google::Ads::GoogleAds::V25::Services::MoveManagerLinkResponse. + # p result + # + def move_manager_link request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::GoogleAds::V25::Services::MoveManagerLinkRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.move_manager_link.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Ads::GoogleAds::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.customer_id + header_params["customer_id"] = request.customer_id + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.move_manager_link.timeout, + metadata: metadata, + retry_policy: @config.rpcs.move_manager_link.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @customer_manager_link_service_stub.call_rpc :move_manager_link, request, + options: options do |response, operation| + yield response, operation if block_given? + end + # rescue GRPC::BadStatus => grpc_error + # raise Google::Ads::GoogleAds::Error.new grpc_error.message + end + + ## + # Configuration class for the CustomerManagerLinkService API. + # + # This class represents the configuration for CustomerManagerLinkService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Ads::GoogleAds::V25::Services::CustomerManagerLinkService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # mutate_customer_manager_link to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Ads::GoogleAds::V25::Services::CustomerManagerLinkService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.mutate_customer_manager_link.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Ads::GoogleAds::V25::Services::CustomerManagerLinkService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.mutate_customer_manager_link.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Ads::GoogleAds::V25::Services::CustomerManagerLinkService::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "googleads.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, + ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the CustomerManagerLinkService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `mutate_customer_manager_link` + # @return [::Gapic::Config::Method] + # + attr_reader :mutate_customer_manager_link + ## + # RPC-specific configuration for `move_manager_link` + # @return [::Gapic::Config::Method] + # + attr_reader :move_manager_link + + # @private + def initialize parent_rpcs = nil + mutate_customer_manager_link_config = parent_rpcs.mutate_customer_manager_link if parent_rpcs.respond_to? :mutate_customer_manager_link + @mutate_customer_manager_link = ::Gapic::Config::Method.new mutate_customer_manager_link_config + move_manager_link_config = parent_rpcs.move_manager_link if parent_rpcs.respond_to? :move_manager_link + @move_manager_link = ::Gapic::Config::Method.new move_manager_link_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/customer_manager_link_service/credentials.rb b/lib/google/ads/google_ads/v25/services/customer_manager_link_service/credentials.rb new file mode 100644 index 000000000..287fa093f --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/customer_manager_link_service/credentials.rb @@ -0,0 +1,38 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Ads + module GoogleAds + module V25 + module Services + module CustomerManagerLinkService + # Credentials for the CustomerManagerLinkService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/adwords" + ] + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/customer_manager_link_service/paths.rb b/lib/google/ads/google_ads/v25/services/customer_manager_link_service/paths.rb new file mode 100644 index 000000000..8c48c686e --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/customer_manager_link_service/paths.rb @@ -0,0 +1,68 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Ads + module GoogleAds + module V25 + module Services + module CustomerManagerLinkService + # Path helper methods for the CustomerManagerLinkService API. + module Paths + ## + # Create a fully-qualified Customer resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}` + # + # @param customer_id [String] + # + # @return [::String] + def customer_path customer_id: + "customers/#{customer_id}" + end + + ## + # Create a fully-qualified CustomerManagerLink resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/customerManagerLinks/{manager_customer_id}~{manager_link_id}` + # + # @param customer_id [String] + # @param manager_customer_id [String] + # @param manager_link_id [String] + # + # @return [::String] + def customer_manager_link_path customer_id:, manager_customer_id:, manager_link_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + raise ::ArgumentError, "manager_customer_id cannot contain /" if manager_customer_id.to_s.include? "/" + + "customers/#{customer_id}/customerManagerLinks/#{manager_customer_id}~#{manager_link_id}" + end + + extend self + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/customer_manager_link_service_pb.rb b/lib/google/ads/google_ads/v25/services/customer_manager_link_service_pb.rb new file mode 100644 index 000000000..8364dcf6c --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/customer_manager_link_service_pb.rb @@ -0,0 +1,35 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/services/customer_manager_link_service.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/resources/customer_manager_link_pb' +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/field_mask_pb' + + +descriptor_data = "\nEgoogle/ads/googleads/v25/services/customer_manager_link_service.proto\x12!google.ads.googleads.v25.services\x1a>google/ads/googleads/v25/resources/customer_manager_link.proto\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\"\xad\x01\n MutateCustomerManagerLinkRequest\x12\x18\n\x0b\x63ustomer_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12X\n\noperations\x18\x02 \x03(\x0b\x32?.google.ads.googleads.v25.services.CustomerManagerLinkOperationB\x03\xe0\x41\x02\x12\x15\n\rvalidate_only\x18\x03 \x01(\x08\"\x90\x01\n\x16MoveManagerLinkRequest\x12\x18\n\x0b\x63ustomer_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12+\n\x1eprevious_customer_manager_link\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x0bnew_manager\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x15\n\rvalidate_only\x18\x04 \x01(\x08\"\xa7\x01\n\x1c\x43ustomerManagerLinkOperation\x12/\n\x0bupdate_mask\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\x12I\n\x06update\x18\x02 \x01(\x0b\x32\x37.google.ads.googleads.v25.resources.CustomerManagerLinkH\x00\x42\x0b\n\toperation\"x\n!MutateCustomerManagerLinkResponse\x12S\n\x07results\x18\x01 \x03(\x0b\x32\x42.google.ads.googleads.v25.services.MutateCustomerManagerLinkResult\"c\n\x17MoveManagerLinkResponse\x12H\n\rresource_name\x18\x01 \x01(\tB1\xfa\x41.\n,googleads.googleapis.com/CustomerManagerLink\"k\n\x1fMutateCustomerManagerLinkResult\x12H\n\rresource_name\x18\x01 \x01(\tB1\xfa\x41.\n,googleads.googleapis.com/CustomerManagerLink2\x81\x05\n\x1a\x43ustomerManagerLinkService\x12\x86\x02\n\x19MutateCustomerManagerLink\x12\x43.google.ads.googleads.v25.services.MutateCustomerManagerLinkRequest\x1a\x44.google.ads.googleads.v25.services.MutateCustomerManagerLinkResponse\"^\xda\x41\x16\x63ustomer_id,operations\x82\xd3\xe4\x93\x02?\":/v25/customers/{customer_id=*}/customerManagerLinks:mutate:\x01*\x12\x92\x02\n\x0fMoveManagerLink\x12\x39.google.ads.googleads.v25.services.MoveManagerLinkRequest\x1a:.google.ads.googleads.v25.services.MoveManagerLinkResponse\"\x87\x01\xda\x41\x36\x63ustomer_id,previous_customer_manager_link,new_manager\x82\xd3\xe4\x93\x02H\"C/v25/customers/{customer_id=*}/customerManagerLinks:moveManagerLink:\x01*\x1a\x45\xca\x41\x18googleads.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/adwordsB\x8b\x02\n%com.google.ads.googleads.v25.servicesB\x1f\x43ustomerManagerLinkServiceProtoP\x01ZIgoogle.golang.org/genproto/googleapis/ads/googleads/v25/services;services\xa2\x02\x03GAA\xaa\x02!Google.Ads.GoogleAds.V25.Services\xca\x02!Google\\Ads\\GoogleAds\\V25\\Services\xea\x02%Google::Ads::GoogleAds::V25::Servicesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Services + MutateCustomerManagerLinkRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.MutateCustomerManagerLinkRequest").msgclass + MoveManagerLinkRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.MoveManagerLinkRequest").msgclass + CustomerManagerLinkOperation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.CustomerManagerLinkOperation").msgclass + MutateCustomerManagerLinkResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.MutateCustomerManagerLinkResponse").msgclass + MoveManagerLinkResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.MoveManagerLinkResponse").msgclass + MutateCustomerManagerLinkResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.MutateCustomerManagerLinkResult").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/customer_manager_link_service_services_pb.rb b/lib/google/ads/google_ads/v25/services/customer_manager_link_service_services_pb.rb new file mode 100644 index 000000000..62f20254a --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/customer_manager_link_service_services_pb.rb @@ -0,0 +1,77 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/ads/googleads/v25/services/customer_manager_link_service.proto for package 'Google.Ads.GoogleAds.V25.Services' +# Original file comments: +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +require 'grpc' +require 'google/ads/google_ads/v25/services/customer_manager_link_service_pb' + +module Google + module Ads + module GoogleAds + module V25 + module Services + module CustomerManagerLinkService + # Service to manage customer-manager links. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.ads.googleads.v25.services.CustomerManagerLinkService' + + # Updates customer manager links. Operation statuses are returned. + # + # List of thrown errors: + # [AuthenticationError]() + # [AuthorizationError]() + # [DatabaseError]() + # [FieldError]() + # [FieldMaskError]() + # [HeaderError]() + # [InternalError]() + # [ManagerLinkError]() + # [MutateError]() + # [QuotaError]() + # [RequestError]() + rpc :MutateCustomerManagerLink, ::Google::Ads::GoogleAds::V25::Services::MutateCustomerManagerLinkRequest, ::Google::Ads::GoogleAds::V25::Services::MutateCustomerManagerLinkResponse + # Moves a client customer to a new manager customer. + # This simplifies the complex request that requires two operations to move + # a client customer to a new manager, for example: + # 1. Update operation with Status INACTIVE (previous manager) and, + # 2. Update operation with Status ACTIVE (new manager). + # + # List of thrown errors: + # [AuthenticationError]() + # [AuthorizationError]() + # [DatabaseError]() + # [FieldError]() + # [HeaderError]() + # [InternalError]() + # [MutateError]() + # [QuotaError]() + # [RequestError]() + rpc :MoveManagerLink, ::Google::Ads::GoogleAds::V25::Services::MoveManagerLinkRequest, ::Google::Ads::GoogleAds::V25::Services::MoveManagerLinkResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/customer_negative_criterion_service.rb b/lib/google/ads/google_ads/v25/services/customer_negative_criterion_service.rb new file mode 100644 index 000000000..e9abe0b5c --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/customer_negative_criterion_service.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/ads/google_ads/version" + +require "google/ads/google_ads/v25/services/customer_negative_criterion_service/credentials" +require "google/ads/google_ads/v25/services/customer_negative_criterion_service/paths" +require "google/ads/google_ads/v25/services/customer_negative_criterion_service/client" + +module Google + module Ads + module GoogleAds + module V25 + module Services + ## + # Service to manage customer negative criteria. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/ads/google_ads/v25/services/customer_negative_criterion_service" + # client = ::Google::Ads::GoogleAds::V25::Services::CustomerNegativeCriterionService::Client.new + # + module CustomerNegativeCriterionService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "customer_negative_criterion_service", "helpers.rb" +require "google/ads/google_ads/v25/services/customer_negative_criterion_service/helpers" if ::File.file? helper_path diff --git a/lib/google/ads/google_ads/v25/services/customer_negative_criterion_service/client.rb b/lib/google/ads/google_ads/v25/services/customer_negative_criterion_service/client.rb new file mode 100644 index 000000000..230355722 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/customer_negative_criterion_service/client.rb @@ -0,0 +1,503 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# require "google/ads/google_ads/error" +require "google/ads/google_ads/v25/services/customer_negative_criterion_service_pb" + +module Google + module Ads + module GoogleAds + module V25 + module Services + module CustomerNegativeCriterionService + ## + # Client for the CustomerNegativeCriterionService service. + # + # Service to manage customer negative criteria. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "googleads.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :customer_negative_criterion_service_stub + + ## + # Configure the CustomerNegativeCriterionService Client class. + # + # See {::Google::Ads::GoogleAds::V25::Services::CustomerNegativeCriterionService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all CustomerNegativeCriterionService clients + # ::Google::Ads::GoogleAds::V25::Services::CustomerNegativeCriterionService::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + default_config = Client::Configuration.new + + default_config.timeout = 14_400.0 + default_config.retry_policy = { + initial_delay: 5.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the CustomerNegativeCriterionService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Ads::GoogleAds::V25::Services::CustomerNegativeCriterionService::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @customer_negative_criterion_service_stub.universe_domain + end + + ## + # Create a new CustomerNegativeCriterionService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Ads::GoogleAds::V25::Services::CustomerNegativeCriterionService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Ads::GoogleAds::V25::Services::CustomerNegativeCriterionService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the CustomerNegativeCriterionService client. + # @yieldparam config [Client::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/ads/google_ads/v25/services/customer_negative_criterion_service_services_pb" + + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @customer_negative_criterion_service_stub = ::Gapic::ServiceStub.new( + ::Google::Ads::GoogleAds::V25::Services::CustomerNegativeCriterionService::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool, + logger: @config.logger + ) + + @customer_negative_criterion_service_stub.stub_logger&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @customer_negative_criterion_service_stub.logger + end + + # Service calls + + ## + # Creates or removes criteria. Operation statuses are returned. + # + # List of thrown errors: + # [AuthenticationError]() + # [AuthorizationError]() + # [CriterionError]() + # [DatabaseError]() + # [FieldError]() + # [HeaderError]() + # [InternalError]() + # [MutateError]() + # [QuotaError]() + # [RequestError]() + # + # @overload mutate_customer_negative_criteria(request, options = nil) + # Pass arguments to `mutate_customer_negative_criteria` via a request object, either of type + # {::Google::Ads::GoogleAds::V25::Services::MutateCustomerNegativeCriteriaRequest} or an equivalent Hash. + # + # @param request [::Google::Ads::GoogleAds::V25::Services::MutateCustomerNegativeCriteriaRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload mutate_customer_negative_criteria(customer_id: nil, operations: nil, partial_failure: nil, validate_only: nil, response_content_type: nil) + # Pass arguments to `mutate_customer_negative_criteria` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param customer_id [::String] + # Required. The ID of the customer whose criteria are being modified. + # @param operations [::Array<::Google::Ads::GoogleAds::V25::Services::CustomerNegativeCriterionOperation, ::Hash>] + # Required. The list of operations to perform on individual criteria. + # @param partial_failure [::Boolean] + # 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. + # @param validate_only [::Boolean] + # If true, the request is validated but not executed. Only errors are + # returned, not results. + # @param response_content_type [::Google::Ads::GoogleAds::V25::Enums::ResponseContentTypeEnum::ResponseContentType] + # The response content type setting. Determines whether the mutable resource + # or just the resource name should be returned post mutation. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Ads::GoogleAds::V25::Services::MutateCustomerNegativeCriteriaResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Ads::GoogleAds::V25::Services::MutateCustomerNegativeCriteriaResponse] + # + # @raise [Google::Ads::GoogleAds::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/ads/google_ads/v25/services" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Ads::GoogleAds::V25::Services::CustomerNegativeCriterionService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Ads::GoogleAds::V25::Services::MutateCustomerNegativeCriteriaRequest.new + # + # # Call the mutate_customer_negative_criteria method. + # result = client.mutate_customer_negative_criteria request + # + # # The returned object is of type Google::Ads::GoogleAds::V25::Services::MutateCustomerNegativeCriteriaResponse. + # p result + # + def mutate_customer_negative_criteria request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::GoogleAds::V25::Services::MutateCustomerNegativeCriteriaRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.mutate_customer_negative_criteria.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Ads::GoogleAds::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.customer_id + header_params["customer_id"] = request.customer_id + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.mutate_customer_negative_criteria.timeout, + metadata: metadata, + retry_policy: @config.rpcs.mutate_customer_negative_criteria.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @customer_negative_criterion_service_stub.call_rpc :mutate_customer_negative_criteria, request, + options: options do |response, operation| + yield response, operation if block_given? + end + # rescue GRPC::BadStatus => grpc_error + # raise Google::Ads::GoogleAds::Error.new grpc_error.message + end + + ## + # Configuration class for the CustomerNegativeCriterionService API. + # + # This class represents the configuration for CustomerNegativeCriterionService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Ads::GoogleAds::V25::Services::CustomerNegativeCriterionService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # mutate_customer_negative_criteria to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Ads::GoogleAds::V25::Services::CustomerNegativeCriterionService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.mutate_customer_negative_criteria.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Ads::GoogleAds::V25::Services::CustomerNegativeCriterionService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.mutate_customer_negative_criteria.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Ads::GoogleAds::V25::Services::CustomerNegativeCriterionService::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "googleads.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, + ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the CustomerNegativeCriterionService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `mutate_customer_negative_criteria` + # @return [::Gapic::Config::Method] + # + attr_reader :mutate_customer_negative_criteria + + # @private + def initialize parent_rpcs = nil + mutate_customer_negative_criteria_config = parent_rpcs.mutate_customer_negative_criteria if parent_rpcs.respond_to? :mutate_customer_negative_criteria + @mutate_customer_negative_criteria = ::Gapic::Config::Method.new mutate_customer_negative_criteria_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/customer_negative_criterion_service/credentials.rb b/lib/google/ads/google_ads/v25/services/customer_negative_criterion_service/credentials.rb new file mode 100644 index 000000000..bf5076860 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/customer_negative_criterion_service/credentials.rb @@ -0,0 +1,38 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Ads + module GoogleAds + module V25 + module Services + module CustomerNegativeCriterionService + # Credentials for the CustomerNegativeCriterionService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/adwords" + ] + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/customer_negative_criterion_service/paths.rb b/lib/google/ads/google_ads/v25/services/customer_negative_criterion_service/paths.rb new file mode 100644 index 000000000..9f21c6e18 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/customer_negative_criterion_service/paths.rb @@ -0,0 +1,66 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Ads + module GoogleAds + module V25 + module Services + module CustomerNegativeCriterionService + # Path helper methods for the CustomerNegativeCriterionService API. + module Paths + ## + # Create a fully-qualified CustomerNegativeCriterion resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/customerNegativeCriteria/{criterion_id}` + # + # @param customer_id [String] + # @param criterion_id [String] + # + # @return [::String] + def customer_negative_criterion_path customer_id:, criterion_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/customerNegativeCriteria/#{criterion_id}" + end + + ## + # Create a fully-qualified MobileAppCategoryConstant resource string. + # + # The resource will be in the following format: + # + # `mobileAppCategoryConstants/{mobile_app_category_id}` + # + # @param mobile_app_category_id [String] + # + # @return [::String] + def mobile_app_category_constant_path mobile_app_category_id: + "mobileAppCategoryConstants/#{mobile_app_category_id}" + end + + extend self + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/customer_negative_criterion_service_pb.rb b/lib/google/ads/google_ads/v25/services/customer_negative_criterion_service_pb.rb new file mode 100644 index 000000000..219361337 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/customer_negative_criterion_service_pb.rb @@ -0,0 +1,34 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/services/customer_negative_criterion_service.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/enums/response_content_type_pb' +require 'google/ads/google_ads/v25/resources/customer_negative_criterion_pb' +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/rpc/status_pb' + + +descriptor_data = "\nKgoogle/ads/googleads/v25/services/customer_negative_criterion_service.proto\x12!google.ads.googleads.v25.services\x1a:google/ads/googleads/v25/enums/response_content_type.proto\x1a\x44google/ads/googleads/v25/resources/customer_negative_criterion.proto\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x17google/rpc/status.proto\"\xbd\x02\n%MutateCustomerNegativeCriteriaRequest\x12\x18\n\x0b\x63ustomer_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12^\n\noperations\x18\x02 \x03(\x0b\x32\x45.google.ads.googleads.v25.services.CustomerNegativeCriterionOperationB\x03\xe0\x41\x02\x12\x17\n\x0fpartial_failure\x18\x03 \x01(\x08\x12\x15\n\rvalidate_only\x18\x04 \x01(\x08\x12j\n\x15response_content_type\x18\x05 \x01(\x0e\x32K.google.ads.googleads.v25.enums.ResponseContentTypeEnum.ResponseContentType\"\xcd\x01\n\"CustomerNegativeCriterionOperation\x12O\n\x06\x63reate\x18\x01 \x01(\x0b\x32=.google.ads.googleads.v25.resources.CustomerNegativeCriterionH\x00\x12I\n\x06remove\x18\x02 \x01(\tB7\xfa\x41\x34\n2googleads.googleapis.com/CustomerNegativeCriterionH\x00\x42\x0b\n\toperation\"\xb5\x01\n&MutateCustomerNegativeCriteriaResponse\x12\x31\n\x15partial_failure_error\x18\x03 \x01(\x0b\x32\x12.google.rpc.Status\x12X\n\x07results\x18\x02 \x03(\x0b\x32G.google.ads.googleads.v25.services.MutateCustomerNegativeCriteriaResult\"\xda\x01\n$MutateCustomerNegativeCriteriaResult\x12N\n\rresource_name\x18\x01 \x01(\tB7\xfa\x41\x34\n2googleads.googleapis.com/CustomerNegativeCriterion\x12\x62\n\x1b\x63ustomer_negative_criterion\x18\x02 \x01(\x0b\x32=.google.ads.googleads.v25.resources.CustomerNegativeCriterion2\x85\x03\n CustomerNegativeCriterionService\x12\x99\x02\n\x1eMutateCustomerNegativeCriteria\x12H.google.ads.googleads.v25.services.MutateCustomerNegativeCriteriaRequest\x1aI.google.ads.googleads.v25.services.MutateCustomerNegativeCriteriaResponse\"b\xda\x41\x16\x63ustomer_id,operations\x82\xd3\xe4\x93\x02\x43\">/v25/customers/{customer_id=*}/customerNegativeCriteria:mutate:\x01*\x1a\x45\xca\x41\x18googleads.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/adwordsB\x91\x02\n%com.google.ads.googleads.v25.servicesB%CustomerNegativeCriterionServiceProtoP\x01ZIgoogle.golang.org/genproto/googleapis/ads/googleads/v25/services;services\xa2\x02\x03GAA\xaa\x02!Google.Ads.GoogleAds.V25.Services\xca\x02!Google\\Ads\\GoogleAds\\V25\\Services\xea\x02%Google::Ads::GoogleAds::V25::Servicesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Services + MutateCustomerNegativeCriteriaRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.MutateCustomerNegativeCriteriaRequest").msgclass + CustomerNegativeCriterionOperation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.CustomerNegativeCriterionOperation").msgclass + MutateCustomerNegativeCriteriaResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.MutateCustomerNegativeCriteriaResponse").msgclass + MutateCustomerNegativeCriteriaResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.MutateCustomerNegativeCriteriaResult").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/customer_negative_criterion_service_services_pb.rb b/lib/google/ads/google_ads/v25/services/customer_negative_criterion_service_services_pb.rb new file mode 100644 index 000000000..8d45c86db --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/customer_negative_criterion_service_services_pb.rb @@ -0,0 +1,61 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/ads/googleads/v25/services/customer_negative_criterion_service.proto for package 'Google.Ads.GoogleAds.V25.Services' +# Original file comments: +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +require 'grpc' +require 'google/ads/google_ads/v25/services/customer_negative_criterion_service_pb' + +module Google + module Ads + module GoogleAds + module V25 + module Services + module CustomerNegativeCriterionService + # Proto file describing the Customer Negative Criterion service. + # + # Service to manage customer negative criteria. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.ads.googleads.v25.services.CustomerNegativeCriterionService' + + # Creates or removes criteria. Operation statuses are returned. + # + # List of thrown errors: + # [AuthenticationError]() + # [AuthorizationError]() + # [CriterionError]() + # [DatabaseError]() + # [FieldError]() + # [HeaderError]() + # [InternalError]() + # [MutateError]() + # [QuotaError]() + # [RequestError]() + rpc :MutateCustomerNegativeCriteria, ::Google::Ads::GoogleAds::V25::Services::MutateCustomerNegativeCriteriaRequest, ::Google::Ads::GoogleAds::V25::Services::MutateCustomerNegativeCriteriaResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/customer_service.rb b/lib/google/ads/google_ads/v25/services/customer_service.rb new file mode 100644 index 000000000..9408d1fb9 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/customer_service.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/ads/google_ads/version" + +require "google/ads/google_ads/v25/services/customer_service/credentials" +require "google/ads/google_ads/v25/services/customer_service/paths" +require "google/ads/google_ads/v25/services/customer_service/client" + +module Google + module Ads + module GoogleAds + module V25 + module Services + ## + # Service to manage customers. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/ads/google_ads/v25/services/customer_service" + # client = ::Google::Ads::GoogleAds::V25::Services::CustomerService::Client.new + # + module CustomerService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "customer_service", "helpers.rb" +require "google/ads/google_ads/v25/services/customer_service/helpers" if ::File.file? helper_path diff --git a/lib/google/ads/google_ads/v25/services/customer_service/client.rb b/lib/google/ads/google_ads/v25/services/customer_service/client.rb new file mode 100644 index 000000000..de2bf6b37 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/customer_service/client.rb @@ -0,0 +1,701 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# require "google/ads/google_ads/error" +require "google/ads/google_ads/v25/services/customer_service_pb" + +module Google + module Ads + module GoogleAds + module V25 + module Services + module CustomerService + ## + # Client for the CustomerService service. + # + # Service to manage customers. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "googleads.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :customer_service_stub + + ## + # Configure the CustomerService Client class. + # + # See {::Google::Ads::GoogleAds::V25::Services::CustomerService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all CustomerService clients + # ::Google::Ads::GoogleAds::V25::Services::CustomerService::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + default_config = Client::Configuration.new + + default_config.timeout = 14_400.0 + default_config.retry_policy = { + initial_delay: 5.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the CustomerService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Ads::GoogleAds::V25::Services::CustomerService::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @customer_service_stub.universe_domain + end + + ## + # Create a new CustomerService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Ads::GoogleAds::V25::Services::CustomerService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Ads::GoogleAds::V25::Services::CustomerService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the CustomerService client. + # @yieldparam config [Client::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/ads/google_ads/v25/services/customer_service_services_pb" + + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @customer_service_stub = ::Gapic::ServiceStub.new( + ::Google::Ads::GoogleAds::V25::Services::CustomerService::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool, + logger: @config.logger + ) + + @customer_service_stub.stub_logger&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @customer_service_stub.logger + end + + # Service calls + + ## + # Updates a customer. Operation statuses are returned. + # + # List of thrown errors: + # [AuthenticationError]() + # [AuthorizationError]() + # [DatabaseError]() + # [FieldMaskError]() + # [HeaderError]() + # [InternalError]() + # [QuotaError]() + # [RequestError]() + # [UrlFieldError]() + # + # @overload mutate_customer(request, options = nil) + # Pass arguments to `mutate_customer` via a request object, either of type + # {::Google::Ads::GoogleAds::V25::Services::MutateCustomerRequest} or an equivalent Hash. + # + # @param request [::Google::Ads::GoogleAds::V25::Services::MutateCustomerRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload mutate_customer(customer_id: nil, operation: nil, validate_only: nil, response_content_type: nil) + # Pass arguments to `mutate_customer` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param customer_id [::String] + # Required. The ID of the customer being modified. + # @param operation [::Google::Ads::GoogleAds::V25::Services::CustomerOperation, ::Hash] + # Required. The operation to perform on the customer + # @param validate_only [::Boolean] + # If true, the request is validated but not executed. Only errors are + # returned, not results. + # @param response_content_type [::Google::Ads::GoogleAds::V25::Enums::ResponseContentTypeEnum::ResponseContentType] + # The response content type setting. Determines whether the mutable resource + # or just the resource name should be returned post mutation. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Ads::GoogleAds::V25::Services::MutateCustomerResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Ads::GoogleAds::V25::Services::MutateCustomerResponse] + # + # @raise [Google::Ads::GoogleAds::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/ads/google_ads/v25/services" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Ads::GoogleAds::V25::Services::CustomerService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Ads::GoogleAds::V25::Services::MutateCustomerRequest.new + # + # # Call the mutate_customer method. + # result = client.mutate_customer request + # + # # The returned object is of type Google::Ads::GoogleAds::V25::Services::MutateCustomerResponse. + # p result + # + def mutate_customer request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::GoogleAds::V25::Services::MutateCustomerRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.mutate_customer.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Ads::GoogleAds::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.customer_id + header_params["customer_id"] = request.customer_id + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.mutate_customer.timeout, + metadata: metadata, + retry_policy: @config.rpcs.mutate_customer.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @customer_service_stub.call_rpc :mutate_customer, request, options: options do |response, operation| + yield response, operation if block_given? + end + # rescue GRPC::BadStatus => grpc_error + # raise Google::Ads::GoogleAds::Error.new grpc_error.message + end + + ## + # Returns resource names of customers directly accessible by the + # user authenticating the call. + # + # List of thrown errors: + # [AuthenticationError]() + # [AuthorizationError]() + # [HeaderError]() + # [InternalError]() + # [QuotaError]() + # [RequestError]() + # + # @overload list_accessible_customers(request, options = nil) + # Pass arguments to `list_accessible_customers` via a request object, either of type + # {::Google::Ads::GoogleAds::V25::Services::ListAccessibleCustomersRequest} or an equivalent Hash. + # + # @param request [::Google::Ads::GoogleAds::V25::Services::ListAccessibleCustomersRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Ads::GoogleAds::V25::Services::ListAccessibleCustomersResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Ads::GoogleAds::V25::Services::ListAccessibleCustomersResponse] + # + # @raise [Google::Ads::GoogleAds::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/ads/google_ads/v25/services" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Ads::GoogleAds::V25::Services::CustomerService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Ads::GoogleAds::V25::Services::ListAccessibleCustomersRequest.new + # + # # Call the list_accessible_customers method. + # result = client.list_accessible_customers request + # + # # The returned object is of type Google::Ads::GoogleAds::V25::Services::ListAccessibleCustomersResponse. + # p result + # + def list_accessible_customers request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::GoogleAds::V25::Services::ListAccessibleCustomersRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_accessible_customers.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Ads::GoogleAds::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_accessible_customers.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_accessible_customers.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @customer_service_stub.call_rpc :list_accessible_customers, request, + options: options do |response, operation| + yield response, operation if block_given? + end + # rescue GRPC::BadStatus => grpc_error + # raise Google::Ads::GoogleAds::Error.new grpc_error.message + end + + ## + # Creates a new client under manager. The new client customer is returned. + # + # List of thrown errors: + # [AccessInvitationError]() + # [AuthenticationError]() + # [AuthorizationError]() + # [CurrencyCodeError]() + # [HeaderError]() + # [InternalError]() + # [ManagerLinkError]() + # [QuotaError]() + # [RequestError]() + # [StringLengthError]() + # [TimeZoneError]() + # + # @overload create_customer_client(request, options = nil) + # Pass arguments to `create_customer_client` via a request object, either of type + # {::Google::Ads::GoogleAds::V25::Services::CreateCustomerClientRequest} or an equivalent Hash. + # + # @param request [::Google::Ads::GoogleAds::V25::Services::CreateCustomerClientRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_customer_client(customer_id: nil, customer_client: nil, email_address: nil, access_role: nil, validate_only: nil) + # Pass arguments to `create_customer_client` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param customer_id [::String] + # Required. The ID of the Manager under whom client customer is being + # created. + # @param customer_client [::Google::Ads::GoogleAds::V25::Resources::Customer, ::Hash] + # Required. The new client customer to create. The resource name on this + # customer will be ignored. + # @param email_address [::String] + # Email address of the user who should be invited on the created client + # customer. Accessible only to customers on the allow-list. + # @param access_role [::Google::Ads::GoogleAds::V25::Enums::AccessRoleEnum::AccessRole] + # The proposed role of user on the created client customer. + # Accessible only to customers on the allow-list. + # @param validate_only [::Boolean] + # If true, the request is validated but not executed. Only errors are + # returned, not results. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Ads::GoogleAds::V25::Services::CreateCustomerClientResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Ads::GoogleAds::V25::Services::CreateCustomerClientResponse] + # + # @raise [Google::Ads::GoogleAds::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/ads/google_ads/v25/services" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Ads::GoogleAds::V25::Services::CustomerService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Ads::GoogleAds::V25::Services::CreateCustomerClientRequest.new + # + # # Call the create_customer_client method. + # result = client.create_customer_client request + # + # # The returned object is of type Google::Ads::GoogleAds::V25::Services::CreateCustomerClientResponse. + # p result + # + def create_customer_client request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::GoogleAds::V25::Services::CreateCustomerClientRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_customer_client.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Ads::GoogleAds::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.customer_id + header_params["customer_id"] = request.customer_id + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_customer_client.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_customer_client.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @customer_service_stub.call_rpc :create_customer_client, request, + options: options do |response, operation| + yield response, operation if block_given? + end + # rescue GRPC::BadStatus => grpc_error + # raise Google::Ads::GoogleAds::Error.new grpc_error.message + end + + ## + # Configuration class for the CustomerService API. + # + # This class represents the configuration for CustomerService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Ads::GoogleAds::V25::Services::CustomerService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # mutate_customer to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Ads::GoogleAds::V25::Services::CustomerService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.mutate_customer.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Ads::GoogleAds::V25::Services::CustomerService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.mutate_customer.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Ads::GoogleAds::V25::Services::CustomerService::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "googleads.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, + ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the CustomerService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `mutate_customer` + # @return [::Gapic::Config::Method] + # + attr_reader :mutate_customer + ## + # RPC-specific configuration for `list_accessible_customers` + # @return [::Gapic::Config::Method] + # + attr_reader :list_accessible_customers + ## + # RPC-specific configuration for `create_customer_client` + # @return [::Gapic::Config::Method] + # + attr_reader :create_customer_client + + # @private + def initialize parent_rpcs = nil + mutate_customer_config = parent_rpcs.mutate_customer if parent_rpcs.respond_to? :mutate_customer + @mutate_customer = ::Gapic::Config::Method.new mutate_customer_config + list_accessible_customers_config = parent_rpcs.list_accessible_customers if parent_rpcs.respond_to? :list_accessible_customers + @list_accessible_customers = ::Gapic::Config::Method.new list_accessible_customers_config + create_customer_client_config = parent_rpcs.create_customer_client if parent_rpcs.respond_to? :create_customer_client + @create_customer_client = ::Gapic::Config::Method.new create_customer_client_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/customer_service/credentials.rb b/lib/google/ads/google_ads/v25/services/customer_service/credentials.rb new file mode 100644 index 000000000..ecf3a77ae --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/customer_service/credentials.rb @@ -0,0 +1,38 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Ads + module GoogleAds + module V25 + module Services + module CustomerService + # Credentials for the CustomerService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/adwords" + ] + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/customer_service/paths.rb b/lib/google/ads/google_ads/v25/services/customer_service/paths.rb new file mode 100644 index 000000000..3361c308f --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/customer_service/paths.rb @@ -0,0 +1,66 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Ads + module GoogleAds + module V25 + module Services + module CustomerService + # Path helper methods for the CustomerService API. + module Paths + ## + # Create a fully-qualified ConversionAction resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/conversionActions/{conversion_action_id}` + # + # @param customer_id [String] + # @param conversion_action_id [String] + # + # @return [::String] + def conversion_action_path customer_id:, conversion_action_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/conversionActions/#{conversion_action_id}" + end + + ## + # Create a fully-qualified Customer resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}` + # + # @param customer_id [String] + # + # @return [::String] + def customer_path customer_id: + "customers/#{customer_id}" + end + + extend self + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/customer_service_pb.rb b/lib/google/ads/google_ads/v25/services/customer_service_pb.rb new file mode 100644 index 000000000..0d3294c80 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/customer_service_pb.rb @@ -0,0 +1,39 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/services/customer_service.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/enums/access_role_pb' +require 'google/ads/google_ads/v25/enums/response_content_type_pb' +require 'google/ads/google_ads/v25/resources/customer_pb' +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/field_mask_pb' + + +descriptor_data = "\n8google/ads/googleads/v25/services/customer_service.proto\x12!google.ads.googleads.v25.services\x1a\x30google/ads/googleads/v25/enums/access_role.proto\x1a:google/ads/googleads/v25/enums/response_content_type.proto\x1a\x31google/ads/googleads/v25/resources/customer.proto\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\"\x82\x02\n\x15MutateCustomerRequest\x12\x18\n\x0b\x63ustomer_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12L\n\toperation\x18\x04 \x01(\x0b\x32\x34.google.ads.googleads.v25.services.CustomerOperationB\x03\xe0\x41\x02\x12\x15\n\rvalidate_only\x18\x05 \x01(\x08\x12j\n\x15response_content_type\x18\x06 \x01(\x0e\x32K.google.ads.googleads.v25.enums.ResponseContentTypeEnum.ResponseContentType\"\x98\x02\n\x1b\x43reateCustomerClientRequest\x12\x18\n\x0b\x63ustomer_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12J\n\x0f\x63ustomer_client\x18\x02 \x01(\x0b\x32,.google.ads.googleads.v25.resources.CustomerB\x03\xe0\x41\x02\x12\x1a\n\remail_address\x18\x05 \x01(\tH\x00\x88\x01\x01\x12N\n\x0b\x61\x63\x63\x65ss_role\x18\x04 \x01(\x0e\x32\x39.google.ads.googleads.v25.enums.AccessRoleEnum.AccessRole\x12\x15\n\rvalidate_only\x18\x06 \x01(\x08\x42\x10\n\x0e_email_address\"\x82\x01\n\x11\x43ustomerOperation\x12<\n\x06update\x18\x01 \x01(\x0b\x32,.google.ads.googleads.v25.resources.Customer\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"v\n\x1c\x43reateCustomerClientResponse\x12=\n\rresource_name\x18\x02 \x01(\tB&\xfa\x41#\n!googleads.googleapis.com/Customer\x12\x17\n\x0finvitation_link\x18\x03 \x01(\t\"a\n\x16MutateCustomerResponse\x12G\n\x06result\x18\x02 \x01(\x0b\x32\x37.google.ads.googleads.v25.services.MutateCustomerResult\"\x95\x01\n\x14MutateCustomerResult\x12=\n\rresource_name\x18\x01 \x01(\tB&\xfa\x41#\n!googleads.googleapis.com/Customer\x12>\n\x08\x63ustomer\x18\x02 \x01(\x0b\x32,.google.ads.googleads.v25.resources.Customer\" \n\x1eListAccessibleCustomersRequest\"9\n\x1fListAccessibleCustomersResponse\x12\x16\n\x0eresource_names\x18\x01 \x03(\t2\xf5\x05\n\x0f\x43ustomerService\x12\xcf\x01\n\x0eMutateCustomer\x12\x38.google.ads.googleads.v25.services.MutateCustomerRequest\x1a\x39.google.ads.googleads.v25.services.MutateCustomerResponse\"H\xda\x41\x15\x63ustomer_id,operation\x82\xd3\xe4\x93\x02*\"%/v25/customers/{customer_id=*}:mutate:\x01*\x12\xd0\x01\n\x17ListAccessibleCustomers\x12\x41.google.ads.googleads.v25.services.ListAccessibleCustomersRequest\x1a\x42.google.ads.googleads.v25.services.ListAccessibleCustomersResponse\".\x82\xd3\xe4\x93\x02(\x12&/v25/customers:listAccessibleCustomers\x12\xf5\x01\n\x14\x43reateCustomerClient\x12>.google.ads.googleads.v25.services.CreateCustomerClientRequest\x1a?.google.ads.googleads.v25.services.CreateCustomerClientResponse\"\\\xda\x41\x1b\x63ustomer_id,customer_client\x82\xd3\xe4\x93\x02\x38\"3/v25/customers/{customer_id=*}:createCustomerClient:\x01*\x1a\x45\xca\x41\x18googleads.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/adwordsB\x80\x02\n%com.google.ads.googleads.v25.servicesB\x14\x43ustomerServiceProtoP\x01ZIgoogle.golang.org/genproto/googleapis/ads/googleads/v25/services;services\xa2\x02\x03GAA\xaa\x02!Google.Ads.GoogleAds.V25.Services\xca\x02!Google\\Ads\\GoogleAds\\V25\\Services\xea\x02%Google::Ads::GoogleAds::V25::Servicesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Services + MutateCustomerRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.MutateCustomerRequest").msgclass + CreateCustomerClientRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.CreateCustomerClientRequest").msgclass + CustomerOperation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.CustomerOperation").msgclass + CreateCustomerClientResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.CreateCustomerClientResponse").msgclass + MutateCustomerResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.MutateCustomerResponse").msgclass + MutateCustomerResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.MutateCustomerResult").msgclass + ListAccessibleCustomersRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.ListAccessibleCustomersRequest").msgclass + ListAccessibleCustomersResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.ListAccessibleCustomersResponse").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/customer_service_services_pb.rb b/lib/google/ads/google_ads/v25/services/customer_service_services_pb.rb new file mode 100644 index 000000000..60193964f --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/customer_service_services_pb.rb @@ -0,0 +1,86 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/ads/googleads/v25/services/customer_service.proto for package 'Google.Ads.GoogleAds.V25.Services' +# Original file comments: +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +require 'grpc' +require 'google/ads/google_ads/v25/services/customer_service_pb' + +module Google + module Ads + module GoogleAds + module V25 + module Services + module CustomerService + # Proto file describing the Customer service. + # + # Service to manage customers. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.ads.googleads.v25.services.CustomerService' + + # Updates a customer. Operation statuses are returned. + # + # List of thrown errors: + # [AuthenticationError]() + # [AuthorizationError]() + # [DatabaseError]() + # [FieldMaskError]() + # [HeaderError]() + # [InternalError]() + # [QuotaError]() + # [RequestError]() + # [UrlFieldError]() + rpc :MutateCustomer, ::Google::Ads::GoogleAds::V25::Services::MutateCustomerRequest, ::Google::Ads::GoogleAds::V25::Services::MutateCustomerResponse + # Returns resource names of customers directly accessible by the + # user authenticating the call. + # + # List of thrown errors: + # [AuthenticationError]() + # [AuthorizationError]() + # [HeaderError]() + # [InternalError]() + # [QuotaError]() + # [RequestError]() + rpc :ListAccessibleCustomers, ::Google::Ads::GoogleAds::V25::Services::ListAccessibleCustomersRequest, ::Google::Ads::GoogleAds::V25::Services::ListAccessibleCustomersResponse + # Creates a new client under manager. The new client customer is returned. + # + # List of thrown errors: + # [AccessInvitationError]() + # [AuthenticationError]() + # [AuthorizationError]() + # [CurrencyCodeError]() + # [HeaderError]() + # [InternalError]() + # [ManagerLinkError]() + # [QuotaError]() + # [RequestError]() + # [StringLengthError]() + # [TimeZoneError]() + rpc :CreateCustomerClient, ::Google::Ads::GoogleAds::V25::Services::CreateCustomerClientRequest, ::Google::Ads::GoogleAds::V25::Services::CreateCustomerClientResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/customer_sk_ad_network_conversion_value_schema_service.rb b/lib/google/ads/google_ads/v25/services/customer_sk_ad_network_conversion_value_schema_service.rb new file mode 100644 index 000000000..178c1b600 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/customer_sk_ad_network_conversion_value_schema_service.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/ads/google_ads/version" + +require "google/ads/google_ads/v25/services/customer_sk_ad_network_conversion_value_schema_service/credentials" +require "google/ads/google_ads/v25/services/customer_sk_ad_network_conversion_value_schema_service/paths" +require "google/ads/google_ads/v25/services/customer_sk_ad_network_conversion_value_schema_service/client" + +module Google + module Ads + module GoogleAds + module V25 + module Services + ## + # Service to manage CustomerSkAdNetworkConversionValueSchema. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/ads/google_ads/v25/services/customer_sk_ad_network_conversion_value_schema_service" + # client = ::Google::Ads::GoogleAds::V25::Services::CustomerSkAdNetworkConversionValueSchemaService::Client.new + # + module CustomerSkAdNetworkConversionValueSchemaService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "customer_sk_ad_network_conversion_value_schema_service", "helpers.rb" +require "google/ads/google_ads/v25/services/customer_sk_ad_network_conversion_value_schema_service/helpers" if ::File.file? helper_path diff --git a/lib/google/ads/google_ads/v25/services/customer_sk_ad_network_conversion_value_schema_service/client.rb b/lib/google/ads/google_ads/v25/services/customer_sk_ad_network_conversion_value_schema_service/client.rb new file mode 100644 index 000000000..ec4938648 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/customer_sk_ad_network_conversion_value_schema_service/client.rb @@ -0,0 +1,494 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# require "google/ads/google_ads/error" +require "google/ads/google_ads/v25/services/customer_sk_ad_network_conversion_value_schema_service_pb" + +module Google + module Ads + module GoogleAds + module V25 + module Services + module CustomerSkAdNetworkConversionValueSchemaService + ## + # Client for the CustomerSkAdNetworkConversionValueSchemaService service. + # + # Service to manage CustomerSkAdNetworkConversionValueSchema. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "googleads.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :customer_sk_ad_network_conversion_value_schema_service_stub + + ## + # Configure the CustomerSkAdNetworkConversionValueSchemaService Client class. + # + # See {::Google::Ads::GoogleAds::V25::Services::CustomerSkAdNetworkConversionValueSchemaService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all CustomerSkAdNetworkConversionValueSchemaService clients + # ::Google::Ads::GoogleAds::V25::Services::CustomerSkAdNetworkConversionValueSchemaService::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + default_config = Client::Configuration.new + + default_config.timeout = 14_400.0 + default_config.retry_policy = { + initial_delay: 5.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the CustomerSkAdNetworkConversionValueSchemaService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Ads::GoogleAds::V25::Services::CustomerSkAdNetworkConversionValueSchemaService::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @customer_sk_ad_network_conversion_value_schema_service_stub.universe_domain + end + + ## + # Create a new CustomerSkAdNetworkConversionValueSchemaService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Ads::GoogleAds::V25::Services::CustomerSkAdNetworkConversionValueSchemaService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Ads::GoogleAds::V25::Services::CustomerSkAdNetworkConversionValueSchemaService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the CustomerSkAdNetworkConversionValueSchemaService client. + # @yieldparam config [Client::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/ads/google_ads/v25/services/customer_sk_ad_network_conversion_value_schema_service_services_pb" + + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @customer_sk_ad_network_conversion_value_schema_service_stub = ::Gapic::ServiceStub.new( + ::Google::Ads::GoogleAds::V25::Services::CustomerSkAdNetworkConversionValueSchemaService::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool, + logger: @config.logger + ) + + @customer_sk_ad_network_conversion_value_schema_service_stub.stub_logger&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @customer_sk_ad_network_conversion_value_schema_service_stub.logger + end + + # Service calls + + ## + # Creates or updates the CustomerSkAdNetworkConversionValueSchema. + # + # List of thrown errors: + # [AuthenticationError]() + # [AuthorizationError]() + # [FieldError]() + # [InternalError]() + # [MutateError]() + # + # @overload mutate_customer_sk_ad_network_conversion_value_schema(request, options = nil) + # Pass arguments to `mutate_customer_sk_ad_network_conversion_value_schema` via a request object, either of type + # {::Google::Ads::GoogleAds::V25::Services::MutateCustomerSkAdNetworkConversionValueSchemaRequest} or an equivalent Hash. + # + # @param request [::Google::Ads::GoogleAds::V25::Services::MutateCustomerSkAdNetworkConversionValueSchemaRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload mutate_customer_sk_ad_network_conversion_value_schema(customer_id: nil, operation: nil, validate_only: nil, enable_warnings: nil) + # Pass arguments to `mutate_customer_sk_ad_network_conversion_value_schema` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param customer_id [::String] + # The ID of the customer whose shared sets are being modified. + # @param operation [::Google::Ads::GoogleAds::V25::Services::CustomerSkAdNetworkConversionValueSchemaOperation, ::Hash] + # The operation to perform. + # @param validate_only [::Boolean] + # If true, the request is validated but not executed. Only errors are + # returned, not results. + # @param enable_warnings [::Boolean] + # Optional. If true, enables returning warnings. Warnings return error + # messages and error codes without blocking the execution of the mutate + # operation. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Ads::GoogleAds::V25::Services::MutateCustomerSkAdNetworkConversionValueSchemaResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Ads::GoogleAds::V25::Services::MutateCustomerSkAdNetworkConversionValueSchemaResponse] + # + # @raise [Google::Ads::GoogleAds::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/ads/google_ads/v25/services" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Ads::GoogleAds::V25::Services::CustomerSkAdNetworkConversionValueSchemaService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Ads::GoogleAds::V25::Services::MutateCustomerSkAdNetworkConversionValueSchemaRequest.new + # + # # Call the mutate_customer_sk_ad_network_conversion_value_schema method. + # result = client.mutate_customer_sk_ad_network_conversion_value_schema request + # + # # The returned object is of type Google::Ads::GoogleAds::V25::Services::MutateCustomerSkAdNetworkConversionValueSchemaResponse. + # p result + # + def mutate_customer_sk_ad_network_conversion_value_schema request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::GoogleAds::V25::Services::MutateCustomerSkAdNetworkConversionValueSchemaRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.mutate_customer_sk_ad_network_conversion_value_schema.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Ads::GoogleAds::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.customer_id + header_params["customer_id"] = request.customer_id + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.mutate_customer_sk_ad_network_conversion_value_schema.timeout, + metadata: metadata, + retry_policy: @config.rpcs.mutate_customer_sk_ad_network_conversion_value_schema.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @customer_sk_ad_network_conversion_value_schema_service_stub.call_rpc :mutate_customer_sk_ad_network_conversion_value_schema, + request, options: options do |response, operation| + yield response, operation if block_given? + end + # rescue GRPC::BadStatus => grpc_error + # raise Google::Ads::GoogleAds::Error.new grpc_error.message + end + + ## + # Configuration class for the CustomerSkAdNetworkConversionValueSchemaService API. + # + # This class represents the configuration for CustomerSkAdNetworkConversionValueSchemaService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Ads::GoogleAds::V25::Services::CustomerSkAdNetworkConversionValueSchemaService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # mutate_customer_sk_ad_network_conversion_value_schema to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Ads::GoogleAds::V25::Services::CustomerSkAdNetworkConversionValueSchemaService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.mutate_customer_sk_ad_network_conversion_value_schema.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Ads::GoogleAds::V25::Services::CustomerSkAdNetworkConversionValueSchemaService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.mutate_customer_sk_ad_network_conversion_value_schema.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Ads::GoogleAds::V25::Services::CustomerSkAdNetworkConversionValueSchemaService::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "googleads.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, + ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the CustomerSkAdNetworkConversionValueSchemaService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `mutate_customer_sk_ad_network_conversion_value_schema` + # @return [::Gapic::Config::Method] + # + attr_reader :mutate_customer_sk_ad_network_conversion_value_schema + + # @private + def initialize parent_rpcs = nil + mutate_customer_sk_ad_network_conversion_value_schema_config = parent_rpcs.mutate_customer_sk_ad_network_conversion_value_schema if parent_rpcs.respond_to? :mutate_customer_sk_ad_network_conversion_value_schema + @mutate_customer_sk_ad_network_conversion_value_schema = ::Gapic::Config::Method.new mutate_customer_sk_ad_network_conversion_value_schema_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/customer_sk_ad_network_conversion_value_schema_service/credentials.rb b/lib/google/ads/google_ads/v25/services/customer_sk_ad_network_conversion_value_schema_service/credentials.rb new file mode 100644 index 000000000..20af0909a --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/customer_sk_ad_network_conversion_value_schema_service/credentials.rb @@ -0,0 +1,38 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Ads + module GoogleAds + module V25 + module Services + module CustomerSkAdNetworkConversionValueSchemaService + # Credentials for the CustomerSkAdNetworkConversionValueSchemaService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/adwords" + ] + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/customer_sk_ad_network_conversion_value_schema_service/paths.rb b/lib/google/ads/google_ads/v25/services/customer_sk_ad_network_conversion_value_schema_service/paths.rb new file mode 100644 index 000000000..e13a2d654 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/customer_sk_ad_network_conversion_value_schema_service/paths.rb @@ -0,0 +1,52 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Ads + module GoogleAds + module V25 + module Services + module CustomerSkAdNetworkConversionValueSchemaService + # Path helper methods for the CustomerSkAdNetworkConversionValueSchemaService API. + module Paths + ## + # Create a fully-qualified CustomerSkAdNetworkConversionValueSchema resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/customerSkAdNetworkConversionValueSchemas/{account_link_id}` + # + # @param customer_id [String] + # @param account_link_id [String] + # + # @return [::String] + def customer_sk_ad_network_conversion_value_schema_path customer_id:, account_link_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/customerSkAdNetworkConversionValueSchemas/#{account_link_id}" + end + + extend self + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/customer_sk_ad_network_conversion_value_schema_service_pb.rb b/lib/google/ads/google_ads/v25/services/customer_sk_ad_network_conversion_value_schema_service_pb.rb new file mode 100644 index 000000000..0abe74250 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/customer_sk_ad_network_conversion_value_schema_service_pb.rb @@ -0,0 +1,33 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/services/customer_sk_ad_network_conversion_value_schema_service.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/resources/customer_sk_ad_network_conversion_value_schema_pb' +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/rpc/status_pb' + + +descriptor_data = "\n^google/ads/googleads/v25/services/customer_sk_ad_network_conversion_value_schema_service.proto\x12!google.ads.googleads.v25.services\x1aWgoogle/ads/googleads/v25/resources/customer_sk_ad_network_conversion_value_schema.proto\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x17google/rpc/status.proto\"\x91\x01\n1CustomerSkAdNetworkConversionValueSchemaOperation\x12\\\n\x06update\x18\x01 \x01(\x0b\x32L.google.ads.googleads.v25.resources.CustomerSkAdNetworkConversionValueSchema\"\xea\x01\n5MutateCustomerSkAdNetworkConversionValueSchemaRequest\x12\x13\n\x0b\x63ustomer_id\x18\x01 \x01(\t\x12g\n\toperation\x18\x02 \x01(\x0b\x32T.google.ads.googleads.v25.services.CustomerSkAdNetworkConversionValueSchemaOperation\x12\x15\n\rvalidate_only\x18\x03 \x01(\x08\x12\x1c\n\x0f\x65nable_warnings\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"\xa5\x01\n4MutateCustomerSkAdNetworkConversionValueSchemaResult\x12]\n\rresource_name\x18\x01 \x01(\tBF\xfa\x41\x43\nAgoogleads.googleapis.com/CustomerSkAdNetworkConversionValueSchema\x12\x0e\n\x06\x61pp_id\x18\x02 \x01(\t\"\xc6\x01\n6MutateCustomerSkAdNetworkConversionValueSchemaResponse\x12g\n\x06result\x18\x01 \x01(\x0b\x32W.google.ads.googleads.v25.services.MutateCustomerSkAdNetworkConversionValueSchemaResult\x12#\n\x07warning\x18\x02 \x01(\x0b\x32\x12.google.rpc.Status2\xbc\x03\n/CustomerSkAdNetworkConversionValueSchemaService\x12\xc1\x02\n.MutateCustomerSkAdNetworkConversionValueSchema\x12X.google.ads.googleads.v25.services.MutateCustomerSkAdNetworkConversionValueSchemaRequest\x1aY.google.ads.googleads.v25.services.MutateCustomerSkAdNetworkConversionValueSchemaResponse\"Z\x82\xd3\xe4\x93\x02T\"O/v25/customers/{customer_id=*}/customerSkAdNetworkConversionValueSchemas:mutate:\x01*\x1a\x45\xca\x41\x18googleads.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/adwordsB\xa0\x02\n%com.google.ads.googleads.v25.servicesB4CustomerSkAdNetworkConversionValueSchemaServiceProtoP\x01ZIgoogle.golang.org/genproto/googleapis/ads/googleads/v25/services;services\xa2\x02\x03GAA\xaa\x02!Google.Ads.GoogleAds.V25.Services\xca\x02!Google\\Ads\\GoogleAds\\V25\\Services\xea\x02%Google::Ads::GoogleAds::V25::Servicesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Services + CustomerSkAdNetworkConversionValueSchemaOperation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.CustomerSkAdNetworkConversionValueSchemaOperation").msgclass + MutateCustomerSkAdNetworkConversionValueSchemaRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.MutateCustomerSkAdNetworkConversionValueSchemaRequest").msgclass + MutateCustomerSkAdNetworkConversionValueSchemaResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.MutateCustomerSkAdNetworkConversionValueSchemaResult").msgclass + MutateCustomerSkAdNetworkConversionValueSchemaResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.MutateCustomerSkAdNetworkConversionValueSchemaResponse").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/customer_sk_ad_network_conversion_value_schema_service_services_pb.rb b/lib/google/ads/google_ads/v25/services/customer_sk_ad_network_conversion_value_schema_service_services_pb.rb new file mode 100644 index 000000000..d0e473c81 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/customer_sk_ad_network_conversion_value_schema_service_services_pb.rb @@ -0,0 +1,56 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/ads/googleads/v25/services/customer_sk_ad_network_conversion_value_schema_service.proto for package 'Google.Ads.GoogleAds.V25.Services' +# Original file comments: +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +require 'grpc' +require 'google/ads/google_ads/v25/services/customer_sk_ad_network_conversion_value_schema_service_pb' + +module Google + module Ads + module GoogleAds + module V25 + module Services + module CustomerSkAdNetworkConversionValueSchemaService + # Proto file describing the Customer Negative Criterion service. + # + # Service to manage CustomerSkAdNetworkConversionValueSchema. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.ads.googleads.v25.services.CustomerSkAdNetworkConversionValueSchemaService' + + # Creates or updates the CustomerSkAdNetworkConversionValueSchema. + # + # List of thrown errors: + # [AuthenticationError]() + # [AuthorizationError]() + # [FieldError]() + # [InternalError]() + # [MutateError]() + rpc :MutateCustomerSkAdNetworkConversionValueSchema, ::Google::Ads::GoogleAds::V25::Services::MutateCustomerSkAdNetworkConversionValueSchemaRequest, ::Google::Ads::GoogleAds::V25::Services::MutateCustomerSkAdNetworkConversionValueSchemaResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/customer_user_access_invitation_service.rb b/lib/google/ads/google_ads/v25/services/customer_user_access_invitation_service.rb new file mode 100644 index 000000000..908ea9c7e --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/customer_user_access_invitation_service.rb @@ -0,0 +1,52 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/ads/google_ads/version" + +require "google/ads/google_ads/v25/services/customer_user_access_invitation_service/credentials" +require "google/ads/google_ads/v25/services/customer_user_access_invitation_service/paths" +require "google/ads/google_ads/v25/services/customer_user_access_invitation_service/client" + +module Google + module Ads + module GoogleAds + module V25 + module Services + ## + # This service manages the access invitation extended to users for a given + # customer. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/ads/google_ads/v25/services/customer_user_access_invitation_service" + # client = ::Google::Ads::GoogleAds::V25::Services::CustomerUserAccessInvitationService::Client.new + # + module CustomerUserAccessInvitationService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "customer_user_access_invitation_service", "helpers.rb" +require "google/ads/google_ads/v25/services/customer_user_access_invitation_service/helpers" if ::File.file? helper_path diff --git a/lib/google/ads/google_ads/v25/services/customer_user_access_invitation_service/client.rb b/lib/google/ads/google_ads/v25/services/customer_user_access_invitation_service/client.rb new file mode 100644 index 000000000..084f76f84 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/customer_user_access_invitation_service/client.rb @@ -0,0 +1,490 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# require "google/ads/google_ads/error" +require "google/ads/google_ads/v25/services/customer_user_access_invitation_service_pb" + +module Google + module Ads + module GoogleAds + module V25 + module Services + module CustomerUserAccessInvitationService + ## + # Client for the CustomerUserAccessInvitationService service. + # + # This service manages the access invitation extended to users for a given + # customer. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "googleads.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :customer_user_access_invitation_service_stub + + ## + # Configure the CustomerUserAccessInvitationService Client class. + # + # See {::Google::Ads::GoogleAds::V25::Services::CustomerUserAccessInvitationService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all CustomerUserAccessInvitationService clients + # ::Google::Ads::GoogleAds::V25::Services::CustomerUserAccessInvitationService::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + default_config = Client::Configuration.new + + default_config.timeout = 14_400.0 + default_config.retry_policy = { + initial_delay: 5.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the CustomerUserAccessInvitationService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Ads::GoogleAds::V25::Services::CustomerUserAccessInvitationService::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @customer_user_access_invitation_service_stub.universe_domain + end + + ## + # Create a new CustomerUserAccessInvitationService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Ads::GoogleAds::V25::Services::CustomerUserAccessInvitationService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Ads::GoogleAds::V25::Services::CustomerUserAccessInvitationService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the CustomerUserAccessInvitationService client. + # @yieldparam config [Client::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/ads/google_ads/v25/services/customer_user_access_invitation_service_services_pb" + + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @customer_user_access_invitation_service_stub = ::Gapic::ServiceStub.new( + ::Google::Ads::GoogleAds::V25::Services::CustomerUserAccessInvitationService::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool, + logger: @config.logger + ) + + @customer_user_access_invitation_service_stub.stub_logger&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @customer_user_access_invitation_service_stub.logger + end + + # Service calls + + ## + # Creates or removes an access invitation. + # + # List of thrown errors: + # [AccessInvitationError]() + # [AuthenticationError]() + # [AuthorizationError]() + # [HeaderError]() + # [InternalError]() + # [QuotaError]() + # [RequestError]() + # + # @overload mutate_customer_user_access_invitation(request, options = nil) + # Pass arguments to `mutate_customer_user_access_invitation` via a request object, either of type + # {::Google::Ads::GoogleAds::V25::Services::MutateCustomerUserAccessInvitationRequest} or an equivalent Hash. + # + # @param request [::Google::Ads::GoogleAds::V25::Services::MutateCustomerUserAccessInvitationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload mutate_customer_user_access_invitation(customer_id: nil, operation: nil) + # Pass arguments to `mutate_customer_user_access_invitation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param customer_id [::String] + # Required. The ID of the customer whose access invitation is being modified. + # @param operation [::Google::Ads::GoogleAds::V25::Services::CustomerUserAccessInvitationOperation, ::Hash] + # Required. The operation to perform on the access invitation + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Ads::GoogleAds::V25::Services::MutateCustomerUserAccessInvitationResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Ads::GoogleAds::V25::Services::MutateCustomerUserAccessInvitationResponse] + # + # @raise [Google::Ads::GoogleAds::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/ads/google_ads/v25/services" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Ads::GoogleAds::V25::Services::CustomerUserAccessInvitationService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Ads::GoogleAds::V25::Services::MutateCustomerUserAccessInvitationRequest.new + # + # # Call the mutate_customer_user_access_invitation method. + # result = client.mutate_customer_user_access_invitation request + # + # # The returned object is of type Google::Ads::GoogleAds::V25::Services::MutateCustomerUserAccessInvitationResponse. + # p result + # + def mutate_customer_user_access_invitation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::GoogleAds::V25::Services::MutateCustomerUserAccessInvitationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.mutate_customer_user_access_invitation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Ads::GoogleAds::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.customer_id + header_params["customer_id"] = request.customer_id + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.mutate_customer_user_access_invitation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.mutate_customer_user_access_invitation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @customer_user_access_invitation_service_stub.call_rpc :mutate_customer_user_access_invitation, + request, options: options do |response, operation| + yield response, operation if block_given? + end + # rescue GRPC::BadStatus => grpc_error + # raise Google::Ads::GoogleAds::Error.new grpc_error.message + end + + ## + # Configuration class for the CustomerUserAccessInvitationService API. + # + # This class represents the configuration for CustomerUserAccessInvitationService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Ads::GoogleAds::V25::Services::CustomerUserAccessInvitationService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # mutate_customer_user_access_invitation to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Ads::GoogleAds::V25::Services::CustomerUserAccessInvitationService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.mutate_customer_user_access_invitation.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Ads::GoogleAds::V25::Services::CustomerUserAccessInvitationService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.mutate_customer_user_access_invitation.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Ads::GoogleAds::V25::Services::CustomerUserAccessInvitationService::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "googleads.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, + ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the CustomerUserAccessInvitationService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `mutate_customer_user_access_invitation` + # @return [::Gapic::Config::Method] + # + attr_reader :mutate_customer_user_access_invitation + + # @private + def initialize parent_rpcs = nil + mutate_customer_user_access_invitation_config = parent_rpcs.mutate_customer_user_access_invitation if parent_rpcs.respond_to? :mutate_customer_user_access_invitation + @mutate_customer_user_access_invitation = ::Gapic::Config::Method.new mutate_customer_user_access_invitation_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/customer_user_access_invitation_service/credentials.rb b/lib/google/ads/google_ads/v25/services/customer_user_access_invitation_service/credentials.rb new file mode 100644 index 000000000..79c92e60c --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/customer_user_access_invitation_service/credentials.rb @@ -0,0 +1,38 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Ads + module GoogleAds + module V25 + module Services + module CustomerUserAccessInvitationService + # Credentials for the CustomerUserAccessInvitationService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/adwords" + ] + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/customer_user_access_invitation_service/paths.rb b/lib/google/ads/google_ads/v25/services/customer_user_access_invitation_service/paths.rb new file mode 100644 index 000000000..db5fc1252 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/customer_user_access_invitation_service/paths.rb @@ -0,0 +1,69 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Ads + module GoogleAds + module V25 + module Services + module CustomerUserAccessInvitationService + # Path helper methods for the CustomerUserAccessInvitationService API. + module Paths + ## + # Create a fully-qualified CustomerUserAccessInvitation resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/customerUserAccessInvitations/{invitation_id}` + # + # @param customer_id [String] + # @param invitation_id [String] + # + # @return [::String] + def customer_user_access_invitation_path customer_id:, invitation_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/customerUserAccessInvitations/#{invitation_id}" + end + + ## + # Create a fully-qualified MultiPartyAuthReview resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/multiPartyAuthReviews/{customer_invitation_id}` + # + # @param customer_id [String] + # @param customer_invitation_id [String] + # + # @return [::String] + def multi_party_auth_review_path customer_id:, customer_invitation_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/multiPartyAuthReviews/#{customer_invitation_id}" + end + + extend self + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/customer_user_access_invitation_service_pb.rb b/lib/google/ads/google_ads/v25/services/customer_user_access_invitation_service_pb.rb new file mode 100644 index 000000000..a19d34f3d --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/customer_user_access_invitation_service_pb.rb @@ -0,0 +1,32 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/services/customer_user_access_invitation_service.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/resources/customer_user_access_invitation_pb' +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' + + +descriptor_data = "\nOgoogle/ads/googleads/v25/services/customer_user_access_invitation_service.proto\x12!google.ads.googleads.v25.services\x1aHgoogle/ads/googleads/v25/resources/customer_user_access_invitation.proto\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\xa7\x01\n)MutateCustomerUserAccessInvitationRequest\x12\x18\n\x0b\x63ustomer_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12`\n\toperation\x18\x02 \x01(\x0b\x32H.google.ads.googleads.v25.services.CustomerUserAccessInvitationOperationB\x03\xe0\x41\x02\"\xd6\x01\n%CustomerUserAccessInvitationOperation\x12R\n\x06\x63reate\x18\x01 \x01(\x0b\x32@.google.ads.googleads.v25.resources.CustomerUserAccessInvitationH\x00\x12L\n\x06remove\x18\x02 \x01(\tB:\xfa\x41\x37\n5googleads.googleapis.com/CustomerUserAccessInvitationH\x00\x42\x0b\n\toperation\"\x89\x01\n*MutateCustomerUserAccessInvitationResponse\x12[\n\x06result\x18\x01 \x01(\x0b\x32K.google.ads.googleads.v25.services.MutateCustomerUserAccessInvitationResult\"\xd2\x01\n(MutateCustomerUserAccessInvitationResult\x12Q\n\rresource_name\x18\x01 \x01(\tB:\xfa\x41\x37\n5googleads.googleapis.com/CustomerUserAccessInvitation\x12S\n\x17multi_party_auth_review\x18\x02 \x01(\tB2\xfa\x41/\n-googleads.googleapis.com/MultiPartyAuthReview2\x98\x03\n#CustomerUserAccessInvitationService\x12\xa9\x02\n\"MutateCustomerUserAccessInvitation\x12L.google.ads.googleads.v25.services.MutateCustomerUserAccessInvitationRequest\x1aM.google.ads.googleads.v25.services.MutateCustomerUserAccessInvitationResponse\"f\xda\x41\x15\x63ustomer_id,operation\x82\xd3\xe4\x93\x02H\"C/v25/customers/{customer_id=*}/customerUserAccessInvitations:mutate:\x01*\x1a\x45\xca\x41\x18googleads.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/adwordsB\x94\x02\n%com.google.ads.googleads.v25.servicesB(CustomerUserAccessInvitationServiceProtoP\x01ZIgoogle.golang.org/genproto/googleapis/ads/googleads/v25/services;services\xa2\x02\x03GAA\xaa\x02!Google.Ads.GoogleAds.V25.Services\xca\x02!Google\\Ads\\GoogleAds\\V25\\Services\xea\x02%Google::Ads::GoogleAds::V25::Servicesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Services + MutateCustomerUserAccessInvitationRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.MutateCustomerUserAccessInvitationRequest").msgclass + CustomerUserAccessInvitationOperation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.CustomerUserAccessInvitationOperation").msgclass + MutateCustomerUserAccessInvitationResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.MutateCustomerUserAccessInvitationResponse").msgclass + MutateCustomerUserAccessInvitationResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.MutateCustomerUserAccessInvitationResult").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/customer_user_access_invitation_service_services_pb.rb b/lib/google/ads/google_ads/v25/services/customer_user_access_invitation_service_services_pb.rb new file mode 100644 index 000000000..9c80674b1 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/customer_user_access_invitation_service_services_pb.rb @@ -0,0 +1,59 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/ads/googleads/v25/services/customer_user_access_invitation_service.proto for package 'Google.Ads.GoogleAds.V25.Services' +# Original file comments: +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +require 'grpc' +require 'google/ads/google_ads/v25/services/customer_user_access_invitation_service_pb' + +module Google + module Ads + module GoogleAds + module V25 + module Services + module CustomerUserAccessInvitationService + # Proto file describing the CustomerUserAccessInvitation service. + # + # This service manages the access invitation extended to users for a given + # customer. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.ads.googleads.v25.services.CustomerUserAccessInvitationService' + + # Creates or removes an access invitation. + # + # List of thrown errors: + # [AccessInvitationError]() + # [AuthenticationError]() + # [AuthorizationError]() + # [HeaderError]() + # [InternalError]() + # [QuotaError]() + # [RequestError]() + rpc :MutateCustomerUserAccessInvitation, ::Google::Ads::GoogleAds::V25::Services::MutateCustomerUserAccessInvitationRequest, ::Google::Ads::GoogleAds::V25::Services::MutateCustomerUserAccessInvitationResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/customer_user_access_service.rb b/lib/google/ads/google_ads/v25/services/customer_user_access_service.rb new file mode 100644 index 000000000..233df3ab7 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/customer_user_access_service.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/ads/google_ads/version" + +require "google/ads/google_ads/v25/services/customer_user_access_service/credentials" +require "google/ads/google_ads/v25/services/customer_user_access_service/paths" +require "google/ads/google_ads/v25/services/customer_user_access_service/client" + +module Google + module Ads + module GoogleAds + module V25 + module Services + ## + # This service manages the permissions of a user on a given customer. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/ads/google_ads/v25/services/customer_user_access_service" + # client = ::Google::Ads::GoogleAds::V25::Services::CustomerUserAccessService::Client.new + # + module CustomerUserAccessService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "customer_user_access_service", "helpers.rb" +require "google/ads/google_ads/v25/services/customer_user_access_service/helpers" if ::File.file? helper_path diff --git a/lib/google/ads/google_ads/v25/services/customer_user_access_service/client.rb b/lib/google/ads/google_ads/v25/services/customer_user_access_service/client.rb new file mode 100644 index 000000000..a45d68d13 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/customer_user_access_service/client.rb @@ -0,0 +1,492 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# require "google/ads/google_ads/error" +require "google/ads/google_ads/v25/services/customer_user_access_service_pb" + +module Google + module Ads + module GoogleAds + module V25 + module Services + module CustomerUserAccessService + ## + # Client for the CustomerUserAccessService service. + # + # This service manages the permissions of a user on a given customer. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "googleads.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :customer_user_access_service_stub + + ## + # Configure the CustomerUserAccessService Client class. + # + # See {::Google::Ads::GoogleAds::V25::Services::CustomerUserAccessService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all CustomerUserAccessService clients + # ::Google::Ads::GoogleAds::V25::Services::CustomerUserAccessService::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + default_config = Client::Configuration.new + + default_config.timeout = 14_400.0 + default_config.retry_policy = { + initial_delay: 5.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the CustomerUserAccessService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Ads::GoogleAds::V25::Services::CustomerUserAccessService::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @customer_user_access_service_stub.universe_domain + end + + ## + # Create a new CustomerUserAccessService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Ads::GoogleAds::V25::Services::CustomerUserAccessService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Ads::GoogleAds::V25::Services::CustomerUserAccessService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the CustomerUserAccessService client. + # @yieldparam config [Client::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/ads/google_ads/v25/services/customer_user_access_service_services_pb" + + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @customer_user_access_service_stub = ::Gapic::ServiceStub.new( + ::Google::Ads::GoogleAds::V25::Services::CustomerUserAccessService::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool, + logger: @config.logger + ) + + @customer_user_access_service_stub.stub_logger&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @customer_user_access_service_stub.logger + end + + # Service calls + + ## + # Updates, removes permission of a user on a given customer. Operation + # statuses are returned. + # + # List of thrown errors: + # [AuthenticationError]() + # [AuthorizationError]() + # [CustomerUserAccessError]() + # [FieldMaskError]() + # [HeaderError]() + # [InternalError]() + # [MutateError]() + # [QuotaError]() + # [RequestError]() + # + # @overload mutate_customer_user_access(request, options = nil) + # Pass arguments to `mutate_customer_user_access` via a request object, either of type + # {::Google::Ads::GoogleAds::V25::Services::MutateCustomerUserAccessRequest} or an equivalent Hash. + # + # @param request [::Google::Ads::GoogleAds::V25::Services::MutateCustomerUserAccessRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload mutate_customer_user_access(customer_id: nil, operation: nil) + # Pass arguments to `mutate_customer_user_access` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param customer_id [::String] + # Required. The ID of the customer being modified. + # @param operation [::Google::Ads::GoogleAds::V25::Services::CustomerUserAccessOperation, ::Hash] + # Required. The operation to perform on the customer + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Ads::GoogleAds::V25::Services::MutateCustomerUserAccessResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Ads::GoogleAds::V25::Services::MutateCustomerUserAccessResponse] + # + # @raise [Google::Ads::GoogleAds::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/ads/google_ads/v25/services" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Ads::GoogleAds::V25::Services::CustomerUserAccessService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Ads::GoogleAds::V25::Services::MutateCustomerUserAccessRequest.new + # + # # Call the mutate_customer_user_access method. + # result = client.mutate_customer_user_access request + # + # # The returned object is of type Google::Ads::GoogleAds::V25::Services::MutateCustomerUserAccessResponse. + # p result + # + def mutate_customer_user_access request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::GoogleAds::V25::Services::MutateCustomerUserAccessRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.mutate_customer_user_access.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Ads::GoogleAds::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.customer_id + header_params["customer_id"] = request.customer_id + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.mutate_customer_user_access.timeout, + metadata: metadata, + retry_policy: @config.rpcs.mutate_customer_user_access.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @customer_user_access_service_stub.call_rpc :mutate_customer_user_access, request, + options: options do |response, operation| + yield response, operation if block_given? + end + # rescue GRPC::BadStatus => grpc_error + # raise Google::Ads::GoogleAds::Error.new grpc_error.message + end + + ## + # Configuration class for the CustomerUserAccessService API. + # + # This class represents the configuration for CustomerUserAccessService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Ads::GoogleAds::V25::Services::CustomerUserAccessService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # mutate_customer_user_access to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Ads::GoogleAds::V25::Services::CustomerUserAccessService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.mutate_customer_user_access.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Ads::GoogleAds::V25::Services::CustomerUserAccessService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.mutate_customer_user_access.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Ads::GoogleAds::V25::Services::CustomerUserAccessService::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "googleads.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, + ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the CustomerUserAccessService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `mutate_customer_user_access` + # @return [::Gapic::Config::Method] + # + attr_reader :mutate_customer_user_access + + # @private + def initialize parent_rpcs = nil + mutate_customer_user_access_config = parent_rpcs.mutate_customer_user_access if parent_rpcs.respond_to? :mutate_customer_user_access + @mutate_customer_user_access = ::Gapic::Config::Method.new mutate_customer_user_access_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/customer_user_access_service/credentials.rb b/lib/google/ads/google_ads/v25/services/customer_user_access_service/credentials.rb new file mode 100644 index 000000000..f6b41cf77 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/customer_user_access_service/credentials.rb @@ -0,0 +1,38 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Ads + module GoogleAds + module V25 + module Services + module CustomerUserAccessService + # Credentials for the CustomerUserAccessService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/adwords" + ] + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/customer_user_access_service/paths.rb b/lib/google/ads/google_ads/v25/services/customer_user_access_service/paths.rb new file mode 100644 index 000000000..3098add5b --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/customer_user_access_service/paths.rb @@ -0,0 +1,69 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Ads + module GoogleAds + module V25 + module Services + module CustomerUserAccessService + # Path helper methods for the CustomerUserAccessService API. + module Paths + ## + # Create a fully-qualified CustomerUserAccess resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/customerUserAccesses/{user_id}` + # + # @param customer_id [String] + # @param user_id [String] + # + # @return [::String] + def customer_user_access_path customer_id:, user_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/customerUserAccesses/#{user_id}" + end + + ## + # Create a fully-qualified MultiPartyAuthReview resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/multiPartyAuthReviews/{customer_invitation_id}` + # + # @param customer_id [String] + # @param customer_invitation_id [String] + # + # @return [::String] + def multi_party_auth_review_path customer_id:, customer_invitation_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/multiPartyAuthReviews/#{customer_invitation_id}" + end + + extend self + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/customer_user_access_service_pb.rb b/lib/google/ads/google_ads/v25/services/customer_user_access_service_pb.rb new file mode 100644 index 000000000..05e259462 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/customer_user_access_service_pb.rb @@ -0,0 +1,33 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/services/customer_user_access_service.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/resources/customer_user_access_pb' +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/field_mask_pb' + + +descriptor_data = "\nDgoogle/ads/googleads/v25/services/customer_user_access_service.proto\x12!google.ads.googleads.v25.services\x1a=google/ads/googleads/v25/resources/customer_user_access.proto\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\"\x93\x01\n\x1fMutateCustomerUserAccessRequest\x12\x18\n\x0b\x63ustomer_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12V\n\toperation\x18\x02 \x01(\x0b\x32>.google.ads.googleads.v25.services.CustomerUserAccessOperationB\x03\xe0\x41\x02\"\xe9\x01\n\x1b\x43ustomerUserAccessOperation\x12/\n\x0bupdate_mask\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\x12H\n\x06update\x18\x01 \x01(\x0b\x32\x36.google.ads.googleads.v25.resources.CustomerUserAccessH\x00\x12\x42\n\x06remove\x18\x02 \x01(\tB0\xfa\x41-\n+googleads.googleapis.com/CustomerUserAccessH\x00\x42\x0b\n\toperation\"u\n MutateCustomerUserAccessResponse\x12Q\n\x06result\x18\x01 \x01(\x0b\x32\x41.google.ads.googleads.v25.services.MutateCustomerUserAccessResult\"\xbe\x01\n\x1eMutateCustomerUserAccessResult\x12G\n\rresource_name\x18\x01 \x01(\tB0\xfa\x41-\n+googleads.googleapis.com/CustomerUserAccess\x12S\n\x17multi_party_auth_review\x18\x02 \x01(\tB2\xfa\x41/\n-googleads.googleapis.com/MultiPartyAuthReview2\xe7\x02\n\x19\x43ustomerUserAccessService\x12\x82\x02\n\x18MutateCustomerUserAccess\x12\x42.google.ads.googleads.v25.services.MutateCustomerUserAccessRequest\x1a\x43.google.ads.googleads.v25.services.MutateCustomerUserAccessResponse\"]\xda\x41\x15\x63ustomer_id,operation\x82\xd3\xe4\x93\x02?\":/v25/customers/{customer_id=*}/customerUserAccesses:mutate:\x01*\x1a\x45\xca\x41\x18googleads.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/adwordsB\x8a\x02\n%com.google.ads.googleads.v25.servicesB\x1e\x43ustomerUserAccessServiceProtoP\x01ZIgoogle.golang.org/genproto/googleapis/ads/googleads/v25/services;services\xa2\x02\x03GAA\xaa\x02!Google.Ads.GoogleAds.V25.Services\xca\x02!Google\\Ads\\GoogleAds\\V25\\Services\xea\x02%Google::Ads::GoogleAds::V25::Servicesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Services + MutateCustomerUserAccessRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.MutateCustomerUserAccessRequest").msgclass + CustomerUserAccessOperation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.CustomerUserAccessOperation").msgclass + MutateCustomerUserAccessResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.MutateCustomerUserAccessResponse").msgclass + MutateCustomerUserAccessResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.MutateCustomerUserAccessResult").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/customer_user_access_service_services_pb.rb b/lib/google/ads/google_ads/v25/services/customer_user_access_service_services_pb.rb new file mode 100644 index 000000000..59eac731b --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/customer_user_access_service_services_pb.rb @@ -0,0 +1,59 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/ads/googleads/v25/services/customer_user_access_service.proto for package 'Google.Ads.GoogleAds.V25.Services' +# Original file comments: +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +require 'grpc' +require 'google/ads/google_ads/v25/services/customer_user_access_service_pb' + +module Google + module Ads + module GoogleAds + module V25 + module Services + module CustomerUserAccessService + # This service manages the permissions of a user on a given customer. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.ads.googleads.v25.services.CustomerUserAccessService' + + # Updates, removes permission of a user on a given customer. Operation + # statuses are returned. + # + # List of thrown errors: + # [AuthenticationError]() + # [AuthorizationError]() + # [CustomerUserAccessError]() + # [FieldMaskError]() + # [HeaderError]() + # [InternalError]() + # [MutateError]() + # [QuotaError]() + # [RequestError]() + rpc :MutateCustomerUserAccess, ::Google::Ads::GoogleAds::V25::Services::MutateCustomerUserAccessRequest, ::Google::Ads::GoogleAds::V25::Services::MutateCustomerUserAccessResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/customizer_attribute_service.rb b/lib/google/ads/google_ads/v25/services/customizer_attribute_service.rb new file mode 100644 index 000000000..42b6b092e --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/customizer_attribute_service.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/ads/google_ads/version" + +require "google/ads/google_ads/v25/services/customizer_attribute_service/credentials" +require "google/ads/google_ads/v25/services/customizer_attribute_service/paths" +require "google/ads/google_ads/v25/services/customizer_attribute_service/client" + +module Google + module Ads + module GoogleAds + module V25 + module Services + ## + # Service to manage customizer attribute + # + # @example Load this service and instantiate a gRPC client + # + # require "google/ads/google_ads/v25/services/customizer_attribute_service" + # client = ::Google::Ads::GoogleAds::V25::Services::CustomizerAttributeService::Client.new + # + module CustomizerAttributeService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "customizer_attribute_service", "helpers.rb" +require "google/ads/google_ads/v25/services/customizer_attribute_service/helpers" if ::File.file? helper_path diff --git a/lib/google/ads/google_ads/v25/services/customizer_attribute_service/client.rb b/lib/google/ads/google_ads/v25/services/customizer_attribute_service/client.rb new file mode 100644 index 000000000..2a0115035 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/customizer_attribute_service/client.rb @@ -0,0 +1,494 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# require "google/ads/google_ads/error" +require "google/ads/google_ads/v25/services/customizer_attribute_service_pb" + +module Google + module Ads + module GoogleAds + module V25 + module Services + module CustomizerAttributeService + ## + # Client for the CustomizerAttributeService service. + # + # Service to manage customizer attribute + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "googleads.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :customizer_attribute_service_stub + + ## + # Configure the CustomizerAttributeService Client class. + # + # See {::Google::Ads::GoogleAds::V25::Services::CustomizerAttributeService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all CustomizerAttributeService clients + # ::Google::Ads::GoogleAds::V25::Services::CustomizerAttributeService::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + default_config = Client::Configuration.new + + default_config.timeout = 14_400.0 + default_config.retry_policy = { + initial_delay: 5.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the CustomizerAttributeService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Ads::GoogleAds::V25::Services::CustomizerAttributeService::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @customizer_attribute_service_stub.universe_domain + end + + ## + # Create a new CustomizerAttributeService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Ads::GoogleAds::V25::Services::CustomizerAttributeService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Ads::GoogleAds::V25::Services::CustomizerAttributeService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the CustomizerAttributeService client. + # @yieldparam config [Client::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/ads/google_ads/v25/services/customizer_attribute_service_services_pb" + + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @customizer_attribute_service_stub = ::Gapic::ServiceStub.new( + ::Google::Ads::GoogleAds::V25::Services::CustomizerAttributeService::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool, + logger: @config.logger + ) + + @customizer_attribute_service_stub.stub_logger&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @customizer_attribute_service_stub.logger + end + + # Service calls + + ## + # Creates, updates or removes customizer attributes. Operation statuses are + # returned. + # + # @overload mutate_customizer_attributes(request, options = nil) + # Pass arguments to `mutate_customizer_attributes` via a request object, either of type + # {::Google::Ads::GoogleAds::V25::Services::MutateCustomizerAttributesRequest} or an equivalent Hash. + # + # @param request [::Google::Ads::GoogleAds::V25::Services::MutateCustomizerAttributesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload mutate_customizer_attributes(customer_id: nil, operations: nil, partial_failure: nil, validate_only: nil, response_content_type: nil) + # Pass arguments to `mutate_customizer_attributes` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param customer_id [::String] + # Required. The ID of the customer whose customizer attributes are being + # modified. + # @param operations [::Array<::Google::Ads::GoogleAds::V25::Services::CustomizerAttributeOperation, ::Hash>] + # Required. The list of operations to perform on individual customizer + # attributes. + # @param partial_failure [::Boolean] + # 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. + # @param validate_only [::Boolean] + # If true, the request is validated but not executed. Only errors are + # returned, not results. + # @param response_content_type [::Google::Ads::GoogleAds::V25::Enums::ResponseContentTypeEnum::ResponseContentType] + # The response content type setting. Determines whether the mutable resource + # or just the resource name should be returned post mutation. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Ads::GoogleAds::V25::Services::MutateCustomizerAttributesResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Ads::GoogleAds::V25::Services::MutateCustomizerAttributesResponse] + # + # @raise [Google::Ads::GoogleAds::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/ads/google_ads/v25/services" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Ads::GoogleAds::V25::Services::CustomizerAttributeService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Ads::GoogleAds::V25::Services::MutateCustomizerAttributesRequest.new + # + # # Call the mutate_customizer_attributes method. + # result = client.mutate_customizer_attributes request + # + # # The returned object is of type Google::Ads::GoogleAds::V25::Services::MutateCustomizerAttributesResponse. + # p result + # + def mutate_customizer_attributes request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::GoogleAds::V25::Services::MutateCustomizerAttributesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.mutate_customizer_attributes.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Ads::GoogleAds::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.customer_id + header_params["customer_id"] = request.customer_id + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.mutate_customizer_attributes.timeout, + metadata: metadata, + retry_policy: @config.rpcs.mutate_customizer_attributes.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @customizer_attribute_service_stub.call_rpc :mutate_customizer_attributes, request, + options: options do |response, operation| + yield response, operation if block_given? + end + # rescue GRPC::BadStatus => grpc_error + # raise Google::Ads::GoogleAds::Error.new grpc_error.message + end + + ## + # Configuration class for the CustomizerAttributeService API. + # + # This class represents the configuration for CustomizerAttributeService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Ads::GoogleAds::V25::Services::CustomizerAttributeService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # mutate_customizer_attributes to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Ads::GoogleAds::V25::Services::CustomizerAttributeService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.mutate_customizer_attributes.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Ads::GoogleAds::V25::Services::CustomizerAttributeService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.mutate_customizer_attributes.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Ads::GoogleAds::V25::Services::CustomizerAttributeService::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "googleads.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, + ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the CustomizerAttributeService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `mutate_customizer_attributes` + # @return [::Gapic::Config::Method] + # + attr_reader :mutate_customizer_attributes + + # @private + def initialize parent_rpcs = nil + mutate_customizer_attributes_config = parent_rpcs.mutate_customizer_attributes if parent_rpcs.respond_to? :mutate_customizer_attributes + @mutate_customizer_attributes = ::Gapic::Config::Method.new mutate_customizer_attributes_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/customizer_attribute_service/credentials.rb b/lib/google/ads/google_ads/v25/services/customizer_attribute_service/credentials.rb new file mode 100644 index 000000000..9c5cb22a6 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/customizer_attribute_service/credentials.rb @@ -0,0 +1,38 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Ads + module GoogleAds + module V25 + module Services + module CustomizerAttributeService + # Credentials for the CustomizerAttributeService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/adwords" + ] + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/customizer_attribute_service/paths.rb b/lib/google/ads/google_ads/v25/services/customizer_attribute_service/paths.rb new file mode 100644 index 000000000..33515377e --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/customizer_attribute_service/paths.rb @@ -0,0 +1,52 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Ads + module GoogleAds + module V25 + module Services + module CustomizerAttributeService + # Path helper methods for the CustomizerAttributeService API. + module Paths + ## + # Create a fully-qualified CustomizerAttribute resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/customizerAttributes/{customizer_attribute_id}` + # + # @param customer_id [String] + # @param customizer_attribute_id [String] + # + # @return [::String] + def customizer_attribute_path customer_id:, customizer_attribute_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/customizerAttributes/#{customizer_attribute_id}" + end + + extend self + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/customizer_attribute_service_pb.rb b/lib/google/ads/google_ads/v25/services/customizer_attribute_service_pb.rb new file mode 100644 index 000000000..b8b8f3352 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/customizer_attribute_service_pb.rb @@ -0,0 +1,35 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/services/customizer_attribute_service.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/enums/response_content_type_pb' +require 'google/ads/google_ads/v25/resources/customizer_attribute_pb' +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/field_mask_pb' +require 'google/rpc/status_pb' + + +descriptor_data = "\nDgoogle/ads/googleads/v25/services/customizer_attribute_service.proto\x12!google.ads.googleads.v25.services\x1a:google/ads/googleads/v25/enums/response_content_type.proto\x1a=google/ads/googleads/v25/resources/customizer_attribute.proto\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\x1a\x17google/rpc/status.proto\"\xb3\x02\n!MutateCustomizerAttributesRequest\x12\x18\n\x0b\x63ustomer_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12X\n\noperations\x18\x02 \x03(\x0b\x32?.google.ads.googleads.v25.services.CustomizerAttributeOperationB\x03\xe0\x41\x02\x12\x17\n\x0fpartial_failure\x18\x03 \x01(\x08\x12\x15\n\rvalidate_only\x18\x04 \x01(\x08\x12j\n\x15response_content_type\x18\x05 \x01(\x0e\x32K.google.ads.googleads.v25.enums.ResponseContentTypeEnum.ResponseContentType\"\xec\x01\n\x1c\x43ustomizerAttributeOperation\x12/\n\x0bupdate_mask\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\x12I\n\x06\x63reate\x18\x01 \x01(\x0b\x32\x37.google.ads.googleads.v25.resources.CustomizerAttributeH\x00\x12\x43\n\x06remove\x18\x02 \x01(\tB1\xfa\x41.\n,googleads.googleapis.com/CustomizerAttributeH\x00\x42\x0b\n\toperation\"\xac\x01\n\"MutateCustomizerAttributesResponse\x12S\n\x07results\x18\x01 \x03(\x0b\x32\x42.google.ads.googleads.v25.services.MutateCustomizerAttributeResult\x12\x31\n\x15partial_failure_error\x18\x02 \x01(\x0b\x32\x12.google.rpc.Status\"\xc2\x01\n\x1fMutateCustomizerAttributeResult\x12H\n\rresource_name\x18\x01 \x01(\tB1\xfa\x41.\n,googleads.googleapis.com/CustomizerAttribute\x12U\n\x14\x63ustomizer_attribute\x18\x02 \x01(\x0b\x32\x37.google.ads.googleads.v25.resources.CustomizerAttribute2\xef\x02\n\x1a\x43ustomizerAttributeService\x12\x89\x02\n\x1aMutateCustomizerAttributes\x12\x44.google.ads.googleads.v25.services.MutateCustomizerAttributesRequest\x1a\x45.google.ads.googleads.v25.services.MutateCustomizerAttributesResponse\"^\xda\x41\x16\x63ustomer_id,operations\x82\xd3\xe4\x93\x02?\":/v25/customers/{customer_id=*}/customizerAttributes:mutate:\x01*\x1a\x45\xca\x41\x18googleads.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/adwordsB\x8b\x02\n%com.google.ads.googleads.v25.servicesB\x1f\x43ustomizerAttributeServiceProtoP\x01ZIgoogle.golang.org/genproto/googleapis/ads/googleads/v25/services;services\xa2\x02\x03GAA\xaa\x02!Google.Ads.GoogleAds.V25.Services\xca\x02!Google\\Ads\\GoogleAds\\V25\\Services\xea\x02%Google::Ads::GoogleAds::V25::Servicesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Services + MutateCustomizerAttributesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.MutateCustomizerAttributesRequest").msgclass + CustomizerAttributeOperation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.CustomizerAttributeOperation").msgclass + MutateCustomizerAttributesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.MutateCustomizerAttributesResponse").msgclass + MutateCustomizerAttributeResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.MutateCustomizerAttributeResult").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/customizer_attribute_service_services_pb.rb b/lib/google/ads/google_ads/v25/services/customizer_attribute_service_services_pb.rb new file mode 100644 index 000000000..d9c8b9501 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/customizer_attribute_service_services_pb.rb @@ -0,0 +1,50 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/ads/googleads/v25/services/customizer_attribute_service.proto for package 'Google.Ads.GoogleAds.V25.Services' +# Original file comments: +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +require 'grpc' +require 'google/ads/google_ads/v25/services/customizer_attribute_service_pb' + +module Google + module Ads + module GoogleAds + module V25 + module Services + module CustomizerAttributeService + # Proto file describing the CustomizerAttribute service. + # + # Service to manage customizer attribute + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.ads.googleads.v25.services.CustomizerAttributeService' + + # Creates, updates or removes customizer attributes. Operation statuses are + # returned. + rpc :MutateCustomizerAttributes, ::Google::Ads::GoogleAds::V25::Services::MutateCustomizerAttributesRequest, ::Google::Ads::GoogleAds::V25::Services::MutateCustomizerAttributesResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/data_link_service.rb b/lib/google/ads/google_ads/v25/services/data_link_service.rb new file mode 100644 index 000000000..a12899966 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/data_link_service.rb @@ -0,0 +1,52 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/ads/google_ads/version" + +require "google/ads/google_ads/v25/services/data_link_service/credentials" +require "google/ads/google_ads/v25/services/data_link_service/paths" +require "google/ads/google_ads/v25/services/data_link_service/client" + +module Google + module Ads + module GoogleAds + module V25 + module Services + ## + # This service allows management of data links between a Google + # Ads customer and another data entity. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/ads/google_ads/v25/services/data_link_service" + # client = ::Google::Ads::GoogleAds::V25::Services::DataLinkService::Client.new + # + module DataLinkService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "data_link_service", "helpers.rb" +require "google/ads/google_ads/v25/services/data_link_service/helpers" if ::File.file? helper_path diff --git a/lib/google/ads/google_ads/v25/services/data_link_service/client.rb b/lib/google/ads/google_ads/v25/services/data_link_service/client.rb new file mode 100644 index 000000000..fe3fc5ee6 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/data_link_service/client.rb @@ -0,0 +1,708 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# require "google/ads/google_ads/error" +require "google/ads/google_ads/v25/services/data_link_service_pb" + +module Google + module Ads + module GoogleAds + module V25 + module Services + module DataLinkService + ## + # Client for the DataLinkService service. + # + # This service allows management of data links between a Google + # Ads customer and another data entity. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "googleads.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :data_link_service_stub + + ## + # Configure the DataLinkService Client class. + # + # See {::Google::Ads::GoogleAds::V25::Services::DataLinkService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all DataLinkService clients + # ::Google::Ads::GoogleAds::V25::Services::DataLinkService::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + default_config = Client::Configuration.new + + default_config.timeout = 14_400.0 + default_config.retry_policy = { + initial_delay: 5.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the DataLinkService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Ads::GoogleAds::V25::Services::DataLinkService::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @data_link_service_stub.universe_domain + end + + ## + # Create a new DataLinkService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Ads::GoogleAds::V25::Services::DataLinkService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Ads::GoogleAds::V25::Services::DataLinkService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the DataLinkService client. + # @yieldparam config [Client::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/ads/google_ads/v25/services/data_link_service_services_pb" + + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @data_link_service_stub = ::Gapic::ServiceStub.new( + ::Google::Ads::GoogleAds::V25::Services::DataLinkService::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool, + logger: @config.logger + ) + + @data_link_service_stub.stub_logger&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @data_link_service_stub.logger + end + + # Service calls + + ## + # Creates a data link. The requesting Google Ads account name and account ID + # will be shared with the third party (such as YouTube creators for video + # links) to whom you are creating the link with. + # + # List of thrown errors: + # [AuthenticationError]() + # [AuthorizationError]() + # [DatabaseError]() + # [DataLinkError]() + # [FieldError]() + # [HeaderError]() + # [InternalError]() + # [MutateError]() + # [QuotaError]() + # [RequestError]() + # + # @overload create_data_link(request, options = nil) + # Pass arguments to `create_data_link` via a request object, either of type + # {::Google::Ads::GoogleAds::V25::Services::CreateDataLinkRequest} or an equivalent Hash. + # + # @param request [::Google::Ads::GoogleAds::V25::Services::CreateDataLinkRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_data_link(customer_id: nil, data_link: nil) + # Pass arguments to `create_data_link` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param customer_id [::String] + # Required. The ID of the customer for which the data link is created. + # @param data_link [::Google::Ads::GoogleAds::V25::Resources::DataLink, ::Hash] + # Required. The data link to be created. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Ads::GoogleAds::V25::Services::CreateDataLinkResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Ads::GoogleAds::V25::Services::CreateDataLinkResponse] + # + # @raise [Google::Ads::GoogleAds::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/ads/google_ads/v25/services" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Ads::GoogleAds::V25::Services::DataLinkService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Ads::GoogleAds::V25::Services::CreateDataLinkRequest.new + # + # # Call the create_data_link method. + # result = client.create_data_link request + # + # # The returned object is of type Google::Ads::GoogleAds::V25::Services::CreateDataLinkResponse. + # p result + # + def create_data_link request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::GoogleAds::V25::Services::CreateDataLinkRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_data_link.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Ads::GoogleAds::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.customer_id + header_params["customer_id"] = request.customer_id + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_data_link.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_data_link.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_link_service_stub.call_rpc :create_data_link, request, options: options do |response, operation| + yield response, operation if block_given? + end + # rescue GRPC::BadStatus => grpc_error + # raise Google::Ads::GoogleAds::Error.new grpc_error.message + end + + ## + # Remove a data link. + # + # List of thrown errors: + # [AuthenticationError]() + # [AuthorizationError]() + # [DatabaseError]() + # [DataLinkError]() + # [FieldError]() + # [HeaderError]() + # [InternalError]() + # [MutateError]() + # [QuotaError]() + # [RequestError]() + # + # @overload remove_data_link(request, options = nil) + # Pass arguments to `remove_data_link` via a request object, either of type + # {::Google::Ads::GoogleAds::V25::Services::RemoveDataLinkRequest} or an equivalent Hash. + # + # @param request [::Google::Ads::GoogleAds::V25::Services::RemoveDataLinkRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload remove_data_link(customer_id: nil, resource_name: nil) + # Pass arguments to `remove_data_link` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param customer_id [::String] + # Required. The ID of the customer for which the data link is updated. + # @param resource_name [::String] + # Required. The data link is expected to have a valid resource name. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Ads::GoogleAds::V25::Services::RemoveDataLinkResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Ads::GoogleAds::V25::Services::RemoveDataLinkResponse] + # + # @raise [Google::Ads::GoogleAds::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/ads/google_ads/v25/services" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Ads::GoogleAds::V25::Services::DataLinkService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Ads::GoogleAds::V25::Services::RemoveDataLinkRequest.new + # + # # Call the remove_data_link method. + # result = client.remove_data_link request + # + # # The returned object is of type Google::Ads::GoogleAds::V25::Services::RemoveDataLinkResponse. + # p result + # + def remove_data_link request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::GoogleAds::V25::Services::RemoveDataLinkRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.remove_data_link.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Ads::GoogleAds::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.customer_id + header_params["customer_id"] = request.customer_id + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.remove_data_link.timeout, + metadata: metadata, + retry_policy: @config.rpcs.remove_data_link.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_link_service_stub.call_rpc :remove_data_link, request, options: options do |response, operation| + yield response, operation if block_given? + end + # rescue GRPC::BadStatus => grpc_error + # raise Google::Ads::GoogleAds::Error.new grpc_error.message + end + + ## + # Update a data link. + # + # List of thrown errors: + # [AuthenticationError]() + # [AuthorizationError]() + # [DatabaseError]() + # [DataLinkError]() + # [FieldError]() + # [HeaderError]() + # [InternalError]() + # [MutateError]() + # [QuotaError]() + # [RequestError]() + # + # @overload update_data_link(request, options = nil) + # Pass arguments to `update_data_link` via a request object, either of type + # {::Google::Ads::GoogleAds::V25::Services::UpdateDataLinkRequest} or an equivalent Hash. + # + # @param request [::Google::Ads::GoogleAds::V25::Services::UpdateDataLinkRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_data_link(customer_id: nil, data_link_status: nil, resource_name: nil) + # Pass arguments to `update_data_link` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param customer_id [::String] + # Required. The ID of the customer for which the data link is created. + # @param data_link_status [::Google::Ads::GoogleAds::V25::Enums::DataLinkStatusEnum::DataLinkStatus] + # Required. The data link status to be updated to. + # @param resource_name [::String] + # Required. The data link is expected to have a valid resource name. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Ads::GoogleAds::V25::Services::UpdateDataLinkResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Ads::GoogleAds::V25::Services::UpdateDataLinkResponse] + # + # @raise [Google::Ads::GoogleAds::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/ads/google_ads/v25/services" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Ads::GoogleAds::V25::Services::DataLinkService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Ads::GoogleAds::V25::Services::UpdateDataLinkRequest.new + # + # # Call the update_data_link method. + # result = client.update_data_link request + # + # # The returned object is of type Google::Ads::GoogleAds::V25::Services::UpdateDataLinkResponse. + # p result + # + def update_data_link request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::GoogleAds::V25::Services::UpdateDataLinkRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_data_link.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Ads::GoogleAds::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.customer_id + header_params["customer_id"] = request.customer_id + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_data_link.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_data_link.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_link_service_stub.call_rpc :update_data_link, request, options: options do |response, operation| + yield response, operation if block_given? + end + # rescue GRPC::BadStatus => grpc_error + # raise Google::Ads::GoogleAds::Error.new grpc_error.message + end + + ## + # Configuration class for the DataLinkService API. + # + # This class represents the configuration for DataLinkService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Ads::GoogleAds::V25::Services::DataLinkService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # create_data_link to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Ads::GoogleAds::V25::Services::DataLinkService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.create_data_link.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Ads::GoogleAds::V25::Services::DataLinkService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.create_data_link.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Ads::GoogleAds::V25::Services::DataLinkService::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "googleads.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, + ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the DataLinkService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `create_data_link` + # @return [::Gapic::Config::Method] + # + attr_reader :create_data_link + ## + # RPC-specific configuration for `remove_data_link` + # @return [::Gapic::Config::Method] + # + attr_reader :remove_data_link + ## + # RPC-specific configuration for `update_data_link` + # @return [::Gapic::Config::Method] + # + attr_reader :update_data_link + + # @private + def initialize parent_rpcs = nil + create_data_link_config = parent_rpcs.create_data_link if parent_rpcs.respond_to? :create_data_link + @create_data_link = ::Gapic::Config::Method.new create_data_link_config + remove_data_link_config = parent_rpcs.remove_data_link if parent_rpcs.respond_to? :remove_data_link + @remove_data_link = ::Gapic::Config::Method.new remove_data_link_config + update_data_link_config = parent_rpcs.update_data_link if parent_rpcs.respond_to? :update_data_link + @update_data_link = ::Gapic::Config::Method.new update_data_link_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/data_link_service/credentials.rb b/lib/google/ads/google_ads/v25/services/data_link_service/credentials.rb new file mode 100644 index 000000000..0af1fbf8e --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/data_link_service/credentials.rb @@ -0,0 +1,38 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Ads + module GoogleAds + module V25 + module Services + module DataLinkService + # Credentials for the DataLinkService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/adwords" + ] + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/data_link_service/paths.rb b/lib/google/ads/google_ads/v25/services/data_link_service/paths.rb new file mode 100644 index 000000000..c642e3191 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/data_link_service/paths.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Ads + module GoogleAds + module V25 + module Services + module DataLinkService + # Path helper methods for the DataLinkService API. + module Paths + ## + # Create a fully-qualified DataLink resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/dataLinks/{product_link_id}~{data_link_id}` + # + # @param customer_id [String] + # @param product_link_id [String] + # @param data_link_id [String] + # + # @return [::String] + def data_link_path customer_id:, product_link_id:, data_link_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + raise ::ArgumentError, "product_link_id cannot contain /" if product_link_id.to_s.include? "/" + + "customers/#{customer_id}/dataLinks/#{product_link_id}~#{data_link_id}" + end + + extend self + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/data_link_service_pb.rb b/lib/google/ads/google_ads/v25/services/data_link_service_pb.rb new file mode 100644 index 000000000..51b94e422 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/data_link_service_pb.rb @@ -0,0 +1,35 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/services/data_link_service.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/enums/data_link_status_pb' +require 'google/ads/google_ads/v25/resources/data_link_pb' +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' + + +descriptor_data = "\n9google/ads/googleads/v25/services/data_link_service.proto\x12!google.ads.googleads.v25.services\x1a\x35google/ads/googleads/v25/enums/data_link_status.proto\x1a\x32google/ads/googleads/v25/resources/data_link.proto\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"w\n\x15\x43reateDataLinkRequest\x12\x18\n\x0b\x63ustomer_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x44\n\tdata_link\x18\x02 \x01(\x0b\x32,.google.ads.googleads.v25.resources.DataLinkB\x03\xe0\x41\x02\"W\n\x16\x43reateDataLinkResponse\x12=\n\rresource_name\x18\x01 \x01(\tB&\xfa\x41#\n!googleads.googleapis.com/DataLink\"s\n\x15RemoveDataLinkRequest\x12\x18\n\x0b\x63ustomer_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12@\n\rresource_name\x18\x02 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!googleads.googleapis.com/DataLink\"W\n\x16RemoveDataLinkResponse\x12=\n\rresource_name\x18\x01 \x01(\tB&\xfa\x41#\n!googleads.googleapis.com/DataLink\"\xd5\x01\n\x15UpdateDataLinkRequest\x12\x18\n\x0b\x63ustomer_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12`\n\x10\x64\x61ta_link_status\x18\x02 \x01(\x0e\x32\x41.google.ads.googleads.v25.enums.DataLinkStatusEnum.DataLinkStatusB\x03\xe0\x41\x02\x12@\n\rresource_name\x18\x03 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!googleads.googleapis.com/DataLink\"W\n\x16UpdateDataLinkResponse\x12=\n\rresource_name\x18\x01 \x01(\tB&\xfa\x41#\n!googleads.googleapis.com/DataLink2\x85\x06\n\x0f\x44\x61taLinkService\x12\xd9\x01\n\x0e\x43reateDataLink\x12\x38.google.ads.googleads.v25.services.CreateDataLinkRequest\x1a\x39.google.ads.googleads.v25.services.CreateDataLinkResponse\"R\xda\x41\x15\x63ustomer_id,data_link\x82\xd3\xe4\x93\x02\x34\"//v25/customers/{customer_id=*}/dataLinks:create:\x01*\x12\xdd\x01\n\x0eRemoveDataLink\x12\x38.google.ads.googleads.v25.services.RemoveDataLinkRequest\x1a\x39.google.ads.googleads.v25.services.RemoveDataLinkResponse\"V\xda\x41\x19\x63ustomer_id,resource_name\x82\xd3\xe4\x93\x02\x34\"//v25/customers/{customer_id=*}/dataLinks:remove:\x01*\x12\xee\x01\n\x0eUpdateDataLink\x12\x38.google.ads.googleads.v25.services.UpdateDataLinkRequest\x1a\x39.google.ads.googleads.v25.services.UpdateDataLinkResponse\"g\xda\x41*customer_id,data_link_status,resource_name\x82\xd3\xe4\x93\x02\x34\"//v25/customers/{customer_id=*}/dataLinks:update:\x01*\x1a\x45\xca\x41\x18googleads.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/adwordsB\x80\x02\n%com.google.ads.googleads.v25.servicesB\x14\x44\x61taLinkServiceProtoP\x01ZIgoogle.golang.org/genproto/googleapis/ads/googleads/v25/services;services\xa2\x02\x03GAA\xaa\x02!Google.Ads.GoogleAds.V25.Services\xca\x02!Google\\Ads\\GoogleAds\\V25\\Services\xea\x02%Google::Ads::GoogleAds::V25::Servicesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Services + CreateDataLinkRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.CreateDataLinkRequest").msgclass + CreateDataLinkResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.CreateDataLinkResponse").msgclass + RemoveDataLinkRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.RemoveDataLinkRequest").msgclass + RemoveDataLinkResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.RemoveDataLinkResponse").msgclass + UpdateDataLinkRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.UpdateDataLinkRequest").msgclass + UpdateDataLinkResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.UpdateDataLinkResponse").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/data_link_service_services_pb.rb b/lib/google/ads/google_ads/v25/services/data_link_service_services_pb.rb new file mode 100644 index 000000000..7b280264a --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/data_link_service_services_pb.rb @@ -0,0 +1,90 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/ads/googleads/v25/services/data_link_service.proto for package 'Google.Ads.GoogleAds.V25.Services' +# Original file comments: +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +require 'grpc' +require 'google/ads/google_ads/v25/services/data_link_service_pb' + +module Google + module Ads + module GoogleAds + module V25 + module Services + module DataLinkService + # This service allows management of data links between a Google + # Ads customer and another data entity. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.ads.googleads.v25.services.DataLinkService' + + # Creates a data link. The requesting Google Ads account name and account ID + # will be shared with the third party (such as YouTube creators for video + # links) to whom you are creating the link with. + # + # List of thrown errors: + # [AuthenticationError]() + # [AuthorizationError]() + # [DatabaseError]() + # [DataLinkError]() + # [FieldError]() + # [HeaderError]() + # [InternalError]() + # [MutateError]() + # [QuotaError]() + # [RequestError]() + rpc :CreateDataLink, ::Google::Ads::GoogleAds::V25::Services::CreateDataLinkRequest, ::Google::Ads::GoogleAds::V25::Services::CreateDataLinkResponse + # Remove a data link. + # + # List of thrown errors: + # [AuthenticationError]() + # [AuthorizationError]() + # [DatabaseError]() + # [DataLinkError]() + # [FieldError]() + # [HeaderError]() + # [InternalError]() + # [MutateError]() + # [QuotaError]() + # [RequestError]() + rpc :RemoveDataLink, ::Google::Ads::GoogleAds::V25::Services::RemoveDataLinkRequest, ::Google::Ads::GoogleAds::V25::Services::RemoveDataLinkResponse + # Update a data link. + # + # List of thrown errors: + # [AuthenticationError]() + # [AuthorizationError]() + # [DatabaseError]() + # [DataLinkError]() + # [FieldError]() + # [HeaderError]() + # [InternalError]() + # [MutateError]() + # [QuotaError]() + # [RequestError]() + rpc :UpdateDataLink, ::Google::Ads::GoogleAds::V25::Services::UpdateDataLinkRequest, ::Google::Ads::GoogleAds::V25::Services::UpdateDataLinkResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/experiment_arm_service.rb b/lib/google/ads/google_ads/v25/services/experiment_arm_service.rb new file mode 100644 index 000000000..b8f7063ff --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/experiment_arm_service.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/ads/google_ads/version" + +require "google/ads/google_ads/v25/services/experiment_arm_service/credentials" +require "google/ads/google_ads/v25/services/experiment_arm_service/paths" +require "google/ads/google_ads/v25/services/experiment_arm_service/client" + +module Google + module Ads + module GoogleAds + module V25 + module Services + ## + # Service to manage experiment arms. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/ads/google_ads/v25/services/experiment_arm_service" + # client = ::Google::Ads::GoogleAds::V25::Services::ExperimentArmService::Client.new + # + module ExperimentArmService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "experiment_arm_service", "helpers.rb" +require "google/ads/google_ads/v25/services/experiment_arm_service/helpers" if ::File.file? helper_path diff --git a/lib/google/ads/google_ads/v25/services/experiment_arm_service/client.rb b/lib/google/ads/google_ads/v25/services/experiment_arm_service/client.rb new file mode 100644 index 000000000..7873ef26b --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/experiment_arm_service/client.rb @@ -0,0 +1,501 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# require "google/ads/google_ads/error" +require "google/ads/google_ads/v25/services/experiment_arm_service_pb" + +module Google + module Ads + module GoogleAds + module V25 + module Services + module ExperimentArmService + ## + # Client for the ExperimentArmService service. + # + # Service to manage experiment arms. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "googleads.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :experiment_arm_service_stub + + ## + # Configure the ExperimentArmService Client class. + # + # See {::Google::Ads::GoogleAds::V25::Services::ExperimentArmService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all ExperimentArmService clients + # ::Google::Ads::GoogleAds::V25::Services::ExperimentArmService::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + default_config = Client::Configuration.new + + default_config.timeout = 14_400.0 + default_config.retry_policy = { + initial_delay: 5.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the ExperimentArmService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Ads::GoogleAds::V25::Services::ExperimentArmService::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @experiment_arm_service_stub.universe_domain + end + + ## + # Create a new ExperimentArmService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Ads::GoogleAds::V25::Services::ExperimentArmService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Ads::GoogleAds::V25::Services::ExperimentArmService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the ExperimentArmService client. + # @yieldparam config [Client::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/ads/google_ads/v25/services/experiment_arm_service_services_pb" + + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @experiment_arm_service_stub = ::Gapic::ServiceStub.new( + ::Google::Ads::GoogleAds::V25::Services::ExperimentArmService::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool, + logger: @config.logger + ) + + @experiment_arm_service_stub.stub_logger&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @experiment_arm_service_stub.logger + end + + # Service calls + + ## + # Creates, updates, or removes experiment arms. Operation statuses are + # returned. + # + # List of thrown errors: + # [AuthenticationError]() + # [AuthorizationError]() + # [ExperimentArmError]() + # [HeaderError]() + # [InternalError]() + # [QuotaError]() + # [RequestError]() + # + # @overload mutate_experiment_arms(request, options = nil) + # Pass arguments to `mutate_experiment_arms` via a request object, either of type + # {::Google::Ads::GoogleAds::V25::Services::MutateExperimentArmsRequest} or an equivalent Hash. + # + # @param request [::Google::Ads::GoogleAds::V25::Services::MutateExperimentArmsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload mutate_experiment_arms(customer_id: nil, operations: nil, partial_failure: nil, validate_only: nil, response_content_type: nil) + # Pass arguments to `mutate_experiment_arms` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param customer_id [::String] + # Required. The ID of the customer whose experiments are being modified. + # @param operations [::Array<::Google::Ads::GoogleAds::V25::Services::ExperimentArmOperation, ::Hash>] + # Required. The list of operations to perform on individual experiment arm. + # @param partial_failure [::Boolean] + # 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. + # @param validate_only [::Boolean] + # If true, the request is validated but not executed. Only errors are + # returned, not results. + # @param response_content_type [::Google::Ads::GoogleAds::V25::Enums::ResponseContentTypeEnum::ResponseContentType] + # The response content type setting. Determines whether the mutable resource + # or just the resource name should be returned post mutation. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Ads::GoogleAds::V25::Services::MutateExperimentArmsResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Ads::GoogleAds::V25::Services::MutateExperimentArmsResponse] + # + # @raise [Google::Ads::GoogleAds::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/ads/google_ads/v25/services" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Ads::GoogleAds::V25::Services::ExperimentArmService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Ads::GoogleAds::V25::Services::MutateExperimentArmsRequest.new + # + # # Call the mutate_experiment_arms method. + # result = client.mutate_experiment_arms request + # + # # The returned object is of type Google::Ads::GoogleAds::V25::Services::MutateExperimentArmsResponse. + # p result + # + def mutate_experiment_arms request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::GoogleAds::V25::Services::MutateExperimentArmsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.mutate_experiment_arms.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Ads::GoogleAds::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.customer_id + header_params["customer_id"] = request.customer_id + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.mutate_experiment_arms.timeout, + metadata: metadata, + retry_policy: @config.rpcs.mutate_experiment_arms.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @experiment_arm_service_stub.call_rpc :mutate_experiment_arms, request, + options: options do |response, operation| + yield response, operation if block_given? + end + # rescue GRPC::BadStatus => grpc_error + # raise Google::Ads::GoogleAds::Error.new grpc_error.message + end + + ## + # Configuration class for the ExperimentArmService API. + # + # This class represents the configuration for ExperimentArmService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Ads::GoogleAds::V25::Services::ExperimentArmService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # mutate_experiment_arms to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Ads::GoogleAds::V25::Services::ExperimentArmService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.mutate_experiment_arms.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Ads::GoogleAds::V25::Services::ExperimentArmService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.mutate_experiment_arms.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Ads::GoogleAds::V25::Services::ExperimentArmService::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "googleads.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, + ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the ExperimentArmService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `mutate_experiment_arms` + # @return [::Gapic::Config::Method] + # + attr_reader :mutate_experiment_arms + + # @private + def initialize parent_rpcs = nil + mutate_experiment_arms_config = parent_rpcs.mutate_experiment_arms if parent_rpcs.respond_to? :mutate_experiment_arms + @mutate_experiment_arms = ::Gapic::Config::Method.new mutate_experiment_arms_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/experiment_arm_service/credentials.rb b/lib/google/ads/google_ads/v25/services/experiment_arm_service/credentials.rb new file mode 100644 index 000000000..6dbda3121 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/experiment_arm_service/credentials.rb @@ -0,0 +1,38 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Ads + module GoogleAds + module V25 + module Services + module ExperimentArmService + # Credentials for the ExperimentArmService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/adwords" + ] + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/experiment_arm_service/paths.rb b/lib/google/ads/google_ads/v25/services/experiment_arm_service/paths.rb new file mode 100644 index 000000000..9a764d7ad --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/experiment_arm_service/paths.rb @@ -0,0 +1,156 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Ads + module GoogleAds + module V25 + module Services + module ExperimentArmService + # Path helper methods for the ExperimentArmService API. + module Paths + ## + # Create a fully-qualified Ad resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/ads/{ad_id}` + # + # @param customer_id [String] + # @param ad_id [String] + # + # @return [::String] + def ad_path customer_id:, ad_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/ads/#{ad_id}" + end + + ## + # Create a fully-qualified AdGroup resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/adGroups/{ad_group_id}` + # + # @param customer_id [String] + # @param ad_group_id [String] + # + # @return [::String] + def ad_group_path customer_id:, ad_group_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/adGroups/#{ad_group_id}" + end + + ## + # Create a fully-qualified Asset resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/assets/{asset_id}` + # + # @param customer_id [String] + # @param asset_id [String] + # + # @return [::String] + def asset_path customer_id:, asset_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/assets/#{asset_id}" + end + + ## + # Create a fully-qualified AssetGroup resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/assetGroups/{asset_group_id}` + # + # @param customer_id [String] + # @param asset_group_id [String] + # + # @return [::String] + def asset_group_path customer_id:, asset_group_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/assetGroups/#{asset_group_id}" + end + + ## + # Create a fully-qualified Campaign resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/campaigns/{campaign_id}` + # + # @param customer_id [String] + # @param campaign_id [String] + # + # @return [::String] + def campaign_path customer_id:, campaign_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/campaigns/#{campaign_id}" + end + + ## + # Create a fully-qualified Experiment resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/experiments/{trial_id}` + # + # @param customer_id [String] + # @param trial_id [String] + # + # @return [::String] + def experiment_path customer_id:, trial_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/experiments/#{trial_id}" + end + + ## + # Create a fully-qualified ExperimentArm resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/experimentArms/{trial_id}~{trial_arm_id}` + # + # @param customer_id [String] + # @param trial_id [String] + # @param trial_arm_id [String] + # + # @return [::String] + def experiment_arm_path customer_id:, trial_id:, trial_arm_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + raise ::ArgumentError, "trial_id cannot contain /" if trial_id.to_s.include? "/" + + "customers/#{customer_id}/experimentArms/#{trial_id}~#{trial_arm_id}" + end + + extend self + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/experiment_arm_service_pb.rb b/lib/google/ads/google_ads/v25/services/experiment_arm_service_pb.rb new file mode 100644 index 000000000..cbcdc3d1f --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/experiment_arm_service_pb.rb @@ -0,0 +1,35 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/services/experiment_arm_service.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/enums/response_content_type_pb' +require 'google/ads/google_ads/v25/resources/experiment_arm_pb' +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/field_mask_pb' +require 'google/rpc/status_pb' + + +descriptor_data = "\n>google/ads/googleads/v25/services/experiment_arm_service.proto\x12!google.ads.googleads.v25.services\x1a:google/ads/googleads/v25/enums/response_content_type.proto\x1a\x37google/ads/googleads/v25/resources/experiment_arm.proto\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\x1a\x17google/rpc/status.proto\"\xa7\x02\n\x1bMutateExperimentArmsRequest\x12\x18\n\x0b\x63ustomer_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12R\n\noperations\x18\x02 \x03(\x0b\x32\x39.google.ads.googleads.v25.services.ExperimentArmOperationB\x03\xe0\x41\x02\x12\x17\n\x0fpartial_failure\x18\x03 \x01(\x08\x12\x15\n\rvalidate_only\x18\x04 \x01(\x08\x12j\n\x15response_content_type\x18\x05 \x01(\x0e\x32K.google.ads.googleads.v25.enums.ResponseContentTypeEnum.ResponseContentType\"\x9f\x02\n\x16\x45xperimentArmOperation\x12/\n\x0bupdate_mask\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\x12\x43\n\x06\x63reate\x18\x01 \x01(\x0b\x32\x31.google.ads.googleads.v25.resources.ExperimentArmH\x00\x12\x43\n\x06update\x18\x02 \x01(\x0b\x32\x31.google.ads.googleads.v25.resources.ExperimentArmH\x00\x12=\n\x06remove\x18\x03 \x01(\tB+\xfa\x41(\n&googleads.googleapis.com/ExperimentArmH\x00\x42\x0b\n\toperation\"\xa0\x01\n\x1cMutateExperimentArmsResponse\x12\x31\n\x15partial_failure_error\x18\x01 \x01(\x0b\x32\x12.google.rpc.Status\x12M\n\x07results\x18\x02 \x03(\x0b\x32<.google.ads.googleads.v25.services.MutateExperimentArmResult\"\xaa\x01\n\x19MutateExperimentArmResult\x12\x42\n\rresource_name\x18\x01 \x01(\tB+\xfa\x41(\n&googleads.googleapis.com/ExperimentArm\x12I\n\x0e\x65xperiment_arm\x18\x02 \x01(\x0b\x32\x31.google.ads.googleads.v25.resources.ExperimentArm2\xd1\x02\n\x14\x45xperimentArmService\x12\xf1\x01\n\x14MutateExperimentArms\x12>.google.ads.googleads.v25.services.MutateExperimentArmsRequest\x1a?.google.ads.googleads.v25.services.MutateExperimentArmsResponse\"X\xda\x41\x16\x63ustomer_id,operations\x82\xd3\xe4\x93\x02\x39\"4/v25/customers/{customer_id=*}/experimentArms:mutate:\x01*\x1a\x45\xca\x41\x18googleads.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/adwordsB\x85\x02\n%com.google.ads.googleads.v25.servicesB\x19\x45xperimentArmServiceProtoP\x01ZIgoogle.golang.org/genproto/googleapis/ads/googleads/v25/services;services\xa2\x02\x03GAA\xaa\x02!Google.Ads.GoogleAds.V25.Services\xca\x02!Google\\Ads\\GoogleAds\\V25\\Services\xea\x02%Google::Ads::GoogleAds::V25::Servicesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Services + MutateExperimentArmsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.MutateExperimentArmsRequest").msgclass + ExperimentArmOperation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.ExperimentArmOperation").msgclass + MutateExperimentArmsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.MutateExperimentArmsResponse").msgclass + MutateExperimentArmResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.MutateExperimentArmResult").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/experiment_arm_service_services_pb.rb b/lib/google/ads/google_ads/v25/services/experiment_arm_service_services_pb.rb new file mode 100644 index 000000000..1fdd2f94a --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/experiment_arm_service_services_pb.rb @@ -0,0 +1,59 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/ads/googleads/v25/services/experiment_arm_service.proto for package 'Google.Ads.GoogleAds.V25.Services' +# Original file comments: +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +require 'grpc' +require 'google/ads/google_ads/v25/services/experiment_arm_service_pb' + +module Google + module Ads + module GoogleAds + module V25 + module Services + module ExperimentArmService + # Proto file describing the Experiment Arm service. + # + # Service to manage experiment arms. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.ads.googleads.v25.services.ExperimentArmService' + + # Creates, updates, or removes experiment arms. Operation statuses are + # returned. + # + # List of thrown errors: + # [AuthenticationError]() + # [AuthorizationError]() + # [ExperimentArmError]() + # [HeaderError]() + # [InternalError]() + # [QuotaError]() + # [RequestError]() + rpc :MutateExperimentArms, ::Google::Ads::GoogleAds::V25::Services::MutateExperimentArmsRequest, ::Google::Ads::GoogleAds::V25::Services::MutateExperimentArmsResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/experiment_service.rb b/lib/google/ads/google_ads/v25/services/experiment_service.rb new file mode 100644 index 000000000..ed85471c5 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/experiment_service.rb @@ -0,0 +1,52 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/ads/google_ads/version" + +require "google/ads/google_ads/v25/services/experiment_service/credentials" +require "google/ads/google_ads/v25/services/experiment_service/paths" +require "google/ads/google_ads/v25/services/experiment_service/operations" +require "google/ads/google_ads/v25/services/experiment_service/client" + +module Google + module Ads + module GoogleAds + module V25 + module Services + ## + # Service to manage experiments. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/ads/google_ads/v25/services/experiment_service" + # client = ::Google::Ads::GoogleAds::V25::Services::ExperimentService::Client.new + # + module ExperimentService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "experiment_service", "helpers.rb" +require "google/ads/google_ads/v25/services/experiment_service/helpers" if ::File.file? helper_path diff --git a/lib/google/ads/google_ads/v25/services/experiment_service/client.rb b/lib/google/ads/google_ads/v25/services/experiment_service/client.rb new file mode 100644 index 000000000..16dd5c356 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/experiment_service/client.rb @@ -0,0 +1,1096 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# require "google/ads/google_ads/error" +require "google/ads/google_ads/v25/services/experiment_service_pb" + +module Google + module Ads + module GoogleAds + module V25 + module Services + module ExperimentService + ## + # Client for the ExperimentService service. + # + # Service to manage experiments. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "googleads.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :experiment_service_stub + + ## + # Configure the ExperimentService Client class. + # + # See {::Google::Ads::GoogleAds::V25::Services::ExperimentService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all ExperimentService clients + # ::Google::Ads::GoogleAds::V25::Services::ExperimentService::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + default_config = Client::Configuration.new + + default_config.timeout = 14_400.0 + default_config.retry_policy = { + initial_delay: 5.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the ExperimentService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Ads::GoogleAds::V25::Services::ExperimentService::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @experiment_service_stub.universe_domain + end + + ## + # Create a new ExperimentService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Ads::GoogleAds::V25::Services::ExperimentService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Ads::GoogleAds::V25::Services::ExperimentService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the ExperimentService client. + # @yieldparam config [Client::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/ads/google_ads/v25/services/experiment_service_services_pb" + + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_client = Operations.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @config.endpoint + config.universe_domain = @config.universe_domain + end + + @experiment_service_stub = ::Gapic::ServiceStub.new( + ::Google::Ads::GoogleAds::V25::Services::ExperimentService::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool, + logger: @config.logger + ) + + @experiment_service_stub.stub_logger&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Ads::GoogleAds::V25::Services::ExperimentService::Operations] + # + attr_reader :operations_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @experiment_service_stub.logger + end + + # Service calls + + ## + # Creates, updates, or removes experiments. Operation statuses are returned. + # + # List of thrown errors: + # [AuthenticationError]() + # [AuthorizationError]() + # [ExperimentError]() + # [HeaderError]() + # [InternalError]() + # [QuotaError]() + # [RequestError]() + # + # @overload mutate_experiments(request, options = nil) + # Pass arguments to `mutate_experiments` via a request object, either of type + # {::Google::Ads::GoogleAds::V25::Services::MutateExperimentsRequest} or an equivalent Hash. + # + # @param request [::Google::Ads::GoogleAds::V25::Services::MutateExperimentsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload mutate_experiments(customer_id: nil, operations: nil, partial_failure: nil, validate_only: nil) + # Pass arguments to `mutate_experiments` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param customer_id [::String] + # Required. The ID of the customer whose experiments are being modified. + # @param operations [::Array<::Google::Ads::GoogleAds::V25::Services::ExperimentOperation, ::Hash>] + # Required. The list of operations to perform on individual experiments. + # @param partial_failure [::Boolean] + # 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. + # @param validate_only [::Boolean] + # If true, the request is validated but not executed. Only errors are + # returned, not results. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Ads::GoogleAds::V25::Services::MutateExperimentsResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Ads::GoogleAds::V25::Services::MutateExperimentsResponse] + # + # @raise [Google::Ads::GoogleAds::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/ads/google_ads/v25/services" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Ads::GoogleAds::V25::Services::ExperimentService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Ads::GoogleAds::V25::Services::MutateExperimentsRequest.new + # + # # Call the mutate_experiments method. + # result = client.mutate_experiments request + # + # # The returned object is of type Google::Ads::GoogleAds::V25::Services::MutateExperimentsResponse. + # p result + # + def mutate_experiments request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::GoogleAds::V25::Services::MutateExperimentsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.mutate_experiments.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Ads::GoogleAds::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.customer_id + header_params["customer_id"] = request.customer_id + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.mutate_experiments.timeout, + metadata: metadata, + retry_policy: @config.rpcs.mutate_experiments.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @experiment_service_stub.call_rpc :mutate_experiments, request, + options: options do |response, operation| + yield response, operation if block_given? + end + # rescue GRPC::BadStatus => grpc_error + # raise Google::Ads::GoogleAds::Error.new grpc_error.message + end + + ## + # Immediately ends an experiment, changing the experiment's scheduled + # end date and without waiting for end of day. End date is updated to be the + # time of the request. + # + # List of thrown errors: + # [AuthenticationError]() + # [AuthorizationError]() + # [ExperimentError]() + # [HeaderError]() + # [InternalError]() + # [QuotaError]() + # [RequestError]() + # + # @overload end_experiment(request, options = nil) + # Pass arguments to `end_experiment` via a request object, either of type + # {::Google::Ads::GoogleAds::V25::Services::EndExperimentRequest} or an equivalent Hash. + # + # @param request [::Google::Ads::GoogleAds::V25::Services::EndExperimentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload end_experiment(experiment: nil, validate_only: nil) + # Pass arguments to `end_experiment` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param experiment [::String] + # Required. The resource name of the campaign experiment to end. + # @param validate_only [::Boolean] + # If true, the request is validated but not executed. Only errors are + # returned, not results. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [Google::Ads::GoogleAds::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/ads/google_ads/v25/services" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Ads::GoogleAds::V25::Services::ExperimentService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Ads::GoogleAds::V25::Services::EndExperimentRequest.new + # + # # Call the end_experiment method. + # result = client.end_experiment request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def end_experiment request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::GoogleAds::V25::Services::EndExperimentRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.end_experiment.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Ads::GoogleAds::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.experiment + header_params["experiment"] = request.experiment + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.end_experiment.timeout, + metadata: metadata, + retry_policy: @config.rpcs.end_experiment.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @experiment_service_stub.call_rpc :end_experiment, request, options: options do |response, operation| + yield response, operation if block_given? + end + # rescue GRPC::BadStatus => grpc_error + # raise Google::Ads::GoogleAds::Error.new grpc_error.message + end + + ## + # Returns all errors that occurred during the last Experiment update (either + # scheduling or promotion). + # Supports standard list paging. + # + # List of thrown errors: + # [AuthenticationError]() + # [AuthorizationError]() + # [HeaderError]() + # [InternalError]() + # [QuotaError]() + # [RequestError]() + # + # @overload list_experiment_async_errors(request, options = nil) + # Pass arguments to `list_experiment_async_errors` via a request object, either of type + # {::Google::Ads::GoogleAds::V25::Services::ListExperimentAsyncErrorsRequest} or an equivalent Hash. + # + # @param request [::Google::Ads::GoogleAds::V25::Services::ListExperimentAsyncErrorsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_experiment_async_errors(resource_name: nil, page_token: nil, page_size: nil) + # Pass arguments to `list_experiment_async_errors` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param resource_name [::String] + # Required. The name of the experiment from which to retrieve the async + # errors. + # @param page_token [::String] + # 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. + # @param page_size [::Integer] + # 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. + # The maximum page size is 1000. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Rpc::Status>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Rpc::Status>] + # + # @raise [Google::Ads::GoogleAds::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/ads/google_ads/v25/services" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Ads::GoogleAds::V25::Services::ExperimentService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Ads::GoogleAds::V25::Services::ListExperimentAsyncErrorsRequest.new + # + # # Call the list_experiment_async_errors method. + # result = client.list_experiment_async_errors request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Rpc::Status. + # p item + # end + # + def list_experiment_async_errors request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::GoogleAds::V25::Services::ListExperimentAsyncErrorsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_experiment_async_errors.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Ads::GoogleAds::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.resource_name + header_params["resource_name"] = request.resource_name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_experiment_async_errors.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_experiment_async_errors.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @experiment_service_stub.call_rpc :list_experiment_async_errors, request, + options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @experiment_service_stub, :list_experiment_async_errors, + request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + # rescue GRPC::BadStatus => grpc_error + # raise Google::Ads::GoogleAds::Error.new grpc_error.message + end + + ## + # Graduates an experiment to a full campaign. + # + # List of thrown errors: + # [AuthenticationError]() + # [AuthorizationError]() + # [ExperimentError]() + # [HeaderError]() + # [InternalError]() + # [MutateError]() + # [QuotaError]() + # [RequestError]() + # + # @overload graduate_experiment(request, options = nil) + # Pass arguments to `graduate_experiment` via a request object, either of type + # {::Google::Ads::GoogleAds::V25::Services::GraduateExperimentRequest} or an equivalent Hash. + # + # @param request [::Google::Ads::GoogleAds::V25::Services::GraduateExperimentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload graduate_experiment(experiment: nil, campaign_budget_mappings: nil, validate_only: nil) + # Pass arguments to `graduate_experiment` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param experiment [::String] + # Required. The experiment to be graduated. + # @param campaign_budget_mappings [::Array<::Google::Ads::GoogleAds::V25::Services::CampaignBudgetMapping, ::Hash>] + # Required. List of campaign budget mappings for graduation. Each campaign + # that appears here will graduate, and will be assigned a new budget that is + # paired with it in the mapping. The maximum size is one. + # @param validate_only [::Boolean] + # If true, the request is validated but not executed. Only errors are + # returned, not results. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [Google::Ads::GoogleAds::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/ads/google_ads/v25/services" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Ads::GoogleAds::V25::Services::ExperimentService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Ads::GoogleAds::V25::Services::GraduateExperimentRequest.new + # + # # Call the graduate_experiment method. + # result = client.graduate_experiment request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def graduate_experiment request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::GoogleAds::V25::Services::GraduateExperimentRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.graduate_experiment.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Ads::GoogleAds::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.experiment + header_params["experiment"] = request.experiment + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.graduate_experiment.timeout, + metadata: metadata, + retry_policy: @config.rpcs.graduate_experiment.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @experiment_service_stub.call_rpc :graduate_experiment, request, + options: options do |response, operation| + yield response, operation if block_given? + end + # rescue GRPC::BadStatus => grpc_error + # raise Google::Ads::GoogleAds::Error.new grpc_error.message + end + + ## + # Schedule an experiment. The in design campaign + # will be converted into a real campaign (called the experiment campaign) + # that will begin serving ads if successfully created. + # + # The experiment is scheduled immediately with status INITIALIZING. + # This method returns a long running operation that tracks the forking of the + # in design campaign. If the forking fails, a list of errors can be retrieved + # using the ListExperimentAsyncErrors method. The operation's + # metadata will be a string containing the resource name of the created + # experiment. + # + # List of thrown errors: + # [AuthenticationError]() + # [AuthorizationError]() + # [ExperimentError]() + # [DatabaseError]() + # [DateError]() + # [DateRangeError]() + # [FieldError]() + # [HeaderError]() + # [InternalError]() + # [QuotaError]() + # [RangeError]() + # [RequestError]() + # + # @overload schedule_experiment(request, options = nil) + # Pass arguments to `schedule_experiment` via a request object, either of type + # {::Google::Ads::GoogleAds::V25::Services::ScheduleExperimentRequest} or an equivalent Hash. + # + # @param request [::Google::Ads::GoogleAds::V25::Services::ScheduleExperimentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload schedule_experiment(resource_name: nil, validate_only: nil) + # Pass arguments to `schedule_experiment` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param resource_name [::String] + # Required. The scheduled experiment. + # @param validate_only [::Boolean] + # If true, the request is validated but not executed. Only errors are + # returned, not results. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [Google::Ads::GoogleAds::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/ads/google_ads/v25/services" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Ads::GoogleAds::V25::Services::ExperimentService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Ads::GoogleAds::V25::Services::ScheduleExperimentRequest.new + # + # # Call the schedule_experiment method. + # result = client.schedule_experiment request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def schedule_experiment request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::GoogleAds::V25::Services::ScheduleExperimentRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.schedule_experiment.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Ads::GoogleAds::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.resource_name + header_params["resource_name"] = request.resource_name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.schedule_experiment.timeout, + metadata: metadata, + retry_policy: @config.rpcs.schedule_experiment.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @experiment_service_stub.call_rpc :schedule_experiment, request, + options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + # rescue GRPC::BadStatus => grpc_error + # raise Google::Ads::GoogleAds::Error.new grpc_error.message + end + + ## + # Promotes the trial campaign thus applying changes in the trial campaign + # to the base campaign. + # This method returns a long running operation that tracks the promotion of + # the experiment campaign. If it fails, a list of errors can be retrieved + # using the ListExperimentAsyncErrors method. The operation's + # metadata will be a string containing the resource name of the created + # experiment. + # + # List of thrown errors: + # [AuthenticationError]() + # [AuthorizationError]() + # [ExperimentError]() + # [HeaderError]() + # [InternalError]() + # [QuotaError]() + # [RequestError]() + # + # @overload promote_experiment(request, options = nil) + # Pass arguments to `promote_experiment` via a request object, either of type + # {::Google::Ads::GoogleAds::V25::Services::PromoteExperimentRequest} or an equivalent Hash. + # + # @param request [::Google::Ads::GoogleAds::V25::Services::PromoteExperimentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload promote_experiment(resource_name: nil, validate_only: nil) + # Pass arguments to `promote_experiment` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param resource_name [::String] + # Required. The resource name of the experiment to promote. + # @param validate_only [::Boolean] + # If true, the request is validated but not executed. Only errors are + # returned, not results. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [Google::Ads::GoogleAds::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/ads/google_ads/v25/services" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Ads::GoogleAds::V25::Services::ExperimentService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Ads::GoogleAds::V25::Services::PromoteExperimentRequest.new + # + # # Call the promote_experiment method. + # result = client.promote_experiment request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def promote_experiment request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::GoogleAds::V25::Services::PromoteExperimentRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.promote_experiment.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Ads::GoogleAds::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.resource_name + header_params["resource_name"] = request.resource_name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.promote_experiment.timeout, + metadata: metadata, + retry_policy: @config.rpcs.promote_experiment.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @experiment_service_stub.call_rpc :promote_experiment, request, + options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + # rescue GRPC::BadStatus => grpc_error + # raise Google::Ads::GoogleAds::Error.new grpc_error.message + end + + ## + # Configuration class for the ExperimentService API. + # + # This class represents the configuration for ExperimentService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Ads::GoogleAds::V25::Services::ExperimentService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # mutate_experiments to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Ads::GoogleAds::V25::Services::ExperimentService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.mutate_experiments.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Ads::GoogleAds::V25::Services::ExperimentService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.mutate_experiments.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Ads::GoogleAds::V25::Services::ExperimentService::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "googleads.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, + ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the ExperimentService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `mutate_experiments` + # @return [::Gapic::Config::Method] + # + attr_reader :mutate_experiments + ## + # RPC-specific configuration for `end_experiment` + # @return [::Gapic::Config::Method] + # + attr_reader :end_experiment + ## + # RPC-specific configuration for `list_experiment_async_errors` + # @return [::Gapic::Config::Method] + # + attr_reader :list_experiment_async_errors + ## + # RPC-specific configuration for `graduate_experiment` + # @return [::Gapic::Config::Method] + # + attr_reader :graduate_experiment + ## + # RPC-specific configuration for `schedule_experiment` + # @return [::Gapic::Config::Method] + # + attr_reader :schedule_experiment + ## + # RPC-specific configuration for `promote_experiment` + # @return [::Gapic::Config::Method] + # + attr_reader :promote_experiment + + # @private + def initialize parent_rpcs = nil + mutate_experiments_config = parent_rpcs.mutate_experiments if parent_rpcs.respond_to? :mutate_experiments + @mutate_experiments = ::Gapic::Config::Method.new mutate_experiments_config + end_experiment_config = parent_rpcs.end_experiment if parent_rpcs.respond_to? :end_experiment + @end_experiment = ::Gapic::Config::Method.new end_experiment_config + list_experiment_async_errors_config = parent_rpcs.list_experiment_async_errors if parent_rpcs.respond_to? :list_experiment_async_errors + @list_experiment_async_errors = ::Gapic::Config::Method.new list_experiment_async_errors_config + graduate_experiment_config = parent_rpcs.graduate_experiment if parent_rpcs.respond_to? :graduate_experiment + @graduate_experiment = ::Gapic::Config::Method.new graduate_experiment_config + schedule_experiment_config = parent_rpcs.schedule_experiment if parent_rpcs.respond_to? :schedule_experiment + @schedule_experiment = ::Gapic::Config::Method.new schedule_experiment_config + promote_experiment_config = parent_rpcs.promote_experiment if parent_rpcs.respond_to? :promote_experiment + @promote_experiment = ::Gapic::Config::Method.new promote_experiment_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/experiment_service/credentials.rb b/lib/google/ads/google_ads/v25/services/experiment_service/credentials.rb new file mode 100644 index 000000000..1687a4933 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/experiment_service/credentials.rb @@ -0,0 +1,38 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Ads + module GoogleAds + module V25 + module Services + module ExperimentService + # Credentials for the ExperimentService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/adwords" + ] + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/experiment_service/operations.rb b/lib/google/ads/google_ads/v25/services/experiment_service/operations.rb new file mode 100644 index 000000000..6a6642d95 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/experiment_service/operations.rb @@ -0,0 +1,855 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/operation" +require "google/longrunning/operations_pb" + +module Google + module Ads + module GoogleAds + module V25 + module Services + module ExperimentService + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "googleads.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the ExperimentService Operations API. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def self.configure + @configure ||= Operations::Configuration.new + yield @configure if block_given? + @configure + end + + ## + # Configure the ExperimentService Operations instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Operations.configure}. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @operations_stub.universe_domain + end + + ## + # Create a new Operations client object. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Operations::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/longrunning/operations_services_pb" + + # Create the configuration object + @config = Configuration.new Operations.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + credentials ||= Credentials.default scope: @config.scope + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_stub = ::Gapic::ServiceStub.new( + ::Google::Longrunning::Operations::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool + ) + + # Used by an LRO wrapper for some methods of this service + @operations_client = self + end + + # Service calls + + ## + # Lists operations that match the specified filter in the request. If the + # server doesn't support this method, it returns `UNIMPLEMENTED`. + # + # @overload list_operations(request, options = nil) + # Pass arguments to `list_operations` via a request object, either of type + # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::ListOperationsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_operations(name: nil, filter: nil, page_size: nil, page_token: nil, return_partial_success: nil) + # Pass arguments to `list_operations` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation's parent resource. + # @param filter [::String] + # The standard list filter. + # @param page_size [::Integer] + # The standard list page size. + # @param page_token [::String] + # The standard list page token. + # @param return_partial_success [::Boolean] + # When set to `true`, operations that are reachable are returned as normal, + # and those that are unreachable are returned in the + # [ListOperationsResponse.unreachable] field. + # + # This can only be `true` when reading across collections e.g. when `parent` + # is set to `"projects/example/locations/-"`. + # + # This field is not by default supported and will result in an + # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in + # service or product specific documentation. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Gapic::Operation>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Gapic::Operation>] + # + # @raise [Google::Ads::GoogleAds::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::ListOperationsRequest.new + # + # # Call the list_operations method. + # result = client.list_operations request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Longrunning::Operation. + # p item + # end + # + def list_operations request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_operations.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Ads::GoogleAds::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_operations.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_operations.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :list_operations, request, options: options do |response, operation| + wrap_lro_operation = ->(op_response) { ::Gapic::Operation.new op_response, @operations_client } + response = ::Gapic::PagedEnumerable.new @operations_stub, :list_operations, request, response, + operation, options, format_resource: wrap_lro_operation + yield response, operation if block_given? + throw :response, response + end + # rescue GRPC::BadStatus => grpc_error + # raise Google::Ads::GoogleAds::Error.new grpc_error.message + end + + ## + # 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. + # + # @overload get_operation(request, options = nil) + # Pass arguments to `get_operation` via a request object, either of type + # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::GetOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_operation(name: nil) + # Pass arguments to `get_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [Google::Ads::GoogleAds::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::GetOperationRequest.new + # + # # Call the get_operation method. + # result = client.get_operation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def get_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Ads::GoogleAds::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :get_operation, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + # rescue GRPC::BadStatus => grpc_error + # raise Google::Ads::GoogleAds::Error.new grpc_error.message + end + + ## + # 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`. + # + # @overload delete_operation(request, options = nil) + # Pass arguments to `delete_operation` via a request object, either of type + # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::DeleteOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_operation(name: nil) + # Pass arguments to `delete_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to be deleted. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [Google::Ads::GoogleAds::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::DeleteOperationRequest.new + # + # # Call the delete_operation method. + # result = client.delete_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Ads::GoogleAds::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :delete_operation, request, options: options do |response, operation| + yield response, operation if block_given? + end + # rescue GRPC::BadStatus => grpc_error + # raise Google::Ads::GoogleAds::Error.new grpc_error.message + end + + ## + # 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 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 {::Google::Longrunning::Operation#error Operation.error} value with a + # {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to + # `Code.CANCELLED`. + # + # @overload cancel_operation(request, options = nil) + # Pass arguments to `cancel_operation` via a request object, either of type + # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::CancelOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload cancel_operation(name: nil) + # Pass arguments to `cancel_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to be cancelled. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [Google::Ads::GoogleAds::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::CancelOperationRequest.new + # + # # Call the cancel_operation method. + # result = client.cancel_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def cancel_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.cancel_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Ads::GoogleAds::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.cancel_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :cancel_operation, request, options: options do |response, operation| + yield response, operation if block_given? + end + # rescue GRPC::BadStatus => grpc_error + # raise Google::Ads::GoogleAds::Error.new grpc_error.message + end + + ## + # Waits until the specified long-running operation 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. + # + # @overload wait_operation(request, options = nil) + # Pass arguments to `wait_operation` via a request object, either of type + # {::Google::Longrunning::WaitOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::WaitOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload wait_operation(name: nil, timeout: nil) + # Pass arguments to `wait_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to wait on. + # @param timeout [::Google::Protobuf::Duration, ::Hash] + # 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. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [Google::Ads::GoogleAds::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::WaitOperationRequest.new + # + # # Call the wait_operation method. + # result = client.wait_operation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def wait_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::WaitOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.wait_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Ads::GoogleAds::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.wait_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :wait_operation, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + # rescue GRPC::BadStatus => grpc_error + # raise Google::Ads::GoogleAds::Error.new grpc_error.message + end + + ## + # Configuration class for the Operations API. + # + # This class represents the configuration for Operations, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Longrunning::Operations::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_operations to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Longrunning::Operations::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Longrunning::Operations::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Longrunning::Operations::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "googleads.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, + ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the Operations API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_operations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_operations + ## + # RPC-specific configuration for `get_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :get_operation + ## + # RPC-specific configuration for `delete_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_operation + ## + # RPC-specific configuration for `cancel_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :cancel_operation + ## + # RPC-specific configuration for `wait_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :wait_operation + + # @private + def initialize parent_rpcs = nil + list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations + @list_operations = ::Gapic::Config::Method.new list_operations_config + get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation + @get_operation = ::Gapic::Config::Method.new get_operation_config + delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation + @delete_operation = ::Gapic::Config::Method.new delete_operation_config + cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation + @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config + wait_operation_config = parent_rpcs.wait_operation if parent_rpcs.respond_to? :wait_operation + @wait_operation = ::Gapic::Config::Method.new wait_operation_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/experiment_service/paths.rb b/lib/google/ads/google_ads/v25/services/experiment_service/paths.rb new file mode 100644 index 000000000..7b72521b6 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/experiment_service/paths.rb @@ -0,0 +1,86 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Ads + module GoogleAds + module V25 + module Services + module ExperimentService + # Path helper methods for the ExperimentService API. + module Paths + ## + # Create a fully-qualified Campaign resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/campaigns/{campaign_id}` + # + # @param customer_id [String] + # @param campaign_id [String] + # + # @return [::String] + def campaign_path customer_id:, campaign_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/campaigns/#{campaign_id}" + end + + ## + # Create a fully-qualified CampaignBudget resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/campaignBudgets/{campaign_budget_id}` + # + # @param customer_id [String] + # @param campaign_budget_id [String] + # + # @return [::String] + def campaign_budget_path customer_id:, campaign_budget_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/campaignBudgets/#{campaign_budget_id}" + end + + ## + # Create a fully-qualified Experiment resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/experiments/{trial_id}` + # + # @param customer_id [String] + # @param trial_id [String] + # + # @return [::String] + def experiment_path customer_id:, trial_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/experiments/#{trial_id}" + end + + extend self + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/experiment_service_pb.rb b/lib/google/ads/google_ads/v25/services/experiment_service_pb.rb new file mode 100644 index 000000000..f6f8fe989 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/experiment_service_pb.rb @@ -0,0 +1,45 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/services/experiment_service.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/resources/experiment_pb' +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/longrunning/operations_pb' +require 'google/protobuf/empty_pb' +require 'google/protobuf/field_mask_pb' +require 'google/rpc/status_pb' + + +descriptor_data = "\n:google/ads/googleads/v25/services/experiment_service.proto\x12!google.ads.googleads.v25.services\x1a\x33google/ads/googleads/v25/resources/experiment.proto\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x17google/rpc/status.proto\"\xb5\x01\n\x18MutateExperimentsRequest\x12\x18\n\x0b\x63ustomer_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12O\n\noperations\x18\x02 \x03(\x0b\x32\x36.google.ads.googleads.v25.services.ExperimentOperationB\x03\xe0\x41\x02\x12\x17\n\x0fpartial_failure\x18\x03 \x01(\x08\x12\x15\n\rvalidate_only\x18\x04 \x01(\x08\"\x93\x02\n\x13\x45xperimentOperation\x12/\n\x0bupdate_mask\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\x12@\n\x06\x63reate\x18\x01 \x01(\x0b\x32..google.ads.googleads.v25.resources.ExperimentH\x00\x12@\n\x06update\x18\x02 \x01(\x0b\x32..google.ads.googleads.v25.resources.ExperimentH\x00\x12:\n\x06remove\x18\x03 \x01(\tB(\xfa\x41%\n#googleads.googleapis.com/ExperimentH\x00\x42\x0b\n\toperation\"\x9a\x01\n\x19MutateExperimentsResponse\x12\x31\n\x15partial_failure_error\x18\x01 \x01(\x0b\x32\x12.google.rpc.Status\x12J\n\x07results\x18\x02 \x03(\x0b\x32\x39.google.ads.googleads.v25.services.MutateExperimentResult\"Y\n\x16MutateExperimentResult\x12?\n\rresource_name\x18\x01 \x01(\tB(\xfa\x41%\n#googleads.googleapis.com/Experiment\"n\n\x14\x45ndExperimentRequest\x12?\n\nexperiment\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#googleads.googleapis.com/Experiment\x12\x15\n\rvalidate_only\x18\x02 \x01(\x08\"\x8d\x01\n ListExperimentAsyncErrorsRequest\x12\x42\n\rresource_name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#googleads.googleapis.com/Experiment\x12\x12\n\npage_token\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x03 \x01(\x05\"`\n!ListExperimentAsyncErrorsResponse\x12\"\n\x06\x65rrors\x18\x01 \x03(\x0b\x32\x12.google.rpc.Status\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xd4\x01\n\x19GraduateExperimentRequest\x12?\n\nexperiment\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#googleads.googleapis.com/Experiment\x12_\n\x18\x63\x61mpaign_budget_mappings\x18\x02 \x03(\x0b\x32\x38.google.ads.googleads.v25.services.CampaignBudgetMappingB\x03\xe0\x41\x02\x12\x15\n\rvalidate_only\x18\x03 \x01(\x08\"\xa9\x01\n\x15\x43\x61mpaignBudgetMapping\x12\x46\n\x13\x65xperiment_campaign\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!googleads.googleapis.com/Campaign\x12H\n\x0f\x63\x61mpaign_budget\x18\x02 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'googleads.googleapis.com/CampaignBudget\"v\n\x19ScheduleExperimentRequest\x12\x42\n\rresource_name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#googleads.googleapis.com/Experiment\x12\x15\n\rvalidate_only\x18\x02 \x01(\x08\"]\n\x1aScheduleExperimentMetadata\x12?\n\nexperiment\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#googleads.googleapis.com/Experiment\"u\n\x18PromoteExperimentRequest\x12\x42\n\rresource_name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#googleads.googleapis.com/Experiment\x12\x15\n\rvalidate_only\x18\x02 \x01(\x08\"\\\n\x19PromoteExperimentMetadata\x12?\n\nexperiment\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#googleads.googleapis.com/Experiment2\xb3\x0c\n\x11\x45xperimentService\x12\xe5\x01\n\x11MutateExperiments\x12;.google.ads.googleads.v25.services.MutateExperimentsRequest\x1a<.google.ads.googleads.v25.services.MutateExperimentsResponse\"U\xda\x41\x16\x63ustomer_id,operations\x82\xd3\xe4\x93\x02\x36\"1/v25/customers/{customer_id=*}/experiments:mutate:\x01*\x12\xb3\x01\n\rEndExperiment\x12\x37.google.ads.googleads.v25.services.EndExperimentRequest\x1a\x16.google.protobuf.Empty\"Q\xda\x41\nexperiment\x82\xd3\xe4\x93\x02>\"9/v25/{experiment=customers/*/experiments/*}:endExperiment:\x01*\x12\x88\x02\n\x19ListExperimentAsyncErrors\x12\x43.google.ads.googleads.v25.services.ListExperimentAsyncErrorsRequest\x1a\x44.google.ads.googleads.v25.services.ListExperimentAsyncErrorsResponse\"`\xda\x41\rresource_name\x82\xd3\xe4\x93\x02J\x12H/v25/{resource_name=customers/*/experiments/*}:listExperimentAsyncErrors\x12\xdb\x01\n\x12GraduateExperiment\x12<.google.ads.googleads.v25.services.GraduateExperimentRequest\x1a\x16.google.protobuf.Empty\"o\xda\x41#experiment,campaign_budget_mappings\x82\xd3\xe4\x93\x02\x43\">/v25/{experiment=customers/*/experiments/*}:graduateExperiment:\x01*\x12\xa8\x02\n\x12ScheduleExperiment\x12<.google.ads.googleads.v25.services.ScheduleExperimentRequest\x1a\x1d.google.longrunning.Operation\"\xb4\x01\xca\x41U\n\x15google.protobuf.Empty\x12 grpc_error + # raise Google::Ads::GoogleAds::Error.new grpc_error.message + end + + ## + # Configuration class for the GeoTargetConstantService API. + # + # This class represents the configuration for GeoTargetConstantService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Ads::GoogleAds::V25::Services::GeoTargetConstantService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # suggest_geo_target_constants to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Ads::GoogleAds::V25::Services::GeoTargetConstantService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.suggest_geo_target_constants.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Ads::GoogleAds::V25::Services::GeoTargetConstantService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.suggest_geo_target_constants.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Ads::GoogleAds::V25::Services::GeoTargetConstantService::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "googleads.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, + ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the GeoTargetConstantService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `suggest_geo_target_constants` + # @return [::Gapic::Config::Method] + # + attr_reader :suggest_geo_target_constants + + # @private + def initialize parent_rpcs = nil + suggest_geo_target_constants_config = parent_rpcs.suggest_geo_target_constants if parent_rpcs.respond_to? :suggest_geo_target_constants + @suggest_geo_target_constants = ::Gapic::Config::Method.new suggest_geo_target_constants_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/geo_target_constant_service/credentials.rb b/lib/google/ads/google_ads/v25/services/geo_target_constant_service/credentials.rb new file mode 100644 index 000000000..d49792533 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/geo_target_constant_service/credentials.rb @@ -0,0 +1,38 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Ads + module GoogleAds + module V25 + module Services + module GeoTargetConstantService + # Credentials for the GeoTargetConstantService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/adwords" + ] + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/geo_target_constant_service/paths.rb b/lib/google/ads/google_ads/v25/services/geo_target_constant_service/paths.rb new file mode 100644 index 000000000..00a870724 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/geo_target_constant_service/paths.rb @@ -0,0 +1,49 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Ads + module GoogleAds + module V25 + module Services + module GeoTargetConstantService + # Path helper methods for the GeoTargetConstantService API. + module Paths + ## + # Create a fully-qualified GeoTargetConstant resource string. + # + # The resource will be in the following format: + # + # `geoTargetConstants/{criterion_id}` + # + # @param criterion_id [String] + # + # @return [::String] + def geo_target_constant_path criterion_id: + "geoTargetConstants/#{criterion_id}" + end + + extend self + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/geo_target_constant_service_pb.rb b/lib/google/ads/google_ads/v25/services/geo_target_constant_service_pb.rb new file mode 100644 index 000000000..7164715e3 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/geo_target_constant_service_pb.rb @@ -0,0 +1,31 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/services/geo_target_constant_service.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/resources/geo_target_constant_pb' +require 'google/api/annotations_pb' +require 'google/api/client_pb' + + +descriptor_data = "\nCgoogle/ads/googleads/v25/services/geo_target_constant_service.proto\x12!google.ads.googleads.v25.services\x1a.google.ads.googleads.v25.services.GeoTargetConstantSuggestion\"\xb5\x02\n\x1bGeoTargetConstantSuggestion\x12\x13\n\x06locale\x18\x06 \x01(\tH\x00\x88\x01\x01\x12\x12\n\x05reach\x18\x07 \x01(\x03H\x01\x88\x01\x01\x12\x18\n\x0bsearch_term\x18\x08 \x01(\tH\x02\x88\x01\x01\x12R\n\x13geo_target_constant\x18\x04 \x01(\x0b\x32\x35.google.ads.googleads.v25.resources.GeoTargetConstant\x12Z\n\x1bgeo_target_constant_parents\x18\x05 \x03(\x0b\x32\x35.google.ads.googleads.v25.resources.GeoTargetConstantB\t\n\x07_localeB\x08\n\x06_reachB\x0e\n\x0c_search_term2\xb6\x02\n\x18GeoTargetConstantService\x12\xd2\x01\n\x19SuggestGeoTargetConstants\x12\x43.google.ads.googleads.v25.services.SuggestGeoTargetConstantsRequest\x1a\x44.google.ads.googleads.v25.services.SuggestGeoTargetConstantsResponse\"*\x82\xd3\xe4\x93\x02$\"\x1f/v25/geoTargetConstants:suggest:\x01*\x1a\x45\xca\x41\x18googleads.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/adwordsB\x89\x02\n%com.google.ads.googleads.v25.servicesB\x1dGeoTargetConstantServiceProtoP\x01ZIgoogle.golang.org/genproto/googleapis/ads/googleads/v25/services;services\xa2\x02\x03GAA\xaa\x02!Google.Ads.GoogleAds.V25.Services\xca\x02!Google\\Ads\\GoogleAds\\V25\\Services\xea\x02%Google::Ads::GoogleAds::V25::Servicesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Services + SuggestGeoTargetConstantsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.SuggestGeoTargetConstantsRequest").msgclass + SuggestGeoTargetConstantsRequest::LocationNames = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.SuggestGeoTargetConstantsRequest.LocationNames").msgclass + SuggestGeoTargetConstantsRequest::GeoTargets = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.SuggestGeoTargetConstantsRequest.GeoTargets").msgclass + SuggestGeoTargetConstantsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.SuggestGeoTargetConstantsResponse").msgclass + GeoTargetConstantSuggestion = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.GeoTargetConstantSuggestion").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/geo_target_constant_service_services_pb.rb b/lib/google/ads/google_ads/v25/services/geo_target_constant_service_services_pb.rb new file mode 100644 index 000000000..92ff354ae --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/geo_target_constant_service_services_pb.rb @@ -0,0 +1,58 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/ads/googleads/v25/services/geo_target_constant_service.proto for package 'Google.Ads.GoogleAds.V25.Services' +# Original file comments: +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +require 'grpc' +require 'google/ads/google_ads/v25/services/geo_target_constant_service_pb' + +module Google + module Ads + module GoogleAds + module V25 + module Services + module GeoTargetConstantService + # Proto file describing the Geo target constant service. + # + # Service to fetch geo target constants. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.ads.googleads.v25.services.GeoTargetConstantService' + + # Returns GeoTargetConstant suggestions by location name or by resource name. + # + # List of thrown errors: + # [AuthenticationError]() + # [AuthorizationError]() + # [GeoTargetConstantSuggestionError]() + # [HeaderError]() + # [InternalError]() + # [QuotaError]() + # [RequestError]() + rpc :SuggestGeoTargetConstants, ::Google::Ads::GoogleAds::V25::Services::SuggestGeoTargetConstantsRequest, ::Google::Ads::GoogleAds::V25::Services::SuggestGeoTargetConstantsResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/goal_service.rb b/lib/google/ads/google_ads/v25/services/goal_service.rb new file mode 100644 index 000000000..03ba38837 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/goal_service.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/ads/google_ads/version" + +require "google/ads/google_ads/v25/services/goal_service/credentials" +require "google/ads/google_ads/v25/services/goal_service/paths" +require "google/ads/google_ads/v25/services/goal_service/client" + +module Google + module Ads + module GoogleAds + module V25 + module Services + ## + # Service to manage goals. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/ads/google_ads/v25/services/goal_service" + # client = ::Google::Ads::GoogleAds::V25::Services::GoalService::Client.new + # + module GoalService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "goal_service", "helpers.rb" +require "google/ads/google_ads/v25/services/goal_service/helpers" if ::File.file? helper_path diff --git a/lib/google/ads/google_ads/v25/services/goal_service/client.rb b/lib/google/ads/google_ads/v25/services/goal_service/client.rb new file mode 100644 index 000000000..046d27b0f --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/goal_service/client.rb @@ -0,0 +1,496 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# require "google/ads/google_ads/error" +require "google/ads/google_ads/v25/services/goal_service_pb" + +module Google + module Ads + module GoogleAds + module V25 + module Services + module GoalService + ## + # Client for the GoalService service. + # + # Service to manage goals. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "googleads.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :goal_service_stub + + ## + # Configure the GoalService Client class. + # + # See {::Google::Ads::GoogleAds::V25::Services::GoalService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all GoalService clients + # ::Google::Ads::GoogleAds::V25::Services::GoalService::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + default_config = Client::Configuration.new + + default_config.timeout = 14_400.0 + default_config.retry_policy = { + initial_delay: 5.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the GoalService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Ads::GoogleAds::V25::Services::GoalService::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @goal_service_stub.universe_domain + end + + ## + # Create a new GoalService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Ads::GoogleAds::V25::Services::GoalService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Ads::GoogleAds::V25::Services::GoalService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the GoalService client. + # @yieldparam config [Client::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/ads/google_ads/v25/services/goal_service_services_pb" + + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @goal_service_stub = ::Gapic::ServiceStub.new( + ::Google::Ads::GoogleAds::V25::Services::GoalService::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool, + logger: @config.logger + ) + + @goal_service_stub.stub_logger&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @goal_service_stub.logger + end + + # Service calls + + ## + # Create or update goals. + # + # List of thrown errors: + # [AuthenticationError]() + # [AuthorizationError]() + # [HeaderError]() + # [InternalError]() + # [QuotaError]() + # [RequestError]() + # [GoalError]() + # + # @overload mutate_goals(request, options = nil) + # Pass arguments to `mutate_goals` via a request object, either of type + # {::Google::Ads::GoogleAds::V25::Services::MutateGoalsRequest} or an equivalent Hash. + # + # @param request [::Google::Ads::GoogleAds::V25::Services::MutateGoalsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload mutate_goals(customer_id: nil, operations: nil, partial_failure: nil, validate_only: nil) + # Pass arguments to `mutate_goals` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param customer_id [::String] + # Required. The ID of the customer whose goals are being modified. + # @param operations [::Array<::Google::Ads::GoogleAds::V25::Services::GoalOperation, ::Hash>] + # Required. The list of operations to perform on the goals. + # @param partial_failure [::Boolean] + # Optional. 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. + # @param validate_only [::Boolean] + # Optional. If true, the request is validated but not executed. Only errors + # are returned, not results. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Ads::GoogleAds::V25::Services::MutateGoalsResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Ads::GoogleAds::V25::Services::MutateGoalsResponse] + # + # @raise [Google::Ads::GoogleAds::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/ads/google_ads/v25/services" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Ads::GoogleAds::V25::Services::GoalService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Ads::GoogleAds::V25::Services::MutateGoalsRequest.new + # + # # Call the mutate_goals method. + # result = client.mutate_goals request + # + # # The returned object is of type Google::Ads::GoogleAds::V25::Services::MutateGoalsResponse. + # p result + # + def mutate_goals request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::GoogleAds::V25::Services::MutateGoalsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.mutate_goals.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Ads::GoogleAds::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.customer_id + header_params["customer_id"] = request.customer_id + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.mutate_goals.timeout, + metadata: metadata, + retry_policy: @config.rpcs.mutate_goals.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @goal_service_stub.call_rpc :mutate_goals, request, options: options do |response, operation| + yield response, operation if block_given? + end + # rescue GRPC::BadStatus => grpc_error + # raise Google::Ads::GoogleAds::Error.new grpc_error.message + end + + ## + # Configuration class for the GoalService API. + # + # This class represents the configuration for GoalService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Ads::GoogleAds::V25::Services::GoalService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # mutate_goals to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Ads::GoogleAds::V25::Services::GoalService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.mutate_goals.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Ads::GoogleAds::V25::Services::GoalService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.mutate_goals.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Ads::GoogleAds::V25::Services::GoalService::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "googleads.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, + ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the GoalService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `mutate_goals` + # @return [::Gapic::Config::Method] + # + attr_reader :mutate_goals + + # @private + def initialize parent_rpcs = nil + mutate_goals_config = parent_rpcs.mutate_goals if parent_rpcs.respond_to? :mutate_goals + @mutate_goals = ::Gapic::Config::Method.new mutate_goals_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/goal_service/credentials.rb b/lib/google/ads/google_ads/v25/services/goal_service/credentials.rb new file mode 100644 index 000000000..c03bbe641 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/goal_service/credentials.rb @@ -0,0 +1,38 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Ads + module GoogleAds + module V25 + module Services + module GoalService + # Credentials for the GoalService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/adwords" + ] + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/goal_service/paths.rb b/lib/google/ads/google_ads/v25/services/goal_service/paths.rb new file mode 100644 index 000000000..14cee49f3 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/goal_service/paths.rb @@ -0,0 +1,66 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Ads + module GoogleAds + module V25 + module Services + module GoalService + # Path helper methods for the GoalService API. + module Paths + ## + # Create a fully-qualified Customer resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}` + # + # @param customer_id [String] + # + # @return [::String] + def customer_path customer_id: + "customers/#{customer_id}" + end + + ## + # Create a fully-qualified Goal resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/goals/{unified_goal_id}` + # + # @param customer_id [String] + # @param unified_goal_id [String] + # + # @return [::String] + def goal_path customer_id:, unified_goal_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/goals/#{unified_goal_id}" + end + + extend self + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/goal_service_pb.rb b/lib/google/ads/google_ads/v25/services/goal_service_pb.rb new file mode 100644 index 000000000..e7b8357b1 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/goal_service_pb.rb @@ -0,0 +1,34 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/services/goal_service.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/resources/goal_pb' +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/field_mask_pb' +require 'google/rpc/status_pb' + + +descriptor_data = "\n4google/ads/googleads/v25/services/goal_service.proto\x12!google.ads.googleads.v25.services\x1a-google/ads/googleads/v25/resources/goal.proto\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\x1a\x17google/rpc/status.proto\"\xb3\x01\n\x12MutateGoalsRequest\x12\x18\n\x0b\x63ustomer_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12I\n\noperations\x18\x02 \x03(\x0b\x32\x30.google.ads.googleads.v25.services.GoalOperationB\x03\xe0\x41\x02\x12\x1c\n\x0fpartial_failure\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\x12\x1a\n\rvalidate_only\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"\xc5\x01\n\rGoalOperation\x12/\n\x0bupdate_mask\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\x12:\n\x06\x63reate\x18\x01 \x01(\x0b\x32(.google.ads.googleads.v25.resources.GoalH\x00\x12:\n\x06update\x18\x02 \x01(\x0b\x32(.google.ads.googleads.v25.resources.GoalH\x00\x42\x0b\n\toperation\"\x8e\x01\n\x13MutateGoalsResponse\x12\x31\n\x15partial_failure_error\x18\x01 \x01(\x0b\x32\x12.google.rpc.Status\x12\x44\n\x07results\x18\x02 \x03(\x0b\x32\x33.google.ads.googleads.v25.services.MutateGoalResult\"M\n\x10MutateGoalResult\x12\x39\n\rresource_name\x18\x01 \x01(\tB\"\xfa\x41\x1f\n\x1dgoogleads.googleapis.com/Goal2\xa4\x02\n\x0bGoalService\x12\xcd\x01\n\x0bMutateGoals\x12\x35.google.ads.googleads.v25.services.MutateGoalsRequest\x1a\x36.google.ads.googleads.v25.services.MutateGoalsResponse\"O\xda\x41\x16\x63ustomer_id,operations\x82\xd3\xe4\x93\x02\x30\"+/v25/customers/{customer_id=*}/Goals:mutate:\x01*\x1a\x45\xca\x41\x18googleads.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/adwordsB\xfc\x01\n%com.google.ads.googleads.v25.servicesB\x10GoalServiceProtoP\x01ZIgoogle.golang.org/genproto/googleapis/ads/googleads/v25/services;services\xa2\x02\x03GAA\xaa\x02!Google.Ads.GoogleAds.V25.Services\xca\x02!Google\\Ads\\GoogleAds\\V25\\Services\xea\x02%Google::Ads::GoogleAds::V25::Servicesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Services + MutateGoalsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.MutateGoalsRequest").msgclass + GoalOperation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.GoalOperation").msgclass + MutateGoalsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.MutateGoalsResponse").msgclass + MutateGoalResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.MutateGoalResult").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/goal_service_services_pb.rb b/lib/google/ads/google_ads/v25/services/goal_service_services_pb.rb new file mode 100644 index 000000000..216370608 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/goal_service_services_pb.rb @@ -0,0 +1,58 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/ads/googleads/v25/services/goal_service.proto for package 'Google.Ads.GoogleAds.V25.Services' +# Original file comments: +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +require 'grpc' +require 'google/ads/google_ads/v25/services/goal_service_pb' + +module Google + module Ads + module GoogleAds + module V25 + module Services + module GoalService + # Proto file describing the Goal service. + # + # Service to manage goals. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.ads.googleads.v25.services.GoalService' + + # Create or update goals. + # + # List of thrown errors: + # [AuthenticationError]() + # [AuthorizationError]() + # [HeaderError]() + # [InternalError]() + # [QuotaError]() + # [RequestError]() + # [GoalError]() + rpc :MutateGoals, ::Google::Ads::GoogleAds::V25::Services::MutateGoalsRequest, ::Google::Ads::GoogleAds::V25::Services::MutateGoalsResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/google_ads_field_service.rb b/lib/google/ads/google_ads/v25/services/google_ads_field_service.rb new file mode 100644 index 000000000..3d1302b2e --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/google_ads_field_service.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/ads/google_ads/version" + +require "google/ads/google_ads/v25/services/google_ads_field_service/credentials" +require "google/ads/google_ads/v25/services/google_ads_field_service/paths" +require "google/ads/google_ads/v25/services/google_ads_field_service/client" + +module Google + module Ads + module GoogleAds + module V25 + module Services + ## + # Service to fetch Google Ads API fields. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/ads/google_ads/v25/services/google_ads_field_service" + # client = ::Google::Ads::GoogleAds::V25::Services::GoogleAdsFieldService::Client.new + # + module GoogleAdsFieldService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "google_ads_field_service", "helpers.rb" +require "google/ads/google_ads/v25/services/google_ads_field_service/helpers" if ::File.file? helper_path diff --git a/lib/google/ads/google_ads/v25/services/google_ads_field_service/client.rb b/lib/google/ads/google_ads/v25/services/google_ads_field_service/client.rb new file mode 100644 index 000000000..42a963827 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/google_ads_field_service/client.rb @@ -0,0 +1,595 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# require "google/ads/google_ads/error" +require "google/ads/google_ads/v25/services/google_ads_field_service_pb" + +module Google + module Ads + module GoogleAds + module V25 + module Services + module GoogleAdsFieldService + ## + # Client for the GoogleAdsFieldService service. + # + # Service to fetch Google Ads API fields. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "googleads.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :google_ads_field_service_stub + + ## + # Configure the GoogleAdsFieldService Client class. + # + # See {::Google::Ads::GoogleAds::V25::Services::GoogleAdsFieldService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all GoogleAdsFieldService clients + # ::Google::Ads::GoogleAds::V25::Services::GoogleAdsFieldService::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + default_config = Client::Configuration.new + + default_config.timeout = 14_400.0 + default_config.retry_policy = { + initial_delay: 5.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the GoogleAdsFieldService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Ads::GoogleAds::V25::Services::GoogleAdsFieldService::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @google_ads_field_service_stub.universe_domain + end + + ## + # Create a new GoogleAdsFieldService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Ads::GoogleAds::V25::Services::GoogleAdsFieldService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Ads::GoogleAds::V25::Services::GoogleAdsFieldService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the GoogleAdsFieldService client. + # @yieldparam config [Client::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/ads/google_ads/v25/services/google_ads_field_service_services_pb" + + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @google_ads_field_service_stub = ::Gapic::ServiceStub.new( + ::Google::Ads::GoogleAds::V25::Services::GoogleAdsFieldService::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool, + logger: @config.logger + ) + + @google_ads_field_service_stub.stub_logger&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @google_ads_field_service_stub.logger + end + + # Service calls + + ## + # Returns just the requested field. + # + # List of thrown errors: + # [AuthenticationError]() + # [AuthorizationError]() + # [HeaderError]() + # [InternalError]() + # [QuotaError]() + # [RequestError]() + # + # @overload get_google_ads_field(request, options = nil) + # Pass arguments to `get_google_ads_field` via a request object, either of type + # {::Google::Ads::GoogleAds::V25::Services::GetGoogleAdsFieldRequest} or an equivalent Hash. + # + # @param request [::Google::Ads::GoogleAds::V25::Services::GetGoogleAdsFieldRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_google_ads_field(resource_name: nil) + # Pass arguments to `get_google_ads_field` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param resource_name [::String] + # Required. The resource name of the field to get. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Ads::GoogleAds::V25::Resources::GoogleAdsField] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Ads::GoogleAds::V25::Resources::GoogleAdsField] + # + # @raise [Google::Ads::GoogleAds::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/ads/google_ads/v25/services" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Ads::GoogleAds::V25::Services::GoogleAdsFieldService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Ads::GoogleAds::V25::Services::GetGoogleAdsFieldRequest.new + # + # # Call the get_google_ads_field method. + # result = client.get_google_ads_field request + # + # # The returned object is of type Google::Ads::GoogleAds::V25::Resources::GoogleAdsField. + # p result + # + def get_google_ads_field request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::GoogleAds::V25::Services::GetGoogleAdsFieldRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_google_ads_field.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Ads::GoogleAds::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.resource_name + header_params["resource_name"] = request.resource_name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_google_ads_field.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_google_ads_field.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @google_ads_field_service_stub.call_rpc :get_google_ads_field, request, + options: options do |response, operation| + yield response, operation if block_given? + end + # rescue GRPC::BadStatus => grpc_error + # raise Google::Ads::GoogleAds::Error.new grpc_error.message + end + + ## + # Returns all fields that match the search query. + # + # List of thrown errors: + # [AuthenticationError]() + # [AuthorizationError]() + # [HeaderError]() + # [InternalError]() + # [QueryError]() + # [QuotaError]() + # [RequestError]() + # + # @overload search_google_ads_fields(request, options = nil) + # Pass arguments to `search_google_ads_fields` via a request object, either of type + # {::Google::Ads::GoogleAds::V25::Services::SearchGoogleAdsFieldsRequest} or an equivalent Hash. + # + # @param request [::Google::Ads::GoogleAds::V25::Services::SearchGoogleAdsFieldsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload search_google_ads_fields(query: nil, page_token: nil, page_size: nil) + # Pass arguments to `search_google_ads_fields` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param query [::String] + # Required. The query string. + # @param page_token [::String] + # 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. + # @param page_size [::Integer] + # 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. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Ads::GoogleAds::V25::Resources::GoogleAdsField>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Ads::GoogleAds::V25::Resources::GoogleAdsField>] + # + # @raise [Google::Ads::GoogleAds::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/ads/google_ads/v25/services" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Ads::GoogleAds::V25::Services::GoogleAdsFieldService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Ads::GoogleAds::V25::Services::SearchGoogleAdsFieldsRequest.new + # + # # Call the search_google_ads_fields method. + # result = client.search_google_ads_fields request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Ads::GoogleAds::V25::Resources::GoogleAdsField. + # p item + # end + # + def search_google_ads_fields request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::GoogleAds::V25::Services::SearchGoogleAdsFieldsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.search_google_ads_fields.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Ads::GoogleAds::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.search_google_ads_fields.timeout, + metadata: metadata, + retry_policy: @config.rpcs.search_google_ads_fields.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @google_ads_field_service_stub.call_rpc :search_google_ads_fields, request, + options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @google_ads_field_service_stub, :search_google_ads_fields, + request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + # rescue GRPC::BadStatus => grpc_error + # raise Google::Ads::GoogleAds::Error.new grpc_error.message + end + + ## + # Configuration class for the GoogleAdsFieldService API. + # + # This class represents the configuration for GoogleAdsFieldService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Ads::GoogleAds::V25::Services::GoogleAdsFieldService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # get_google_ads_field to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Ads::GoogleAds::V25::Services::GoogleAdsFieldService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_google_ads_field.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Ads::GoogleAds::V25::Services::GoogleAdsFieldService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_google_ads_field.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Ads::GoogleAds::V25::Services::GoogleAdsFieldService::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "googleads.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, + ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the GoogleAdsFieldService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `get_google_ads_field` + # @return [::Gapic::Config::Method] + # + attr_reader :get_google_ads_field + ## + # RPC-specific configuration for `search_google_ads_fields` + # @return [::Gapic::Config::Method] + # + attr_reader :search_google_ads_fields + + # @private + def initialize parent_rpcs = nil + get_google_ads_field_config = parent_rpcs.get_google_ads_field if parent_rpcs.respond_to? :get_google_ads_field + @get_google_ads_field = ::Gapic::Config::Method.new get_google_ads_field_config + search_google_ads_fields_config = parent_rpcs.search_google_ads_fields if parent_rpcs.respond_to? :search_google_ads_fields + @search_google_ads_fields = ::Gapic::Config::Method.new search_google_ads_fields_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/google_ads_field_service/credentials.rb b/lib/google/ads/google_ads/v25/services/google_ads_field_service/credentials.rb new file mode 100644 index 000000000..dc4c0153a --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/google_ads_field_service/credentials.rb @@ -0,0 +1,38 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Ads + module GoogleAds + module V25 + module Services + module GoogleAdsFieldService + # Credentials for the GoogleAdsFieldService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/adwords" + ] + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/google_ads_field_service/paths.rb b/lib/google/ads/google_ads/v25/services/google_ads_field_service/paths.rb new file mode 100644 index 000000000..bc788accc --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/google_ads_field_service/paths.rb @@ -0,0 +1,49 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Ads + module GoogleAds + module V25 + module Services + module GoogleAdsFieldService + # Path helper methods for the GoogleAdsFieldService API. + module Paths + ## + # Create a fully-qualified GoogleAdsField resource string. + # + # The resource will be in the following format: + # + # `googleAdsFields/{google_ads_field}` + # + # @param google_ads_field [String] + # + # @return [::String] + def google_ads_field_path google_ads_field: + "googleAdsFields/#{google_ads_field}" + end + + extend self + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/google_ads_field_service_pb.rb b/lib/google/ads/google_ads/v25/services/google_ads_field_service_pb.rb new file mode 100644 index 000000000..fce8bc18a --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/google_ads_field_service_pb.rb @@ -0,0 +1,31 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/services/google_ads_field_service.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/resources/google_ads_field_pb' +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' + + +descriptor_data = "\n@google/ads/googleads/v25/services/google_ads_field_service.proto\x12!google.ads.googleads.v25.services\x1a\x39google/ads/googleads/v25/resources/google_ads_field.proto\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"b\n\x18GetGoogleAdsFieldRequest\x12\x46\n\rresource_name\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'googleads.googleapis.com/GoogleAdsField\"Y\n\x1cSearchGoogleAdsFieldsRequest\x12\x12\n\x05query\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x12\n\npage_token\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x03 \x01(\x05\"\x9a\x01\n\x1dSearchGoogleAdsFieldsResponse\x12\x43\n\x07results\x18\x01 \x03(\x0b\x32\x32.google.ads.googleads.v25.resources.GoogleAdsField\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x1b\n\x13total_results_count\x18\x03 \x01(\x03\x32\xf2\x03\n\x15GoogleAdsFieldService\x12\xc4\x01\n\x11GetGoogleAdsField\x12;.google.ads.googleads.v25.services.GetGoogleAdsFieldRequest\x1a\x32.google.ads.googleads.v25.resources.GoogleAdsField\">\xda\x41\rresource_name\x82\xd3\xe4\x93\x02(\x12&/v25/{resource_name=googleAdsFields/*}\x12\xca\x01\n\x15SearchGoogleAdsFields\x12?.google.ads.googleads.v25.services.SearchGoogleAdsFieldsRequest\x1a@.google.ads.googleads.v25.services.SearchGoogleAdsFieldsResponse\".\xda\x41\x05query\x82\xd3\xe4\x93\x02 \"\x1b/v25/googleAdsFields:search:\x01*\x1a\x45\xca\x41\x18googleads.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/adwordsB\x86\x02\n%com.google.ads.googleads.v25.servicesB\x1aGoogleAdsFieldServiceProtoP\x01ZIgoogle.golang.org/genproto/googleapis/ads/googleads/v25/services;services\xa2\x02\x03GAA\xaa\x02!Google.Ads.GoogleAds.V25.Services\xca\x02!Google\\Ads\\GoogleAds\\V25\\Services\xea\x02%Google::Ads::GoogleAds::V25::Servicesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Services + GetGoogleAdsFieldRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.GetGoogleAdsFieldRequest").msgclass + SearchGoogleAdsFieldsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.SearchGoogleAdsFieldsRequest").msgclass + SearchGoogleAdsFieldsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.SearchGoogleAdsFieldsResponse").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/google_ads_field_service_services_pb.rb b/lib/google/ads/google_ads/v25/services/google_ads_field_service_services_pb.rb new file mode 100644 index 000000000..02267edcd --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/google_ads_field_service_services_pb.rb @@ -0,0 +1,68 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/ads/googleads/v25/services/google_ads_field_service.proto for package 'Google.Ads.GoogleAds.V25.Services' +# Original file comments: +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +require 'grpc' +require 'google/ads/google_ads/v25/services/google_ads_field_service_pb' + +module Google + module Ads + module GoogleAds + module V25 + module Services + module GoogleAdsFieldService + # Proto file describing the GoogleAdsFieldService. + # + # Service to fetch Google Ads API fields. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.ads.googleads.v25.services.GoogleAdsFieldService' + + # Returns just the requested field. + # + # List of thrown errors: + # [AuthenticationError]() + # [AuthorizationError]() + # [HeaderError]() + # [InternalError]() + # [QuotaError]() + # [RequestError]() + rpc :GetGoogleAdsField, ::Google::Ads::GoogleAds::V25::Services::GetGoogleAdsFieldRequest, ::Google::Ads::GoogleAds::V25::Resources::GoogleAdsField + # Returns all fields that match the search query. + # + # List of thrown errors: + # [AuthenticationError]() + # [AuthorizationError]() + # [HeaderError]() + # [InternalError]() + # [QueryError]() + # [QuotaError]() + # [RequestError]() + rpc :SearchGoogleAdsFields, ::Google::Ads::GoogleAds::V25::Services::SearchGoogleAdsFieldsRequest, ::Google::Ads::GoogleAds::V25::Services::SearchGoogleAdsFieldsResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/google_ads_service.rb b/lib/google/ads/google_ads/v25/services/google_ads_service.rb new file mode 100644 index 000000000..3426acef4 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/google_ads_service.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/ads/google_ads/version" + +require "google/ads/google_ads/v25/services/google_ads_service/credentials" +require "google/ads/google_ads/v25/services/google_ads_service/paths" +require "google/ads/google_ads/v25/services/google_ads_service/client" + +module Google + module Ads + module GoogleAds + module V25 + module Services + ## + # Service to fetch data and metrics across resources. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/ads/google_ads/v25/services/google_ads_service" + # client = ::Google::Ads::GoogleAds::V25::Services::GoogleAdsService::Client.new + # + module GoogleAdsService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "google_ads_service", "helpers.rb" +require "google/ads/google_ads/v25/services/google_ads_service/helpers" if ::File.file? helper_path diff --git a/lib/google/ads/google_ads/v25/services/google_ads_service/client.rb b/lib/google/ads/google_ads/v25/services/google_ads_service/client.rb new file mode 100644 index 000000000..940a08a5b --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/google_ads_service/client.rb @@ -0,0 +1,845 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# require "google/ads/google_ads/error" +require "google/ads/google_ads/v25/services/google_ads_service_pb" + +module Google + module Ads + module GoogleAds + module V25 + module Services + module GoogleAdsService + ## + # Client for the GoogleAdsService service. + # + # Service to fetch data and metrics across resources. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "googleads.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :google_ads_service_stub + + ## + # Configure the GoogleAdsService Client class. + # + # See {::Google::Ads::GoogleAds::V25::Services::GoogleAdsService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all GoogleAdsService clients + # ::Google::Ads::GoogleAds::V25::Services::GoogleAdsService::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + default_config = Client::Configuration.new + + default_config.timeout = 14_400.0 + default_config.retry_policy = { + initial_delay: 5.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the GoogleAdsService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Ads::GoogleAds::V25::Services::GoogleAdsService::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @google_ads_service_stub.universe_domain + end + + ## + # Create a new GoogleAdsService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Ads::GoogleAds::V25::Services::GoogleAdsService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Ads::GoogleAds::V25::Services::GoogleAdsService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the GoogleAdsService client. + # @yieldparam config [Client::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/ads/google_ads/v25/services/google_ads_service_services_pb" + + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @google_ads_service_stub = ::Gapic::ServiceStub.new( + ::Google::Ads::GoogleAds::V25::Services::GoogleAdsService::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool, + logger: @config.logger + ) + + @google_ads_service_stub.stub_logger&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @google_ads_service_stub.logger + end + + # Service calls + + ## + # Returns all rows that match the search query. + # + # List of thrown errors: + # [AuthenticationError]() + # [AuthorizationError]() + # [ChangeEventError]() + # [ChangeStatusError]() + # [ClickViewError]() + # [HeaderError]() + # [InternalError]() + # [QueryError]() + # [QuotaError]() + # [RequestError]() + # + # @overload search(request, options = nil) + # Pass arguments to `search` via a request object, either of type + # {::Google::Ads::GoogleAds::V25::Services::SearchGoogleAdsRequest} or an equivalent Hash. + # + # @param request [::Google::Ads::GoogleAds::V25::Services::SearchGoogleAdsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload search(customer_id: nil, query: nil, page_token: nil, page_size: nil, validate_only: nil, search_settings: nil) + # Pass arguments to `search` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param customer_id [::String] + # Required. The ID of the customer being queried. + # @param query [::String] + # Required. The query string. + # @param page_token [::String] + # 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. + # @param page_size [::Integer] + # This field is deprecated and will be removed in + # a future version of the API. Google Ads API returns a + # `PAGE_SIZE_NOT_SUPPORTED` error if this field is set in the request + # body. + # @param validate_only [::Boolean] + # If true, the request is validated but not executed. + # @param search_settings [::Google::Ads::GoogleAds::V25::Services::SearchSettings, ::Hash] + # Settings that allow users to specify request count, summary row, and + # results behavior. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Ads::GoogleAds::V25::Services::GoogleAdsRow>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Ads::GoogleAds::V25::Services::GoogleAdsRow>] + # + # @raise [Google::Ads::GoogleAds::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/ads/google_ads/v25/services" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Ads::GoogleAds::V25::Services::GoogleAdsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Ads::GoogleAds::V25::Services::SearchGoogleAdsRequest.new + # + # # Call the search method. + # result = client.search request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Ads::GoogleAds::V25::Services::GoogleAdsRow. + # p item + # end + # + def search request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::GoogleAds::V25::Services::SearchGoogleAdsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.search.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Ads::GoogleAds::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.customer_id + header_params["customer_id"] = request.customer_id + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.search.timeout, + metadata: metadata, + retry_policy: @config.rpcs.search.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @google_ads_service_stub.call_rpc :search, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @google_ads_service_stub, :search, request, response, + operation, options + yield response, operation if block_given? + throw :response, response + end + # rescue GRPC::BadStatus => grpc_error + # raise Google::Ads::GoogleAds::Error.new grpc_error.message + end + + ## + # Returns all rows that match the search stream query. + # + # List of thrown errors: + # [AuthenticationError]() + # [AuthorizationError]() + # [ChangeEventError]() + # [ChangeStatusError]() + # [ClickViewError]() + # [HeaderError]() + # [InternalError]() + # [QueryError]() + # [QuotaError]() + # [RequestError]() + # + # @overload search_stream(request, options = nil) + # Pass arguments to `search_stream` via a request object, either of type + # {::Google::Ads::GoogleAds::V25::Services::SearchGoogleAdsStreamRequest} or an equivalent Hash. + # + # @param request [::Google::Ads::GoogleAds::V25::Services::SearchGoogleAdsStreamRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload search_stream(customer_id: nil, query: nil, summary_row_setting: nil) + # Pass arguments to `search_stream` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param customer_id [::String] + # Required. The ID of the customer being queried. + # @param query [::String] + # Required. The query string. + # @param summary_row_setting [::Google::Ads::GoogleAds::V25::Enums::SummaryRowSettingEnum::SummaryRowSetting] + # Determines whether a summary row will be returned. By default, summary row + # is not returned. If requested, the summary row will be sent in a response + # by itself after all other query results are returned. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Enumerable<::Google::Ads::GoogleAds::V25::Services::SearchGoogleAdsStreamResponse>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Enumerable<::Google::Ads::GoogleAds::V25::Services::SearchGoogleAdsStreamResponse>] + # + # @raise [Google::Ads::GoogleAds::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/ads/google_ads/v25/services" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Ads::GoogleAds::V25::Services::GoogleAdsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Ads::GoogleAds::V25::Services::SearchGoogleAdsStreamRequest.new + # + # # Call the search_stream method to start streaming. + # output = client.search_stream request + # + # # The returned object is a streamed enumerable yielding elements of type + # # ::Google::Ads::GoogleAds::V25::Services::SearchGoogleAdsStreamResponse + # output.each do |current_response| + # p current_response + # end + # + def search_stream request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::GoogleAds::V25::Services::SearchGoogleAdsStreamRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.search_stream.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Ads::GoogleAds::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.customer_id + header_params["customer_id"] = request.customer_id + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.search_stream.timeout, + metadata: metadata, + retry_policy: @config.rpcs.search_stream.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @google_ads_service_stub.call_rpc :search_stream, request, options: options do |response, operation| + yield response, operation if block_given? + end + # rescue GRPC::BadStatus => grpc_error + # raise Google::Ads::GoogleAds::Error.new grpc_error.message + end + + ## + # Executes mutate and actions operations. Mutate operations create, update, + # or remove resources. Actions perform custom operations. This method + # supports atomic transactions with multiple types of resources and + # actions. For example, you can atomically create a campaign and a campaign + # budget, or perform up to thousands of mutates atomically. + # + # This method is essentially a wrapper around a series of mutate methods. The + # only features it offers over calling those methods directly are: + # + # - Atomic transactions + # - Temp resource names (described below) + # - Somewhat reduced latency over making a series of mutate calls + # + # Note: Only resources that support atomic transactions are included, so this + # method can't replace all calls to individual services. + # + # ## Atomic Transaction Benefits + # + # Atomicity makes error handling much easier. If you're making a series of + # changes and one fails, it can leave your account in an inconsistent state. + # With atomicity, you either reach the chosen state directly, or the request + # fails and you can retry. + # + # ## Temp Resource Names + # + # Temp resource names are a special type of resource name used to create a + # resource and reference that resource in the same request. For example, if a + # campaign budget is created with `resource_name` equal to + # `customers/123/campaignBudgets/-1`, that resource name can be reused in + # the `Campaign.budget` field in the same request. That way, the two + # resources are created and linked atomically. + # + # To create a temp resource name, put a negative number in the part of the + # name that the server would normally allocate. + # + # Note: + # + # - Resources must be created with a temp name before the name can be reused. + # For example, the previous CampaignBudget+Campaign example would fail if + # the mutate order was reversed. + # - Temp names are not remembered across requests. + # - There's no limit to the number of temp names in a request. + # - Each temp name must use a unique negative number, even if the resource + # types differ. + # + # ## Latency + # + # It's important to group mutates by resource type or the request may time + # out and fail. Latency is roughly equal to a series of calls to individual + # mutate methods, where each change in resource type is a new call. For + # example, mutating 10 campaigns then 10 ad groups is like 2 calls, while + # mutating 1 campaign, 1 ad group, 1 campaign, 1 ad group is like 4 calls. + # + # List of thrown errors: + # [AdCustomizerError]() + # [AdError]() + # [AdGroupAdError]() + # [AdGroupCriterionError]() + # [AdGroupError]() + # [AssetError]() + # [AuthenticationError]() + # [AuthorizationError]() + # [BiddingError]() + # [CampaignBudgetError]() + # [CampaignCriterionError]() + # [CampaignError]() + # [CampaignExperimentError]() + # [CampaignSharedSetError]() + # [CollectionSizeError]() + # [ContextError]() + # [ConversionActionError]() + # [CriterionError]() + # [CustomerFeedError]() + # [DatabaseError]() + # [DateError]() + # [DateRangeError]() + # [DistinctError]() + # [ExtensionFeedItemError]() + # [ExtensionSettingError]() + # [FeedAttributeReferenceError]() + # [FeedError]() + # [FeedItemError]() + # [FeedItemSetError]() + # [FieldError]() + # [FieldMaskError]() + # [FunctionParsingError]() + # [HeaderError]() + # [ImageError]() + # [InternalError]() + # [KeywordPlanAdGroupKeywordError]() + # [KeywordPlanCampaignError]() + # [KeywordPlanError]() + # [LabelError]() + # [ListOperationError]() + # [MediaUploadError]() + # [MutateError]() + # [NewResourceCreationError]() + # [NullError]() + # [OperationAccessDeniedError]() + # [PolicyFindingError]() + # [PolicyViolationError]() + # [QuotaError]() + # [RangeError]() + # [RequestError]() + # [ResourceCountLimitExceededError]() + # [SettingError]() + # [SharedSetError]() + # [SizeLimitError]() + # [StringFormatError]() + # [StringLengthError]() + # [UrlFieldError]() + # [UserListError]() + # [YoutubeVideoRegistrationError]() + # + # @overload mutate(request, options = nil) + # Pass arguments to `mutate` via a request object, either of type + # {::Google::Ads::GoogleAds::V25::Services::MutateGoogleAdsRequest} or an equivalent Hash. + # + # @param request [::Google::Ads::GoogleAds::V25::Services::MutateGoogleAdsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload mutate(customer_id: nil, mutate_operations: nil, partial_failure: nil, validate_only: nil, response_content_type: nil) + # Pass arguments to `mutate` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param customer_id [::String] + # Required. The ID of the customer whose resources are being modified. + # @param mutate_operations [::Array<::Google::Ads::GoogleAds::V25::Services::MutateOperation, ::Hash>] + # Required. The list of operations to perform on individual resources. + # @param partial_failure [::Boolean] + # 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. + # @param validate_only [::Boolean] + # If true, the request is validated but not executed. Mutates only return + # errors, not results. Actions return results and errors. + # @param response_content_type [::Google::Ads::GoogleAds::V25::Enums::ResponseContentTypeEnum::ResponseContentType] + # The response content type setting. Determines whether the mutable resource + # or just the resource name should be returned post mutation. The mutable + # resource will only be returned if the resource has the appropriate response + # field. For example, MutateCampaignResult.campaign. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Ads::GoogleAds::V25::Services::MutateGoogleAdsResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Ads::GoogleAds::V25::Services::MutateGoogleAdsResponse] + # + # @raise [Google::Ads::GoogleAds::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/ads/google_ads/v25/services" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Ads::GoogleAds::V25::Services::GoogleAdsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Ads::GoogleAds::V25::Services::MutateGoogleAdsRequest.new + # + # # Call the mutate method. + # result = client.mutate request + # + # # The returned object is of type Google::Ads::GoogleAds::V25::Services::MutateGoogleAdsResponse. + # p result + # + def mutate request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::GoogleAds::V25::Services::MutateGoogleAdsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.mutate.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Ads::GoogleAds::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.customer_id + header_params["customer_id"] = request.customer_id + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.mutate.timeout, + metadata: metadata, + retry_policy: @config.rpcs.mutate.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @google_ads_service_stub.call_rpc :mutate, request, options: options do |response, operation| + yield response, operation if block_given? + end + # rescue GRPC::BadStatus => grpc_error + # raise Google::Ads::GoogleAds::Error.new grpc_error.message + end + + ## + # Configuration class for the GoogleAdsService API. + # + # This class represents the configuration for GoogleAdsService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Ads::GoogleAds::V25::Services::GoogleAdsService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # search to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Ads::GoogleAds::V25::Services::GoogleAdsService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.search.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Ads::GoogleAds::V25::Services::GoogleAdsService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.search.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Ads::GoogleAds::V25::Services::GoogleAdsService::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "googleads.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, + ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the GoogleAdsService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `search` + # @return [::Gapic::Config::Method] + # + attr_reader :search + ## + # RPC-specific configuration for `search_stream` + # @return [::Gapic::Config::Method] + # + attr_reader :search_stream + ## + # RPC-specific configuration for `mutate` + # @return [::Gapic::Config::Method] + # + attr_reader :mutate + + # @private + def initialize parent_rpcs = nil + search_config = parent_rpcs.search if parent_rpcs.respond_to? :search + @search = ::Gapic::Config::Method.new search_config + search_stream_config = parent_rpcs.search_stream if parent_rpcs.respond_to? :search_stream + @search_stream = ::Gapic::Config::Method.new search_stream_config + mutate_config = parent_rpcs.mutate if parent_rpcs.respond_to? :mutate + @mutate = ::Gapic::Config::Method.new mutate_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/google_ads_service/credentials.rb b/lib/google/ads/google_ads/v25/services/google_ads_service/credentials.rb new file mode 100644 index 000000000..7d29e441a --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/google_ads_service/credentials.rb @@ -0,0 +1,38 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Ads + module GoogleAds + module V25 + module Services + module GoogleAdsService + # Credentials for the GoogleAdsService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/adwords" + ] + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/google_ads_service/paths.rb b/lib/google/ads/google_ads/v25/services/google_ads_service/paths.rb new file mode 100644 index 000000000..015cff8d8 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/google_ads_service/paths.rb @@ -0,0 +1,3397 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Ads + module GoogleAds + module V25 + module Services + module GoogleAdsService + # Path helper methods for the GoogleAdsService API. + module Paths + ## + # Create a fully-qualified AccessibleBiddingStrategy resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/accessibleBiddingStrategies/{bidding_strategy_id}` + # + # @param customer_id [String] + # @param bidding_strategy_id [String] + # + # @return [::String] + def accessible_bidding_strategy_path customer_id:, bidding_strategy_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/accessibleBiddingStrategies/#{bidding_strategy_id}" + end + + ## + # Create a fully-qualified AccountBudget resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/accountBudgets/{account_budget_id}` + # + # @param customer_id [String] + # @param account_budget_id [String] + # + # @return [::String] + def account_budget_path customer_id:, account_budget_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/accountBudgets/#{account_budget_id}" + end + + ## + # Create a fully-qualified AccountBudgetProposal resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/accountBudgetProposals/{account_budget_proposal_id}` + # + # @param customer_id [String] + # @param account_budget_proposal_id [String] + # + # @return [::String] + def account_budget_proposal_path customer_id:, account_budget_proposal_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/accountBudgetProposals/#{account_budget_proposal_id}" + end + + ## + # Create a fully-qualified AccountLink resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/accountLinks/{account_link_id}` + # + # @param customer_id [String] + # @param account_link_id [String] + # + # @return [::String] + def account_link_path customer_id:, account_link_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/accountLinks/#{account_link_id}" + end + + ## + # Create a fully-qualified Ad resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/ads/{ad_id}` + # + # @param customer_id [String] + # @param ad_id [String] + # + # @return [::String] + def ad_path customer_id:, ad_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/ads/#{ad_id}" + end + + ## + # Create a fully-qualified AdGroup resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/adGroups/{ad_group_id}` + # + # @param customer_id [String] + # @param ad_group_id [String] + # + # @return [::String] + def ad_group_path customer_id:, ad_group_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/adGroups/#{ad_group_id}" + end + + ## + # Create a fully-qualified AdGroupAd resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/adGroupAds/{ad_group_id}~{ad_id}` + # + # @param customer_id [String] + # @param ad_group_id [String] + # @param ad_id [String] + # + # @return [::String] + def ad_group_ad_path customer_id:, ad_group_id:, ad_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + raise ::ArgumentError, "ad_group_id cannot contain /" if ad_group_id.to_s.include? "/" + + "customers/#{customer_id}/adGroupAds/#{ad_group_id}~#{ad_id}" + end + + ## + # Create a fully-qualified AdGroupAdAssetCombinationView resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/adGroupAdAssetCombinationViews/{ad_group_id}~{ad_id}~{asset_combination_id_low}~{asset_combination_id_high}` + # + # @param customer_id [String] + # @param ad_group_id [String] + # @param ad_id [String] + # @param asset_combination_id_low [String] + # @param asset_combination_id_high [String] + # + # @return [::String] + def ad_group_ad_asset_combination_view_path customer_id:, ad_group_id:, ad_id:, + asset_combination_id_low:, asset_combination_id_high: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + raise ::ArgumentError, "ad_group_id cannot contain /" if ad_group_id.to_s.include? "/" + raise ::ArgumentError, "ad_id cannot contain /" if ad_id.to_s.include? "/" + if asset_combination_id_low.to_s.include? "/" + raise ::ArgumentError, + "asset_combination_id_low cannot contain /" + end + + "customers/#{customer_id}/adGroupAdAssetCombinationViews/#{ad_group_id}~#{ad_id}~#{asset_combination_id_low}~#{asset_combination_id_high}" + end + + ## + # Create a fully-qualified AdGroupAdAssetView resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/adGroupAdAssetViews/{ad_group_id}~{ad_id}~{asset_id}~{field_type}` + # + # @param customer_id [String] + # @param ad_group_id [String] + # @param ad_id [String] + # @param asset_id [String] + # @param field_type [String] + # + # @return [::String] + def ad_group_ad_asset_view_path customer_id:, ad_group_id:, ad_id:, asset_id:, field_type: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + raise ::ArgumentError, "ad_group_id cannot contain /" if ad_group_id.to_s.include? "/" + raise ::ArgumentError, "ad_id cannot contain /" if ad_id.to_s.include? "/" + raise ::ArgumentError, "asset_id cannot contain /" if asset_id.to_s.include? "/" + + "customers/#{customer_id}/adGroupAdAssetViews/#{ad_group_id}~#{ad_id}~#{asset_id}~#{field_type}" + end + + ## + # Create a fully-qualified AdGroupAdLabel resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/adGroupAdLabels/{ad_group_id}~{ad_id}~{label_id}` + # + # @param customer_id [String] + # @param ad_group_id [String] + # @param ad_id [String] + # @param label_id [String] + # + # @return [::String] + def ad_group_ad_label_path customer_id:, ad_group_id:, ad_id:, label_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + raise ::ArgumentError, "ad_group_id cannot contain /" if ad_group_id.to_s.include? "/" + raise ::ArgumentError, "ad_id cannot contain /" if ad_id.to_s.include? "/" + + "customers/#{customer_id}/adGroupAdLabels/#{ad_group_id}~#{ad_id}~#{label_id}" + end + + ## + # Create a fully-qualified AdGroupAsset resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/adGroupAssets/{ad_group_id}~{asset_id}~{field_type}` + # + # @param customer_id [String] + # @param ad_group_id [String] + # @param asset_id [String] + # @param field_type [String] + # + # @return [::String] + def ad_group_asset_path customer_id:, ad_group_id:, asset_id:, field_type: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + raise ::ArgumentError, "ad_group_id cannot contain /" if ad_group_id.to_s.include? "/" + raise ::ArgumentError, "asset_id cannot contain /" if asset_id.to_s.include? "/" + + "customers/#{customer_id}/adGroupAssets/#{ad_group_id}~#{asset_id}~#{field_type}" + end + + ## + # Create a fully-qualified AdGroupAssetSet resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/adGroupAssetSets/{ad_group_id}~{asset_set_id}` + # + # @param customer_id [String] + # @param ad_group_id [String] + # @param asset_set_id [String] + # + # @return [::String] + def ad_group_asset_set_path customer_id:, ad_group_id:, asset_set_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + raise ::ArgumentError, "ad_group_id cannot contain /" if ad_group_id.to_s.include? "/" + + "customers/#{customer_id}/adGroupAssetSets/#{ad_group_id}~#{asset_set_id}" + end + + ## + # Create a fully-qualified AdGroupAudienceView resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/adGroupAudienceViews/{ad_group_id}~{criterion_id}` + # + # @param customer_id [String] + # @param ad_group_id [String] + # @param criterion_id [String] + # + # @return [::String] + def ad_group_audience_view_path customer_id:, ad_group_id:, criterion_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + raise ::ArgumentError, "ad_group_id cannot contain /" if ad_group_id.to_s.include? "/" + + "customers/#{customer_id}/adGroupAudienceViews/#{ad_group_id}~#{criterion_id}" + end + + ## + # Create a fully-qualified AdGroupBidModifier resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/adGroupBidModifiers/{ad_group_id}~{criterion_id}` + # + # @param customer_id [String] + # @param ad_group_id [String] + # @param criterion_id [String] + # + # @return [::String] + def ad_group_bid_modifier_path customer_id:, ad_group_id:, criterion_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + raise ::ArgumentError, "ad_group_id cannot contain /" if ad_group_id.to_s.include? "/" + + "customers/#{customer_id}/adGroupBidModifiers/#{ad_group_id}~#{criterion_id}" + end + + ## + # Create a fully-qualified AdGroupCriterion resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/adGroupCriteria/{ad_group_id}~{criterion_id}` + # + # @param customer_id [String] + # @param ad_group_id [String] + # @param criterion_id [String] + # + # @return [::String] + def ad_group_criterion_path customer_id:, ad_group_id:, criterion_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + raise ::ArgumentError, "ad_group_id cannot contain /" if ad_group_id.to_s.include? "/" + + "customers/#{customer_id}/adGroupCriteria/#{ad_group_id}~#{criterion_id}" + end + + ## + # Create a fully-qualified AdGroupCriterionCustomizer resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/adGroupCriterionCustomizers/{ad_group_id}~{criterion_id}~{customizer_attribute_id}` + # + # @param customer_id [String] + # @param ad_group_id [String] + # @param criterion_id [String] + # @param customizer_attribute_id [String] + # + # @return [::String] + def ad_group_criterion_customizer_path customer_id:, ad_group_id:, criterion_id:, customizer_attribute_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + raise ::ArgumentError, "ad_group_id cannot contain /" if ad_group_id.to_s.include? "/" + raise ::ArgumentError, "criterion_id cannot contain /" if criterion_id.to_s.include? "/" + + "customers/#{customer_id}/adGroupCriterionCustomizers/#{ad_group_id}~#{criterion_id}~#{customizer_attribute_id}" + end + + ## + # Create a fully-qualified AdGroupCriterionLabel resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/adGroupCriterionLabels/{ad_group_id}~{criterion_id}~{label_id}` + # + # @param customer_id [String] + # @param ad_group_id [String] + # @param criterion_id [String] + # @param label_id [String] + # + # @return [::String] + def ad_group_criterion_label_path customer_id:, ad_group_id:, criterion_id:, label_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + raise ::ArgumentError, "ad_group_id cannot contain /" if ad_group_id.to_s.include? "/" + raise ::ArgumentError, "criterion_id cannot contain /" if criterion_id.to_s.include? "/" + + "customers/#{customer_id}/adGroupCriterionLabels/#{ad_group_id}~#{criterion_id}~#{label_id}" + end + + ## + # Create a fully-qualified AdGroupCriterionSimulation resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/adGroupCriterionSimulations/{ad_group_id}~{criterion_id}~{type}~{modification_method}~{start_date}~{end_date}` + # + # @param customer_id [String] + # @param ad_group_id [String] + # @param criterion_id [String] + # @param type [String] + # @param modification_method [String] + # @param start_date [String] + # @param end_date [String] + # + # @return [::String] + def ad_group_criterion_simulation_path customer_id:, ad_group_id:, criterion_id:, type:, + modification_method:, start_date:, end_date: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + raise ::ArgumentError, "ad_group_id cannot contain /" if ad_group_id.to_s.include? "/" + raise ::ArgumentError, "criterion_id cannot contain /" if criterion_id.to_s.include? "/" + raise ::ArgumentError, "type cannot contain /" if type.to_s.include? "/" + raise ::ArgumentError, "modification_method cannot contain /" if modification_method.to_s.include? "/" + raise ::ArgumentError, "start_date cannot contain /" if start_date.to_s.include? "/" + + "customers/#{customer_id}/adGroupCriterionSimulations/#{ad_group_id}~#{criterion_id}~#{type}~#{modification_method}~#{start_date}~#{end_date}" + end + + ## + # Create a fully-qualified AdGroupCustomizer resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/adGroupCustomizers/{ad_group_id}~{customizer_attribute_id}` + # + # @param customer_id [String] + # @param ad_group_id [String] + # @param customizer_attribute_id [String] + # + # @return [::String] + def ad_group_customizer_path customer_id:, ad_group_id:, customizer_attribute_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + raise ::ArgumentError, "ad_group_id cannot contain /" if ad_group_id.to_s.include? "/" + + "customers/#{customer_id}/adGroupCustomizers/#{ad_group_id}~#{customizer_attribute_id}" + end + + ## + # Create a fully-qualified AdGroupLabel resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/adGroupLabels/{ad_group_id}~{label_id}` + # + # @param customer_id [String] + # @param ad_group_id [String] + # @param label_id [String] + # + # @return [::String] + def ad_group_label_path customer_id:, ad_group_id:, label_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + raise ::ArgumentError, "ad_group_id cannot contain /" if ad_group_id.to_s.include? "/" + + "customers/#{customer_id}/adGroupLabels/#{ad_group_id}~#{label_id}" + end + + ## + # Create a fully-qualified AdGroupSimulation resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/adGroupSimulations/{ad_group_id}~{type}~{modification_method}~{start_date}~{end_date}` + # + # @param customer_id [String] + # @param ad_group_id [String] + # @param type [String] + # @param modification_method [String] + # @param start_date [String] + # @param end_date [String] + # + # @return [::String] + def ad_group_simulation_path customer_id:, ad_group_id:, type:, modification_method:, start_date:, + end_date: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + raise ::ArgumentError, "ad_group_id cannot contain /" if ad_group_id.to_s.include? "/" + raise ::ArgumentError, "type cannot contain /" if type.to_s.include? "/" + raise ::ArgumentError, "modification_method cannot contain /" if modification_method.to_s.include? "/" + raise ::ArgumentError, "start_date cannot contain /" if start_date.to_s.include? "/" + + "customers/#{customer_id}/adGroupSimulations/#{ad_group_id}~#{type}~#{modification_method}~#{start_date}~#{end_date}" + end + + ## + # Create a fully-qualified AdParameter resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/adParameters/{ad_group_id}~{criterion_id}~{parameter_index}` + # + # @param customer_id [String] + # @param ad_group_id [String] + # @param criterion_id [String] + # @param parameter_index [String] + # + # @return [::String] + def ad_parameter_path customer_id:, ad_group_id:, criterion_id:, parameter_index: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + raise ::ArgumentError, "ad_group_id cannot contain /" if ad_group_id.to_s.include? "/" + raise ::ArgumentError, "criterion_id cannot contain /" if criterion_id.to_s.include? "/" + + "customers/#{customer_id}/adParameters/#{ad_group_id}~#{criterion_id}~#{parameter_index}" + end + + ## + # Create a fully-qualified AdScheduleView resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/adScheduleViews/{campaign_id}~{criterion_id}` + # + # @param customer_id [String] + # @param campaign_id [String] + # @param criterion_id [String] + # + # @return [::String] + def ad_schedule_view_path customer_id:, campaign_id:, criterion_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + raise ::ArgumentError, "campaign_id cannot contain /" if campaign_id.to_s.include? "/" + + "customers/#{customer_id}/adScheduleViews/#{campaign_id}~#{criterion_id}" + end + + ## + # Create a fully-qualified AgeRangeView resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/ageRangeViews/{ad_group_id}~{criterion_id}` + # + # @param customer_id [String] + # @param ad_group_id [String] + # @param criterion_id [String] + # + # @return [::String] + def age_range_view_path customer_id:, ad_group_id:, criterion_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + raise ::ArgumentError, "ad_group_id cannot contain /" if ad_group_id.to_s.include? "/" + + "customers/#{customer_id}/ageRangeViews/#{ad_group_id}~#{criterion_id}" + end + + ## + # Create a fully-qualified AiMaxSearchTermAdCombinationView resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/aiMaxSearchTermAdCombinationViews/{ad_group_id}~{search_term}~{landing_page}~{headline}` + # + # @param customer_id [String] + # @param ad_group_id [String] + # @param search_term [String] + # @param landing_page [String] + # @param headline [String] + # + # @return [::String] + def ai_max_search_term_ad_combination_view_path customer_id:, ad_group_id:, search_term:, landing_page:, + headline: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + raise ::ArgumentError, "ad_group_id cannot contain /" if ad_group_id.to_s.include? "/" + raise ::ArgumentError, "search_term cannot contain /" if search_term.to_s.include? "/" + raise ::ArgumentError, "landing_page cannot contain /" if landing_page.to_s.include? "/" + + "customers/#{customer_id}/aiMaxSearchTermAdCombinationViews/#{ad_group_id}~#{search_term}~#{landing_page}~#{headline}" + end + + ## + # Create a fully-qualified AndroidPrivacySharedKeyGoogleAdGroup resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/androidPrivacySharedKeyGoogleAdGroups/{campaign_id}~{ad_group_id}~{android_privacy_interaction_type}~{android_privacy_network_type}~{android_privacy_interaction_date}` + # + # @param customer_id [String] + # @param campaign_id [String] + # @param ad_group_id [String] + # @param android_privacy_interaction_type [String] + # @param android_privacy_network_type [String] + # @param android_privacy_interaction_date [String] + # + # @return [::String] + def android_privacy_shared_key_google_ad_group_path customer_id:, campaign_id:, ad_group_id:, + android_privacy_interaction_type:, android_privacy_network_type:, android_privacy_interaction_date: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + raise ::ArgumentError, "campaign_id cannot contain /" if campaign_id.to_s.include? "/" + raise ::ArgumentError, "ad_group_id cannot contain /" if ad_group_id.to_s.include? "/" + if android_privacy_interaction_type.to_s.include? "/" + raise ::ArgumentError, + "android_privacy_interaction_type cannot contain /" + end + if android_privacy_network_type.to_s.include? "/" + raise ::ArgumentError, + "android_privacy_network_type cannot contain /" + end + + "customers/#{customer_id}/androidPrivacySharedKeyGoogleAdGroups/#{campaign_id}~#{ad_group_id}~#{android_privacy_interaction_type}~#{android_privacy_network_type}~#{android_privacy_interaction_date}" + end + + ## + # Create a fully-qualified AndroidPrivacySharedKeyGoogleCampaign resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/androidPrivacySharedKeyGoogleCampaigns/{campaign_id}~{android_privacy_interaction_type}~{android_privacy_interaction_date}` + # + # @param customer_id [String] + # @param campaign_id [String] + # @param android_privacy_interaction_type [String] + # @param android_privacy_interaction_date [String] + # + # @return [::String] + def android_privacy_shared_key_google_campaign_path customer_id:, campaign_id:, + android_privacy_interaction_type:, android_privacy_interaction_date: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + raise ::ArgumentError, "campaign_id cannot contain /" if campaign_id.to_s.include? "/" + if android_privacy_interaction_type.to_s.include? "/" + raise ::ArgumentError, + "android_privacy_interaction_type cannot contain /" + end + + "customers/#{customer_id}/androidPrivacySharedKeyGoogleCampaigns/#{campaign_id}~#{android_privacy_interaction_type}~#{android_privacy_interaction_date}" + end + + ## + # Create a fully-qualified AndroidPrivacySharedKeyGoogleNetworkType resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/androidPrivacySharedKeyGoogleNetworkTypes/{campaign_id}~{android_privacy_interaction_type}~{android_privacy_network_type}~{android_privacy_interaction_date}` + # + # @param customer_id [String] + # @param campaign_id [String] + # @param android_privacy_interaction_type [String] + # @param android_privacy_network_type [String] + # @param android_privacy_interaction_date [String] + # + # @return [::String] + def android_privacy_shared_key_google_network_type_path customer_id:, campaign_id:, + android_privacy_interaction_type:, android_privacy_network_type:, android_privacy_interaction_date: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + raise ::ArgumentError, "campaign_id cannot contain /" if campaign_id.to_s.include? "/" + if android_privacy_interaction_type.to_s.include? "/" + raise ::ArgumentError, + "android_privacy_interaction_type cannot contain /" + end + if android_privacy_network_type.to_s.include? "/" + raise ::ArgumentError, + "android_privacy_network_type cannot contain /" + end + + "customers/#{customer_id}/androidPrivacySharedKeyGoogleNetworkTypes/#{campaign_id}~#{android_privacy_interaction_type}~#{android_privacy_network_type}~#{android_privacy_interaction_date}" + end + + ## + # Create a fully-qualified AppTopCombinationView resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/appTopCombinationViews/{ad_group_id}~{ad_id}~{asset_combination_category}` + # + # @param customer_id [String] + # @param ad_group_id [String] + # @param ad_id [String] + # @param asset_combination_category [String] + # + # @return [::String] + def app_top_combination_view_path customer_id:, ad_group_id:, ad_id:, asset_combination_category: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + raise ::ArgumentError, "ad_group_id cannot contain /" if ad_group_id.to_s.include? "/" + raise ::ArgumentError, "ad_id cannot contain /" if ad_id.to_s.include? "/" + + "customers/#{customer_id}/appTopCombinationViews/#{ad_group_id}~#{ad_id}~#{asset_combination_category}" + end + + ## + # Create a fully-qualified AppliedIncentive resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/appliedIncentives/{coupon_code}` + # + # @param customer_id [String] + # @param coupon_code [String] + # + # @return [::String] + def applied_incentive_path customer_id:, coupon_code: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/appliedIncentives/#{coupon_code}" + end + + ## + # Create a fully-qualified Asset resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/assets/{asset_id}` + # + # @param customer_id [String] + # @param asset_id [String] + # + # @return [::String] + def asset_path customer_id:, asset_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/assets/#{asset_id}" + end + + ## + # Create a fully-qualified AssetFieldTypeView resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/assetFieldTypeViews/{field_type}` + # + # @param customer_id [String] + # @param field_type [String] + # + # @return [::String] + def asset_field_type_view_path customer_id:, field_type: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/assetFieldTypeViews/#{field_type}" + end + + ## + # Create a fully-qualified AssetGroup resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/assetGroups/{asset_group_id}` + # + # @param customer_id [String] + # @param asset_group_id [String] + # + # @return [::String] + def asset_group_path customer_id:, asset_group_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/assetGroups/#{asset_group_id}" + end + + ## + # Create a fully-qualified AssetGroupAsset resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/assetGroupAssets/{asset_group_id}~{asset_id}~{field_type}` + # + # @param customer_id [String] + # @param asset_group_id [String] + # @param asset_id [String] + # @param field_type [String] + # + # @return [::String] + def asset_group_asset_path customer_id:, asset_group_id:, asset_id:, field_type: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + raise ::ArgumentError, "asset_group_id cannot contain /" if asset_group_id.to_s.include? "/" + raise ::ArgumentError, "asset_id cannot contain /" if asset_id.to_s.include? "/" + + "customers/#{customer_id}/assetGroupAssets/#{asset_group_id}~#{asset_id}~#{field_type}" + end + + ## + # Create a fully-qualified AssetGroupListingGroupFilter resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/assetGroupListingGroupFilters/{asset_group_id}~{listing_group_filter_id}` + # + # @param customer_id [String] + # @param asset_group_id [String] + # @param listing_group_filter_id [String] + # + # @return [::String] + def asset_group_listing_group_filter_path customer_id:, asset_group_id:, listing_group_filter_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + raise ::ArgumentError, "asset_group_id cannot contain /" if asset_group_id.to_s.include? "/" + + "customers/#{customer_id}/assetGroupListingGroupFilters/#{asset_group_id}~#{listing_group_filter_id}" + end + + ## + # Create a fully-qualified AssetGroupProductGroupView resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/assetGroupProductGroupViews/{asset_group_id}~{listing_group_filter_id}` + # + # @param customer_id [String] + # @param asset_group_id [String] + # @param listing_group_filter_id [String] + # + # @return [::String] + def asset_group_product_group_view_path customer_id:, asset_group_id:, listing_group_filter_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + raise ::ArgumentError, "asset_group_id cannot contain /" if asset_group_id.to_s.include? "/" + + "customers/#{customer_id}/assetGroupProductGroupViews/#{asset_group_id}~#{listing_group_filter_id}" + end + + ## + # Create a fully-qualified AssetGroupSignal resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/assetGroupSignals/{asset_group_id}~{criterion_id}` + # + # @param customer_id [String] + # @param asset_group_id [String] + # @param criterion_id [String] + # + # @return [::String] + def asset_group_signal_path customer_id:, asset_group_id:, criterion_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + raise ::ArgumentError, "asset_group_id cannot contain /" if asset_group_id.to_s.include? "/" + + "customers/#{customer_id}/assetGroupSignals/#{asset_group_id}~#{criterion_id}" + end + + ## + # Create a fully-qualified AssetGroupTopCombinationView resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/assetGroupTopCombinationViews/{asset_group_id}~{asset_combination_category}` + # + # @param customer_id [String] + # @param asset_group_id [String] + # @param asset_combination_category [String] + # + # @return [::String] + def asset_group_top_combination_view_path customer_id:, asset_group_id:, asset_combination_category: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + raise ::ArgumentError, "asset_group_id cannot contain /" if asset_group_id.to_s.include? "/" + + "customers/#{customer_id}/assetGroupTopCombinationViews/#{asset_group_id}~#{asset_combination_category}" + end + + ## + # Create a fully-qualified AssetSet resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/assetSets/{asset_set_id}` + # + # @param customer_id [String] + # @param asset_set_id [String] + # + # @return [::String] + def asset_set_path customer_id:, asset_set_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/assetSets/#{asset_set_id}" + end + + ## + # Create a fully-qualified AssetSetAsset resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/assetSetAssets/{asset_set_id}~{asset_id}` + # + # @param customer_id [String] + # @param asset_set_id [String] + # @param asset_id [String] + # + # @return [::String] + def asset_set_asset_path customer_id:, asset_set_id:, asset_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + raise ::ArgumentError, "asset_set_id cannot contain /" if asset_set_id.to_s.include? "/" + + "customers/#{customer_id}/assetSetAssets/#{asset_set_id}~#{asset_id}" + end + + ## + # Create a fully-qualified AssetSetTypeView resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/assetSetTypeViews/{asset_set_type}` + # + # @param customer_id [String] + # @param asset_set_type [String] + # + # @return [::String] + def asset_set_type_view_path customer_id:, asset_set_type: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/assetSetTypeViews/#{asset_set_type}" + end + + ## + # Create a fully-qualified Audience resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/audiences/{audience_id}` + # + # @param customer_id [String] + # @param audience_id [String] + # + # @return [::String] + def audience_path customer_id:, audience_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/audiences/#{audience_id}" + end + + ## + # Create a fully-qualified BatchJob resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/batchJobs/{batch_job_id}` + # + # @param customer_id [String] + # @param batch_job_id [String] + # + # @return [::String] + def batch_job_path customer_id:, batch_job_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/batchJobs/#{batch_job_id}" + end + + ## + # Create a fully-qualified BiddingDataExclusion resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/biddingDataExclusions/{seasonality_event_id}` + # + # @param customer_id [String] + # @param seasonality_event_id [String] + # + # @return [::String] + def bidding_data_exclusion_path customer_id:, seasonality_event_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/biddingDataExclusions/#{seasonality_event_id}" + end + + ## + # Create a fully-qualified BiddingSeasonalityAdjustment resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/biddingSeasonalityAdjustments/{seasonality_event_id}` + # + # @param customer_id [String] + # @param seasonality_event_id [String] + # + # @return [::String] + def bidding_seasonality_adjustment_path customer_id:, seasonality_event_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/biddingSeasonalityAdjustments/#{seasonality_event_id}" + end + + ## + # Create a fully-qualified BiddingStrategy resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/biddingStrategies/{bidding_strategy_id}` + # + # @param customer_id [String] + # @param bidding_strategy_id [String] + # + # @return [::String] + def bidding_strategy_path customer_id:, bidding_strategy_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/biddingStrategies/#{bidding_strategy_id}" + end + + ## + # Create a fully-qualified BiddingStrategySimulation resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/biddingStrategySimulations/{bidding_strategy_id}~{type}~{modification_method}~{start_date}~{end_date}` + # + # @param customer_id [String] + # @param bidding_strategy_id [String] + # @param type [String] + # @param modification_method [String] + # @param start_date [String] + # @param end_date [String] + # + # @return [::String] + def bidding_strategy_simulation_path customer_id:, bidding_strategy_id:, type:, modification_method:, + start_date:, end_date: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + raise ::ArgumentError, "bidding_strategy_id cannot contain /" if bidding_strategy_id.to_s.include? "/" + raise ::ArgumentError, "type cannot contain /" if type.to_s.include? "/" + raise ::ArgumentError, "modification_method cannot contain /" if modification_method.to_s.include? "/" + raise ::ArgumentError, "start_date cannot contain /" if start_date.to_s.include? "/" + + "customers/#{customer_id}/biddingStrategySimulations/#{bidding_strategy_id}~#{type}~#{modification_method}~#{start_date}~#{end_date}" + end + + ## + # Create a fully-qualified BillingSetup resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/billingSetups/{billing_setup_id}` + # + # @param customer_id [String] + # @param billing_setup_id [String] + # + # @return [::String] + def billing_setup_path customer_id:, billing_setup_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/billingSetups/#{billing_setup_id}" + end + + ## + # Create a fully-qualified CallView resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/callViews/{call_detail_id}` + # + # @param customer_id [String] + # @param call_detail_id [String] + # + # @return [::String] + def call_view_path customer_id:, call_detail_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/callViews/#{call_detail_id}" + end + + ## + # Create a fully-qualified Campaign resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/campaigns/{campaign_id}` + # + # @param customer_id [String] + # @param campaign_id [String] + # + # @return [::String] + def campaign_path customer_id:, campaign_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/campaigns/#{campaign_id}" + end + + ## + # Create a fully-qualified CampaignAggregateAssetView resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/campaignAggregateAssetViews/{campaign_id}~{asset_id}~{asset_link_source}~{field_type}` + # + # @param customer_id [String] + # @param campaign_id [String] + # @param asset_id [String] + # @param asset_link_source [String] + # @param field_type [String] + # + # @return [::String] + def campaign_aggregate_asset_view_path customer_id:, campaign_id:, asset_id:, asset_link_source:, + field_type: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + raise ::ArgumentError, "campaign_id cannot contain /" if campaign_id.to_s.include? "/" + raise ::ArgumentError, "asset_id cannot contain /" if asset_id.to_s.include? "/" + raise ::ArgumentError, "asset_link_source cannot contain /" if asset_link_source.to_s.include? "/" + + "customers/#{customer_id}/campaignAggregateAssetViews/#{campaign_id}~#{asset_id}~#{asset_link_source}~#{field_type}" + end + + ## + # Create a fully-qualified CampaignAsset resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/campaignAssets/{campaign_id}~{asset_id}~{field_type}` + # + # @param customer_id [String] + # @param campaign_id [String] + # @param asset_id [String] + # @param field_type [String] + # + # @return [::String] + def campaign_asset_path customer_id:, campaign_id:, asset_id:, field_type: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + raise ::ArgumentError, "campaign_id cannot contain /" if campaign_id.to_s.include? "/" + raise ::ArgumentError, "asset_id cannot contain /" if asset_id.to_s.include? "/" + + "customers/#{customer_id}/campaignAssets/#{campaign_id}~#{asset_id}~#{field_type}" + end + + ## + # Create a fully-qualified CampaignAssetSet resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/campaignAssetSets/{campaign_id}~{asset_set_id}` + # + # @param customer_id [String] + # @param campaign_id [String] + # @param asset_set_id [String] + # + # @return [::String] + def campaign_asset_set_path customer_id:, campaign_id:, asset_set_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + raise ::ArgumentError, "campaign_id cannot contain /" if campaign_id.to_s.include? "/" + + "customers/#{customer_id}/campaignAssetSets/#{campaign_id}~#{asset_set_id}" + end + + ## + # Create a fully-qualified CampaignAudienceView resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/campaignAudienceViews/{campaign_id}~{criterion_id}` + # + # @param customer_id [String] + # @param campaign_id [String] + # @param criterion_id [String] + # + # @return [::String] + def campaign_audience_view_path customer_id:, campaign_id:, criterion_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + raise ::ArgumentError, "campaign_id cannot contain /" if campaign_id.to_s.include? "/" + + "customers/#{customer_id}/campaignAudienceViews/#{campaign_id}~#{criterion_id}" + end + + ## + # Create a fully-qualified CampaignBidModifier resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/campaignBidModifiers/{campaign_id}~{criterion_id}` + # + # @param customer_id [String] + # @param campaign_id [String] + # @param criterion_id [String] + # + # @return [::String] + def campaign_bid_modifier_path customer_id:, campaign_id:, criterion_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + raise ::ArgumentError, "campaign_id cannot contain /" if campaign_id.to_s.include? "/" + + "customers/#{customer_id}/campaignBidModifiers/#{campaign_id}~#{criterion_id}" + end + + ## + # Create a fully-qualified CampaignBudget resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/campaignBudgets/{campaign_budget_id}` + # + # @param customer_id [String] + # @param campaign_budget_id [String] + # + # @return [::String] + def campaign_budget_path customer_id:, campaign_budget_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/campaignBudgets/#{campaign_budget_id}" + end + + ## + # Create a fully-qualified CampaignConversionGoal resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/campaignConversionGoals/{campaign_id}~{category}~{source}` + # + # @param customer_id [String] + # @param campaign_id [String] + # @param category [String] + # @param source [String] + # + # @return [::String] + def campaign_conversion_goal_path customer_id:, campaign_id:, category:, source: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + raise ::ArgumentError, "campaign_id cannot contain /" if campaign_id.to_s.include? "/" + raise ::ArgumentError, "category cannot contain /" if category.to_s.include? "/" + + "customers/#{customer_id}/campaignConversionGoals/#{campaign_id}~#{category}~#{source}" + end + + ## + # Create a fully-qualified CampaignCriterion resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/campaignCriteria/{campaign_id}~{criterion_id}` + # + # @param customer_id [String] + # @param campaign_id [String] + # @param criterion_id [String] + # + # @return [::String] + def campaign_criterion_path customer_id:, campaign_id:, criterion_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + raise ::ArgumentError, "campaign_id cannot contain /" if campaign_id.to_s.include? "/" + + "customers/#{customer_id}/campaignCriteria/#{campaign_id}~#{criterion_id}" + end + + ## + # Create a fully-qualified CampaignCustomizer resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/campaignCustomizers/{campaign_id}~{customizer_attribute_id}` + # + # @param customer_id [String] + # @param campaign_id [String] + # @param customizer_attribute_id [String] + # + # @return [::String] + def campaign_customizer_path customer_id:, campaign_id:, customizer_attribute_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + raise ::ArgumentError, "campaign_id cannot contain /" if campaign_id.to_s.include? "/" + + "customers/#{customer_id}/campaignCustomizers/#{campaign_id}~#{customizer_attribute_id}" + end + + ## + # Create a fully-qualified CampaignDraft resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/campaignDrafts/{base_campaign_id}~{draft_id}` + # + # @param customer_id [String] + # @param base_campaign_id [String] + # @param draft_id [String] + # + # @return [::String] + def campaign_draft_path customer_id:, base_campaign_id:, draft_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + raise ::ArgumentError, "base_campaign_id cannot contain /" if base_campaign_id.to_s.include? "/" + + "customers/#{customer_id}/campaignDrafts/#{base_campaign_id}~#{draft_id}" + end + + ## + # Create a fully-qualified CampaignGoalConfig resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/campaignGoalConfigs/{campaign_id}~{unified_goal_id}` + # + # @param customer_id [String] + # @param campaign_id [String] + # @param unified_goal_id [String] + # + # @return [::String] + def campaign_goal_config_path customer_id:, campaign_id:, unified_goal_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + raise ::ArgumentError, "campaign_id cannot contain /" if campaign_id.to_s.include? "/" + + "customers/#{customer_id}/campaignGoalConfigs/#{campaign_id}~#{unified_goal_id}" + end + + ## + # Create a fully-qualified CampaignGroup resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/campaignGroups/{campaign_group_id}` + # + # @param customer_id [String] + # @param campaign_group_id [String] + # + # @return [::String] + def campaign_group_path customer_id:, campaign_group_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/campaignGroups/#{campaign_group_id}" + end + + ## + # Create a fully-qualified CampaignLabel resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/campaignLabels/{campaign_id}~{label_id}` + # + # @param customer_id [String] + # @param campaign_id [String] + # @param label_id [String] + # + # @return [::String] + def campaign_label_path customer_id:, campaign_id:, label_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + raise ::ArgumentError, "campaign_id cannot contain /" if campaign_id.to_s.include? "/" + + "customers/#{customer_id}/campaignLabels/#{campaign_id}~#{label_id}" + end + + ## + # Create a fully-qualified CampaignSearchTermInsight resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/campaignSearchTermInsights/{campaign_id}~{cluster_id}` + # + # @param customer_id [String] + # @param campaign_id [String] + # @param cluster_id [String] + # + # @return [::String] + def campaign_search_term_insight_path customer_id:, campaign_id:, cluster_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + raise ::ArgumentError, "campaign_id cannot contain /" if campaign_id.to_s.include? "/" + + "customers/#{customer_id}/campaignSearchTermInsights/#{campaign_id}~#{cluster_id}" + end + + ## + # Create a fully-qualified CampaignSearchTermView resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/campaignSearchTermViews/{campaign_id}~{query}` + # + # @param customer_id [String] + # @param campaign_id [String] + # @param query [String] + # + # @return [::String] + def campaign_search_term_view_path customer_id:, campaign_id:, query: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + raise ::ArgumentError, "campaign_id cannot contain /" if campaign_id.to_s.include? "/" + + "customers/#{customer_id}/campaignSearchTermViews/#{campaign_id}~#{query}" + end + + ## + # Create a fully-qualified CampaignSharedSet resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/campaignSharedSets/{campaign_id}~{shared_set_id}` + # + # @param customer_id [String] + # @param campaign_id [String] + # @param shared_set_id [String] + # + # @return [::String] + def campaign_shared_set_path customer_id:, campaign_id:, shared_set_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + raise ::ArgumentError, "campaign_id cannot contain /" if campaign_id.to_s.include? "/" + + "customers/#{customer_id}/campaignSharedSets/#{campaign_id}~#{shared_set_id}" + end + + ## + # Create a fully-qualified CampaignSimulation resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/campaignSimulations/{campaign_id}~{type}~{modification_method}~{start_date}~{end_date}` + # + # @param customer_id [String] + # @param campaign_id [String] + # @param type [String] + # @param modification_method [String] + # @param start_date [String] + # @param end_date [String] + # + # @return [::String] + def campaign_simulation_path customer_id:, campaign_id:, type:, modification_method:, start_date:, + end_date: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + raise ::ArgumentError, "campaign_id cannot contain /" if campaign_id.to_s.include? "/" + raise ::ArgumentError, "type cannot contain /" if type.to_s.include? "/" + raise ::ArgumentError, "modification_method cannot contain /" if modification_method.to_s.include? "/" + raise ::ArgumentError, "start_date cannot contain /" if start_date.to_s.include? "/" + + "customers/#{customer_id}/campaignSimulations/#{campaign_id}~#{type}~#{modification_method}~#{start_date}~#{end_date}" + end + + ## + # Create a fully-qualified CarrierConstant resource string. + # + # The resource will be in the following format: + # + # `carrierConstants/{criterion_id}` + # + # @param criterion_id [String] + # + # @return [::String] + def carrier_constant_path criterion_id: + "carrierConstants/#{criterion_id}" + end + + ## + # Create a fully-qualified CartDataSalesView resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/cartDataSalesView` + # + # @param customer_id [String] + # + # @return [::String] + def cart_data_sales_view_path customer_id: + "customers/#{customer_id}/cartDataSalesView" + end + + ## + # Create a fully-qualified ChangeEvent resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/changeEvents/{timestamp_micros}~{command_index}~{mutate_index}` + # + # @param customer_id [String] + # @param timestamp_micros [String] + # @param command_index [String] + # @param mutate_index [String] + # + # @return [::String] + def change_event_path customer_id:, timestamp_micros:, command_index:, mutate_index: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + raise ::ArgumentError, "timestamp_micros cannot contain /" if timestamp_micros.to_s.include? "/" + raise ::ArgumentError, "command_index cannot contain /" if command_index.to_s.include? "/" + + "customers/#{customer_id}/changeEvents/#{timestamp_micros}~#{command_index}~#{mutate_index}" + end + + ## + # Create a fully-qualified ChangeStatus resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/changeStatus/{change_status_id}` + # + # @param customer_id [String] + # @param change_status_id [String] + # + # @return [::String] + def change_status_path customer_id:, change_status_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/changeStatus/#{change_status_id}" + end + + ## + # Create a fully-qualified ChannelAggregateAssetView resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/channelAggregateAssetViews/{advertising_channel_type}~{asset_id}~{asset_source}~{field_type}` + # + # @param customer_id [String] + # @param advertising_channel_type [String] + # @param asset_id [String] + # @param asset_source [String] + # @param field_type [String] + # + # @return [::String] + def channel_aggregate_asset_view_path customer_id:, advertising_channel_type:, asset_id:, asset_source:, + field_type: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + if advertising_channel_type.to_s.include? "/" + raise ::ArgumentError, + "advertising_channel_type cannot contain /" + end + raise ::ArgumentError, "asset_id cannot contain /" if asset_id.to_s.include? "/" + raise ::ArgumentError, "asset_source cannot contain /" if asset_source.to_s.include? "/" + + "customers/#{customer_id}/channelAggregateAssetViews/#{advertising_channel_type}~#{asset_id}~#{asset_source}~#{field_type}" + end + + ## + # Create a fully-qualified ClickView resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/clickViews/{date}~{gclid}` + # + # @param customer_id [String] + # @param date [String] + # @param gclid [String] + # + # @return [::String] + def click_view_path customer_id:, date:, gclid: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + raise ::ArgumentError, "date cannot contain /" if date.to_s.include? "/" + + "customers/#{customer_id}/clickViews/#{date}~#{gclid}" + end + + ## + # Create a fully-qualified CombinedAudience resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/combinedAudiences/{combined_audience_id}` + # + # @param customer_id [String] + # @param combined_audience_id [String] + # + # @return [::String] + def combined_audience_path customer_id:, combined_audience_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/combinedAudiences/#{combined_audience_id}" + end + + ## + # Create a fully-qualified ContentCriterionView resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/contentCriterionViews/{ad_group_id}~{criterion_id}` + # + # @param customer_id [String] + # @param ad_group_id [String] + # @param criterion_id [String] + # + # @return [::String] + def content_criterion_view_path customer_id:, ad_group_id:, criterion_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + raise ::ArgumentError, "ad_group_id cannot contain /" if ad_group_id.to_s.include? "/" + + "customers/#{customer_id}/contentCriterionViews/#{ad_group_id}~#{criterion_id}" + end + + ## + # Create a fully-qualified ConversionAction resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/conversionActions/{conversion_action_id}` + # + # @param customer_id [String] + # @param conversion_action_id [String] + # + # @return [::String] + def conversion_action_path customer_id:, conversion_action_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/conversionActions/#{conversion_action_id}" + end + + ## + # Create a fully-qualified ConversionCustomVariable resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/conversionCustomVariables/{conversion_custom_variable_id}` + # + # @param customer_id [String] + # @param conversion_custom_variable_id [String] + # + # @return [::String] + def conversion_custom_variable_path customer_id:, conversion_custom_variable_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/conversionCustomVariables/#{conversion_custom_variable_id}" + end + + ## + # Create a fully-qualified ConversionGoalCampaignConfig resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/conversionGoalCampaignConfigs/{campaign_id}` + # + # @param customer_id [String] + # @param campaign_id [String] + # + # @return [::String] + def conversion_goal_campaign_config_path customer_id:, campaign_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/conversionGoalCampaignConfigs/#{campaign_id}" + end + + ## + # Create a fully-qualified ConversionValueRule resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/conversionValueRules/{conversion_value_rule_id}` + # + # @param customer_id [String] + # @param conversion_value_rule_id [String] + # + # @return [::String] + def conversion_value_rule_path customer_id:, conversion_value_rule_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/conversionValueRules/#{conversion_value_rule_id}" + end + + ## + # Create a fully-qualified ConversionValueRuleSet resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/conversionValueRuleSets/{conversion_value_rule_set_id}` + # + # @param customer_id [String] + # @param conversion_value_rule_set_id [String] + # + # @return [::String] + def conversion_value_rule_set_path customer_id:, conversion_value_rule_set_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/conversionValueRuleSets/#{conversion_value_rule_set_id}" + end + + ## + # Create a fully-qualified CurrencyConstant resource string. + # + # The resource will be in the following format: + # + # `currencyConstants/{code}` + # + # @param code [String] + # + # @return [::String] + def currency_constant_path code: + "currencyConstants/#{code}" + end + + ## + # Create a fully-qualified CustomAudience resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/customAudiences/{custom_audience_id}` + # + # @param customer_id [String] + # @param custom_audience_id [String] + # + # @return [::String] + def custom_audience_path customer_id:, custom_audience_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/customAudiences/#{custom_audience_id}" + end + + ## + # Create a fully-qualified CustomConversionGoal resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/customConversionGoals/{goal_id}` + # + # @param customer_id [String] + # @param goal_id [String] + # + # @return [::String] + def custom_conversion_goal_path customer_id:, goal_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/customConversionGoals/#{goal_id}" + end + + ## + # Create a fully-qualified CustomInterest resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/customInterests/{custom_interest_id}` + # + # @param customer_id [String] + # @param custom_interest_id [String] + # + # @return [::String] + def custom_interest_path customer_id:, custom_interest_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/customInterests/#{custom_interest_id}" + end + + ## + # Create a fully-qualified Customer resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}` + # + # @param customer_id [String] + # + # @return [::String] + def customer_path customer_id: + "customers/#{customer_id}" + end + + ## + # Create a fully-qualified CustomerAsset resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/customerAssets/{asset_id}~{field_type}` + # + # @param customer_id [String] + # @param asset_id [String] + # @param field_type [String] + # + # @return [::String] + def customer_asset_path customer_id:, asset_id:, field_type: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + raise ::ArgumentError, "asset_id cannot contain /" if asset_id.to_s.include? "/" + + "customers/#{customer_id}/customerAssets/#{asset_id}~#{field_type}" + end + + ## + # Create a fully-qualified CustomerAssetSet resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/customerAssetSets/{asset_set_id}` + # + # @param customer_id [String] + # @param asset_set_id [String] + # + # @return [::String] + def customer_asset_set_path customer_id:, asset_set_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/customerAssetSets/#{asset_set_id}" + end + + ## + # Create a fully-qualified CustomerClient resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/customerClients/{client_customer_id}` + # + # @param customer_id [String] + # @param client_customer_id [String] + # + # @return [::String] + def customer_client_path customer_id:, client_customer_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/customerClients/#{client_customer_id}" + end + + ## + # Create a fully-qualified CustomerClientLink resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/customerClientLinks/{client_customer_id}~{manager_link_id}` + # + # @param customer_id [String] + # @param client_customer_id [String] + # @param manager_link_id [String] + # + # @return [::String] + def customer_client_link_path customer_id:, client_customer_id:, manager_link_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + raise ::ArgumentError, "client_customer_id cannot contain /" if client_customer_id.to_s.include? "/" + + "customers/#{customer_id}/customerClientLinks/#{client_customer_id}~#{manager_link_id}" + end + + ## + # Create a fully-qualified CustomerConversionGoal resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/customerConversionGoals/{category}~{source}` + # + # @param customer_id [String] + # @param category [String] + # @param source [String] + # + # @return [::String] + def customer_conversion_goal_path customer_id:, category:, source: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + raise ::ArgumentError, "category cannot contain /" if category.to_s.include? "/" + + "customers/#{customer_id}/customerConversionGoals/#{category}~#{source}" + end + + ## + # Create a fully-qualified CustomerCustomizer resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/customerCustomizers/{customizer_attribute_id}` + # + # @param customer_id [String] + # @param customizer_attribute_id [String] + # + # @return [::String] + def customer_customizer_path customer_id:, customizer_attribute_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/customerCustomizers/#{customizer_attribute_id}" + end + + ## + # Create a fully-qualified CustomerLabel resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/customerLabels/{label_id}` + # + # @param customer_id [String] + # @param label_id [String] + # + # @return [::String] + def customer_label_path customer_id:, label_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/customerLabels/#{label_id}" + end + + ## + # Create a fully-qualified CustomerManagerLink resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/customerManagerLinks/{manager_customer_id}~{manager_link_id}` + # + # @param customer_id [String] + # @param manager_customer_id [String] + # @param manager_link_id [String] + # + # @return [::String] + def customer_manager_link_path customer_id:, manager_customer_id:, manager_link_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + raise ::ArgumentError, "manager_customer_id cannot contain /" if manager_customer_id.to_s.include? "/" + + "customers/#{customer_id}/customerManagerLinks/#{manager_customer_id}~#{manager_link_id}" + end + + ## + # Create a fully-qualified CustomerNegativeCriterion resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/customerNegativeCriteria/{criterion_id}` + # + # @param customer_id [String] + # @param criterion_id [String] + # + # @return [::String] + def customer_negative_criterion_path customer_id:, criterion_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/customerNegativeCriteria/#{criterion_id}" + end + + ## + # Create a fully-qualified CustomerSearchTermInsight resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/customerSearchTermInsights/{cluster_id}` + # + # @param customer_id [String] + # @param cluster_id [String] + # + # @return [::String] + def customer_search_term_insight_path customer_id:, cluster_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/customerSearchTermInsights/#{cluster_id}" + end + + ## + # Create a fully-qualified CustomerUserAccess resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/customerUserAccesses/{user_id}` + # + # @param customer_id [String] + # @param user_id [String] + # + # @return [::String] + def customer_user_access_path customer_id:, user_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/customerUserAccesses/#{user_id}" + end + + ## + # Create a fully-qualified CustomerUserAccessInvitation resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/customerUserAccessInvitations/{invitation_id}` + # + # @param customer_id [String] + # @param invitation_id [String] + # + # @return [::String] + def customer_user_access_invitation_path customer_id:, invitation_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/customerUserAccessInvitations/#{invitation_id}" + end + + ## + # Create a fully-qualified CustomizerAttribute resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/customizerAttributes/{customizer_attribute_id}` + # + # @param customer_id [String] + # @param customizer_attribute_id [String] + # + # @return [::String] + def customizer_attribute_path customer_id:, customizer_attribute_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/customizerAttributes/#{customizer_attribute_id}" + end + + ## + # Create a fully-qualified DataLink resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/dataLinks/{product_link_id}~{data_link_id}` + # + # @param customer_id [String] + # @param product_link_id [String] + # @param data_link_id [String] + # + # @return [::String] + def data_link_path customer_id:, product_link_id:, data_link_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + raise ::ArgumentError, "product_link_id cannot contain /" if product_link_id.to_s.include? "/" + + "customers/#{customer_id}/dataLinks/#{product_link_id}~#{data_link_id}" + end + + ## + # Create a fully-qualified DetailContentSuitabilityPlacementView resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/detailContentSuitabilityPlacementViews/{placement_fingerprint}` + # + # @param customer_id [String] + # @param placement_fingerprint [String] + # + # @return [::String] + def detail_content_suitability_placement_view_path customer_id:, placement_fingerprint: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/detailContentSuitabilityPlacementViews/#{placement_fingerprint}" + end + + ## + # Create a fully-qualified DetailPlacementView resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/detailPlacementViews/{ad_group_id}~{base64_placement}` + # + # @param customer_id [String] + # @param ad_group_id [String] + # @param base64_placement [String] + # + # @return [::String] + def detail_placement_view_path customer_id:, ad_group_id:, base64_placement: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + raise ::ArgumentError, "ad_group_id cannot contain /" if ad_group_id.to_s.include? "/" + + "customers/#{customer_id}/detailPlacementViews/#{ad_group_id}~#{base64_placement}" + end + + ## + # Create a fully-qualified DetailedDemographic resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/detailedDemographics/{detailed_demographic_id}` + # + # @param customer_id [String] + # @param detailed_demographic_id [String] + # + # @return [::String] + def detailed_demographic_path customer_id:, detailed_demographic_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/detailedDemographics/#{detailed_demographic_id}" + end + + ## + # Create a fully-qualified DisplayKeywordView resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/displayKeywordViews/{ad_group_id}~{criterion_id}` + # + # @param customer_id [String] + # @param ad_group_id [String] + # @param criterion_id [String] + # + # @return [::String] + def display_keyword_view_path customer_id:, ad_group_id:, criterion_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + raise ::ArgumentError, "ad_group_id cannot contain /" if ad_group_id.to_s.include? "/" + + "customers/#{customer_id}/displayKeywordViews/#{ad_group_id}~#{criterion_id}" + end + + ## + # Create a fully-qualified DistanceView resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/distanceViews/{placeholder_chain_id}~{distance_bucket}` + # + # @param customer_id [String] + # @param placeholder_chain_id [String] + # @param distance_bucket [String] + # + # @return [::String] + def distance_view_path customer_id:, placeholder_chain_id:, distance_bucket: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + raise ::ArgumentError, "placeholder_chain_id cannot contain /" if placeholder_chain_id.to_s.include? "/" + + "customers/#{customer_id}/distanceViews/#{placeholder_chain_id}~#{distance_bucket}" + end + + ## + # Create a fully-qualified DomainCategory resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/domainCategories/{campaign_id}~{base64_category}~{language_code}` + # + # @param customer_id [String] + # @param campaign_id [String] + # @param base64_category [String] + # @param language_code [String] + # + # @return [::String] + def domain_category_path customer_id:, campaign_id:, base64_category:, language_code: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + raise ::ArgumentError, "campaign_id cannot contain /" if campaign_id.to_s.include? "/" + raise ::ArgumentError, "base64_category cannot contain /" if base64_category.to_s.include? "/" + + "customers/#{customer_id}/domainCategories/#{campaign_id}~#{base64_category}~#{language_code}" + end + + ## + # Create a fully-qualified DynamicSearchAdsSearchTermView resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/dynamicSearchAdsSearchTermViews/{ad_group_id}~{search_term_fingerprint}~{headline_fingerprint}~{landing_page_fingerprint}~{page_url_fingerprint}` + # + # @param customer_id [String] + # @param ad_group_id [String] + # @param search_term_fingerprint [String] + # @param headline_fingerprint [String] + # @param landing_page_fingerprint [String] + # @param page_url_fingerprint [String] + # + # @return [::String] + def dynamic_search_ads_search_term_view_path customer_id:, ad_group_id:, search_term_fingerprint:, + headline_fingerprint:, landing_page_fingerprint:, page_url_fingerprint: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + raise ::ArgumentError, "ad_group_id cannot contain /" if ad_group_id.to_s.include? "/" + if search_term_fingerprint.to_s.include? "/" + raise ::ArgumentError, + "search_term_fingerprint cannot contain /" + end + raise ::ArgumentError, "headline_fingerprint cannot contain /" if headline_fingerprint.to_s.include? "/" + if landing_page_fingerprint.to_s.include? "/" + raise ::ArgumentError, + "landing_page_fingerprint cannot contain /" + end + + "customers/#{customer_id}/dynamicSearchAdsSearchTermViews/#{ad_group_id}~#{search_term_fingerprint}~#{headline_fingerprint}~#{landing_page_fingerprint}~#{page_url_fingerprint}" + end + + ## + # Create a fully-qualified ExpandedLandingPageView resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/expandedLandingPageViews/{expanded_final_url_fingerprint}` + # + # @param customer_id [String] + # @param expanded_final_url_fingerprint [String] + # + # @return [::String] + def expanded_landing_page_view_path customer_id:, expanded_final_url_fingerprint: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/expandedLandingPageViews/#{expanded_final_url_fingerprint}" + end + + ## + # Create a fully-qualified Experiment resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/experiments/{trial_id}` + # + # @param customer_id [String] + # @param trial_id [String] + # + # @return [::String] + def experiment_path customer_id:, trial_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/experiments/#{trial_id}" + end + + ## + # Create a fully-qualified ExperimentArm resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/experimentArms/{trial_id}~{trial_arm_id}` + # + # @param customer_id [String] + # @param trial_id [String] + # @param trial_arm_id [String] + # + # @return [::String] + def experiment_arm_path customer_id:, trial_id:, trial_arm_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + raise ::ArgumentError, "trial_id cannot contain /" if trial_id.to_s.include? "/" + + "customers/#{customer_id}/experimentArms/#{trial_id}~#{trial_arm_id}" + end + + ## + # Create a fully-qualified FinalUrlExpansionAssetView resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/finalUrlExpansionAssetViews/{campaign_id}~{asset_id}~{field_type}~{url_fp}` + # + # @param customer_id [String] + # @param campaign_id [String] + # @param asset_id [String] + # @param field_type [String] + # @param url_fp [String] + # + # @return [::String] + def final_url_expansion_asset_view_path customer_id:, campaign_id:, asset_id:, field_type:, url_fp: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + raise ::ArgumentError, "campaign_id cannot contain /" if campaign_id.to_s.include? "/" + raise ::ArgumentError, "asset_id cannot contain /" if asset_id.to_s.include? "/" + raise ::ArgumentError, "field_type cannot contain /" if field_type.to_s.include? "/" + + "customers/#{customer_id}/finalUrlExpansionAssetViews/#{campaign_id}~#{asset_id}~#{field_type}~#{url_fp}" + end + + ## + # Create a fully-qualified GenderView resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/genderViews/{ad_group_id}~{criterion_id}` + # + # @param customer_id [String] + # @param ad_group_id [String] + # @param criterion_id [String] + # + # @return [::String] + def gender_view_path customer_id:, ad_group_id:, criterion_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + raise ::ArgumentError, "ad_group_id cannot contain /" if ad_group_id.to_s.include? "/" + + "customers/#{customer_id}/genderViews/#{ad_group_id}~#{criterion_id}" + end + + ## + # Create a fully-qualified GeoTargetConstant resource string. + # + # The resource will be in the following format: + # + # `geoTargetConstants/{criterion_id}` + # + # @param criterion_id [String] + # + # @return [::String] + def geo_target_constant_path criterion_id: + "geoTargetConstants/#{criterion_id}" + end + + ## + # Create a fully-qualified GeographicView resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/geographicViews/{country_criterion_id}~{location_type}` + # + # @param customer_id [String] + # @param country_criterion_id [String] + # @param location_type [String] + # + # @return [::String] + def geographic_view_path customer_id:, country_criterion_id:, location_type: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + raise ::ArgumentError, "country_criterion_id cannot contain /" if country_criterion_id.to_s.include? "/" + + "customers/#{customer_id}/geographicViews/#{country_criterion_id}~#{location_type}" + end + + ## + # Create a fully-qualified Goal resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/goals/{unified_goal_id}` + # + # @param customer_id [String] + # @param unified_goal_id [String] + # + # @return [::String] + def goal_path customer_id:, unified_goal_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/goals/#{unified_goal_id}" + end + + ## + # Create a fully-qualified GroupContentSuitabilityPlacementView resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/groupContentSuitabilityPlacementViews/{placement_fingerprint}` + # + # @param customer_id [String] + # @param placement_fingerprint [String] + # + # @return [::String] + def group_content_suitability_placement_view_path customer_id:, placement_fingerprint: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/groupContentSuitabilityPlacementViews/#{placement_fingerprint}" + end + + ## + # Create a fully-qualified GroupPlacementView resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/groupPlacementViews/{ad_group_id}~{base64_placement}` + # + # @param customer_id [String] + # @param ad_group_id [String] + # @param base64_placement [String] + # + # @return [::String] + def group_placement_view_path customer_id:, ad_group_id:, base64_placement: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + raise ::ArgumentError, "ad_group_id cannot contain /" if ad_group_id.to_s.include? "/" + + "customers/#{customer_id}/groupPlacementViews/#{ad_group_id}~#{base64_placement}" + end + + ## + # Create a fully-qualified HotelGroupView resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/hotelGroupViews/{ad_group_id}~{criterion_id}` + # + # @param customer_id [String] + # @param ad_group_id [String] + # @param criterion_id [String] + # + # @return [::String] + def hotel_group_view_path customer_id:, ad_group_id:, criterion_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + raise ::ArgumentError, "ad_group_id cannot contain /" if ad_group_id.to_s.include? "/" + + "customers/#{customer_id}/hotelGroupViews/#{ad_group_id}~#{criterion_id}" + end + + ## + # Create a fully-qualified HotelPerformanceView resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/hotelPerformanceView` + # + # @param customer_id [String] + # + # @return [::String] + def hotel_performance_view_path customer_id: + "customers/#{customer_id}/hotelPerformanceView" + end + + ## + # Create a fully-qualified HotelReconciliation resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/hotelReconciliations/{commission_id}` + # + # @param customer_id [String] + # @param commission_id [String] + # + # @return [::String] + def hotel_reconciliation_path customer_id:, commission_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/hotelReconciliations/#{commission_id}" + end + + ## + # Create a fully-qualified IncomeRangeView resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/incomeRangeViews/{ad_group_id}~{criterion_id}` + # + # @param customer_id [String] + # @param ad_group_id [String] + # @param criterion_id [String] + # + # @return [::String] + def income_range_view_path customer_id:, ad_group_id:, criterion_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + raise ::ArgumentError, "ad_group_id cannot contain /" if ad_group_id.to_s.include? "/" + + "customers/#{customer_id}/incomeRangeViews/#{ad_group_id}~#{criterion_id}" + end + + ## + # Create a fully-qualified KeywordPlan resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/keywordPlans/{keyword_plan_id}` + # + # @param customer_id [String] + # @param keyword_plan_id [String] + # + # @return [::String] + def keyword_plan_path customer_id:, keyword_plan_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/keywordPlans/#{keyword_plan_id}" + end + + ## + # Create a fully-qualified KeywordPlanAdGroup resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/keywordPlanAdGroups/{keyword_plan_ad_group_id}` + # + # @param customer_id [String] + # @param keyword_plan_ad_group_id [String] + # + # @return [::String] + def keyword_plan_ad_group_path customer_id:, keyword_plan_ad_group_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/keywordPlanAdGroups/#{keyword_plan_ad_group_id}" + end + + ## + # Create a fully-qualified KeywordPlanAdGroupKeyword resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/keywordPlanAdGroupKeywords/{keyword_plan_ad_group_keyword_id}` + # + # @param customer_id [String] + # @param keyword_plan_ad_group_keyword_id [String] + # + # @return [::String] + def keyword_plan_ad_group_keyword_path customer_id:, keyword_plan_ad_group_keyword_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/keywordPlanAdGroupKeywords/#{keyword_plan_ad_group_keyword_id}" + end + + ## + # Create a fully-qualified KeywordPlanCampaign resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/keywordPlanCampaigns/{keyword_plan_campaign_id}` + # + # @param customer_id [String] + # @param keyword_plan_campaign_id [String] + # + # @return [::String] + def keyword_plan_campaign_path customer_id:, keyword_plan_campaign_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/keywordPlanCampaigns/#{keyword_plan_campaign_id}" + end + + ## + # Create a fully-qualified KeywordPlanCampaignKeyword resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/keywordPlanCampaignKeywords/{keyword_plan_campaign_keyword_id}` + # + # @param customer_id [String] + # @param keyword_plan_campaign_keyword_id [String] + # + # @return [::String] + def keyword_plan_campaign_keyword_path customer_id:, keyword_plan_campaign_keyword_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/keywordPlanCampaignKeywords/#{keyword_plan_campaign_keyword_id}" + end + + ## + # Create a fully-qualified KeywordThemeConstant resource string. + # + # The resource will be in the following format: + # + # `keywordThemeConstants/{express_category_id}~{express_sub_category_id}` + # + # @param express_category_id [String] + # @param express_sub_category_id [String] + # + # @return [::String] + def keyword_theme_constant_path express_category_id:, express_sub_category_id: + raise ::ArgumentError, "express_category_id cannot contain /" if express_category_id.to_s.include? "/" + + "keywordThemeConstants/#{express_category_id}~#{express_sub_category_id}" + end + + ## + # Create a fully-qualified KeywordView resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/keywordViews/{ad_group_id}~{criterion_id}` + # + # @param customer_id [String] + # @param ad_group_id [String] + # @param criterion_id [String] + # + # @return [::String] + def keyword_view_path customer_id:, ad_group_id:, criterion_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + raise ::ArgumentError, "ad_group_id cannot contain /" if ad_group_id.to_s.include? "/" + + "customers/#{customer_id}/keywordViews/#{ad_group_id}~#{criterion_id}" + end + + ## + # Create a fully-qualified Label resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/labels/{label_id}` + # + # @param customer_id [String] + # @param label_id [String] + # + # @return [::String] + def label_path customer_id:, label_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/labels/#{label_id}" + end + + ## + # Create a fully-qualified LandingPageView resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/landingPageViews/{unexpanded_final_url_fingerprint}` + # + # @param customer_id [String] + # @param unexpanded_final_url_fingerprint [String] + # + # @return [::String] + def landing_page_view_path customer_id:, unexpanded_final_url_fingerprint: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/landingPageViews/#{unexpanded_final_url_fingerprint}" + end + + ## + # Create a fully-qualified LanguageConstant resource string. + # + # The resource will be in the following format: + # + # `languageConstants/{criterion_id}` + # + # @param criterion_id [String] + # + # @return [::String] + def language_constant_path criterion_id: + "languageConstants/#{criterion_id}" + end + + ## + # Create a fully-qualified LeadFormSubmissionData resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/leadFormSubmissionData/{lead_form_user_submission_id}` + # + # @param customer_id [String] + # @param lead_form_user_submission_id [String] + # + # @return [::String] + def lead_form_submission_data_path customer_id:, lead_form_user_submission_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/leadFormSubmissionData/#{lead_form_user_submission_id}" + end + + ## + # Create a fully-qualified LifeEvent resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/lifeEvents/{life_event_id}` + # + # @param customer_id [String] + # @param life_event_id [String] + # + # @return [::String] + def life_event_path customer_id:, life_event_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/lifeEvents/#{life_event_id}" + end + + ## + # Create a fully-qualified LocalServicesEmployee resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/localServicesEmployees/{gls_employee_id}` + # + # @param customer_id [String] + # @param gls_employee_id [String] + # + # @return [::String] + def local_services_employee_path customer_id:, gls_employee_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/localServicesEmployees/#{gls_employee_id}" + end + + ## + # Create a fully-qualified LocalServicesLead resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/localServicesLeads/{local_services_lead_id}` + # + # @param customer_id [String] + # @param local_services_lead_id [String] + # + # @return [::String] + def local_services_lead_path customer_id:, local_services_lead_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/localServicesLeads/#{local_services_lead_id}" + end + + ## + # Create a fully-qualified LocalServicesLeadConversation resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/localServicesLeadConversations/{local_services_lead_conversation_id}` + # + # @param customer_id [String] + # @param local_services_lead_conversation_id [String] + # + # @return [::String] + def local_services_lead_conversation_path customer_id:, local_services_lead_conversation_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/localServicesLeadConversations/#{local_services_lead_conversation_id}" + end + + ## + # Create a fully-qualified LocalServicesVerificationArtifact resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/localServicesVerificationArtifacts/{gls_verification_artifact_id}` + # + # @param customer_id [String] + # @param gls_verification_artifact_id [String] + # + # @return [::String] + def local_services_verification_artifact_path customer_id:, gls_verification_artifact_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/localServicesVerificationArtifacts/#{gls_verification_artifact_id}" + end + + ## + # Create a fully-qualified LocationInterestView resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/locationInterestViews/{campaign_id}~{ad_group_id}~{criterion_id}` + # + # @param customer_id [String] + # @param campaign_id [String] + # @param ad_group_id [String] + # @param criterion_id [String] + # + # @return [::String] + def location_interest_view_path customer_id:, campaign_id:, ad_group_id:, criterion_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + raise ::ArgumentError, "campaign_id cannot contain /" if campaign_id.to_s.include? "/" + raise ::ArgumentError, "ad_group_id cannot contain /" if ad_group_id.to_s.include? "/" + + "customers/#{customer_id}/locationInterestViews/#{campaign_id}~#{ad_group_id}~#{criterion_id}" + end + + ## + # Create a fully-qualified LocationView resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/locationViews/{campaign_id}~{criterion_id}` + # + # @param customer_id [String] + # @param campaign_id [String] + # @param criterion_id [String] + # + # @return [::String] + def location_view_path customer_id:, campaign_id:, criterion_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + raise ::ArgumentError, "campaign_id cannot contain /" if campaign_id.to_s.include? "/" + + "customers/#{customer_id}/locationViews/#{campaign_id}~#{criterion_id}" + end + + ## + # Create a fully-qualified ManagedPlacementView resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/managedPlacementViews/{ad_group_id}~{criterion_id}` + # + # @param customer_id [String] + # @param ad_group_id [String] + # @param criterion_id [String] + # + # @return [::String] + def managed_placement_view_path customer_id:, ad_group_id:, criterion_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + raise ::ArgumentError, "ad_group_id cannot contain /" if ad_group_id.to_s.include? "/" + + "customers/#{customer_id}/managedPlacementViews/#{ad_group_id}~#{criterion_id}" + end + + ## + # Create a fully-qualified MatchedLocationInterestView resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/matchedLocationInterestViews/{country_criterion_id}` + # + # @param customer_id [String] + # @param country_criterion_id [String] + # + # @return [::String] + def matched_location_interest_view_path customer_id:, country_criterion_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/matchedLocationInterestViews/#{country_criterion_id}" + end + + ## + # Create a fully-qualified MediaFile resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/mediaFiles/{media_file_id}` + # + # @param customer_id [String] + # @param media_file_id [String] + # + # @return [::String] + def media_file_path customer_id:, media_file_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/mediaFiles/#{media_file_id}" + end + + ## + # Create a fully-qualified MobileAppCategoryConstant resource string. + # + # The resource will be in the following format: + # + # `mobileAppCategoryConstants/{mobile_app_category_id}` + # + # @param mobile_app_category_id [String] + # + # @return [::String] + def mobile_app_category_constant_path mobile_app_category_id: + "mobileAppCategoryConstants/#{mobile_app_category_id}" + end + + ## + # Create a fully-qualified MobileDeviceConstant resource string. + # + # The resource will be in the following format: + # + # `mobileDeviceConstants/{criterion_id}` + # + # @param criterion_id [String] + # + # @return [::String] + def mobile_device_constant_path criterion_id: + "mobileDeviceConstants/#{criterion_id}" + end + + ## + # Create a fully-qualified MultiPartyAuthReview resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/multiPartyAuthReviews/{customer_invitation_id}` + # + # @param customer_id [String] + # @param customer_invitation_id [String] + # + # @return [::String] + def multi_party_auth_review_path customer_id:, customer_invitation_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/multiPartyAuthReviews/#{customer_invitation_id}" + end + + ## + # Create a fully-qualified OfflineConversionUploadClientSummary resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/offlineConversionUploadClientSummaries/{client}` + # + # @param customer_id [String] + # @param client [String] + # + # @return [::String] + def offline_conversion_upload_client_summary_path customer_id:, client: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/offlineConversionUploadClientSummaries/#{client}" + end + + ## + # Create a fully-qualified OfflineConversionUploadConversionActionSummary resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/offlineConversionUploadConversionActionSummaries/{conversion_type_id}~{client}` + # + # @param customer_id [String] + # @param conversion_type_id [String] + # @param client [String] + # + # @return [::String] + def offline_conversion_upload_conversion_action_summary_path customer_id:, conversion_type_id:, client: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + raise ::ArgumentError, "conversion_type_id cannot contain /" if conversion_type_id.to_s.include? "/" + + "customers/#{customer_id}/offlineConversionUploadConversionActionSummaries/#{conversion_type_id}~#{client}" + end + + ## + # Create a fully-qualified OfflineUserDataJob resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/offlineUserDataJobs/{offline_user_data_update_id}` + # + # @param customer_id [String] + # @param offline_user_data_update_id [String] + # + # @return [::String] + def offline_user_data_job_path customer_id:, offline_user_data_update_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/offlineUserDataJobs/#{offline_user_data_update_id}" + end + + ## + # Create a fully-qualified OperatingSystemVersionConstant resource string. + # + # The resource will be in the following format: + # + # `operatingSystemVersionConstants/{criterion_id}` + # + # @param criterion_id [String] + # + # @return [::String] + def operating_system_version_constant_path criterion_id: + "operatingSystemVersionConstants/#{criterion_id}" + end + + ## + # Create a fully-qualified PaidOrganicSearchTermView resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/paidOrganicSearchTermViews/{campaign_id}~{ad_group_id}~{base64_search_term}` + # + # @param customer_id [String] + # @param campaign_id [String] + # @param ad_group_id [String] + # @param base64_search_term [String] + # + # @return [::String] + def paid_organic_search_term_view_path customer_id:, campaign_id:, ad_group_id:, base64_search_term: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + raise ::ArgumentError, "campaign_id cannot contain /" if campaign_id.to_s.include? "/" + raise ::ArgumentError, "ad_group_id cannot contain /" if ad_group_id.to_s.include? "/" + + "customers/#{customer_id}/paidOrganicSearchTermViews/#{campaign_id}~#{ad_group_id}~#{base64_search_term}" + end + + ## + # Create a fully-qualified ParentalStatusView resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/parentalStatusViews/{ad_group_id}~{criterion_id}` + # + # @param customer_id [String] + # @param ad_group_id [String] + # @param criterion_id [String] + # + # @return [::String] + def parental_status_view_path customer_id:, ad_group_id:, criterion_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + raise ::ArgumentError, "ad_group_id cannot contain /" if ad_group_id.to_s.include? "/" + + "customers/#{customer_id}/parentalStatusViews/#{ad_group_id}~#{criterion_id}" + end + + ## + # Create a fully-qualified PaymentsAccount resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/paymentsAccounts/{payments_account_id}` + # + # @param customer_id [String] + # @param payments_account_id [String] + # + # @return [::String] + def payments_account_path customer_id:, payments_account_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/paymentsAccounts/#{payments_account_id}" + end + + ## + # Create a fully-qualified PerStoreView resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/perStoreViews/{place_id}` + # + # @param customer_id [String] + # @param place_id [String] + # + # @return [::String] + def per_store_view_path customer_id:, place_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/perStoreViews/#{place_id}" + end + + ## + # Create a fully-qualified PerformanceMaxPlacementView resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/performanceMaxPlacementViews/{base_64_placement}` + # + # @param customer_id [String] + # @param base_64_placement [String] + # + # @return [::String] + def performance_max_placement_view_path customer_id:, base_64_placement: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/performanceMaxPlacementViews/#{base_64_placement}" + end + + ## + # Create a fully-qualified ProductCategoryConstant resource string. + # + # The resource will be in the following format: + # + # `productCategoryConstants/{level}~{category_id}` + # + # @param level [String] + # @param category_id [String] + # + # @return [::String] + def product_category_constant_path level:, category_id: + raise ::ArgumentError, "level cannot contain /" if level.to_s.include? "/" + + "productCategoryConstants/#{level}~#{category_id}" + end + + ## + # Create a fully-qualified ProductGroupView resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/productGroupViews/{adgroup_id}~{criterion_id}` + # + # @param customer_id [String] + # @param adgroup_id [String] + # @param criterion_id [String] + # + # @return [::String] + def product_group_view_path customer_id:, adgroup_id:, criterion_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + raise ::ArgumentError, "adgroup_id cannot contain /" if adgroup_id.to_s.include? "/" + + "customers/#{customer_id}/productGroupViews/#{adgroup_id}~#{criterion_id}" + end + + ## + # Create a fully-qualified ProductLink resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/productLinks/{product_link_id}` + # + # @param customer_id [String] + # @param product_link_id [String] + # + # @return [::String] + def product_link_path customer_id:, product_link_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/productLinks/#{product_link_id}" + end + + ## + # Create a fully-qualified ProductLinkInvitation resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/productLinkInvitations/{customer_invitation_id}` + # + # @param customer_id [String] + # @param customer_invitation_id [String] + # + # @return [::String] + def product_link_invitation_path customer_id:, customer_invitation_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/productLinkInvitations/#{customer_invitation_id}" + end + + ## + # Create a fully-qualified QualifyingQuestion resource string. + # + # The resource will be in the following format: + # + # `qualifyingQuestions/{qualifying_question_id}` + # + # @param qualifying_question_id [String] + # + # @return [::String] + def qualifying_question_path qualifying_question_id: + "qualifyingQuestions/#{qualifying_question_id}" + end + + ## + # Create a fully-qualified Recommendation resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/recommendations/{recommendation_id}` + # + # @param customer_id [String] + # @param recommendation_id [String] + # + # @return [::String] + def recommendation_path customer_id:, recommendation_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/recommendations/#{recommendation_id}" + end + + ## + # Create a fully-qualified RecommendationSubscription resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/recommendationSubscriptions/{recommendation_type}` + # + # @param customer_id [String] + # @param recommendation_type [String] + # + # @return [::String] + def recommendation_subscription_path customer_id:, recommendation_type: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/recommendationSubscriptions/#{recommendation_type}" + end + + ## + # Create a fully-qualified RemarketingAction resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/remarketingActions/{remarketing_action_id}` + # + # @param customer_id [String] + # @param remarketing_action_id [String] + # + # @return [::String] + def remarketing_action_path customer_id:, remarketing_action_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/remarketingActions/#{remarketing_action_id}" + end + + ## + # Create a fully-qualified SearchTermView resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/searchTermViews/{campaign_id}~{ad_group_id}~{query}` + # + # @param customer_id [String] + # @param campaign_id [String] + # @param ad_group_id [String] + # @param query [String] + # + # @return [::String] + def search_term_view_path customer_id:, campaign_id:, ad_group_id:, query: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + raise ::ArgumentError, "campaign_id cannot contain /" if campaign_id.to_s.include? "/" + raise ::ArgumentError, "ad_group_id cannot contain /" if ad_group_id.to_s.include? "/" + + "customers/#{customer_id}/searchTermViews/#{campaign_id}~#{ad_group_id}~#{query}" + end + + ## + # Create a fully-qualified SharedCriterion resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/sharedCriteria/{shared_set_id}~{criterion_id}` + # + # @param customer_id [String] + # @param shared_set_id [String] + # @param criterion_id [String] + # + # @return [::String] + def shared_criterion_path customer_id:, shared_set_id:, criterion_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + raise ::ArgumentError, "shared_set_id cannot contain /" if shared_set_id.to_s.include? "/" + + "customers/#{customer_id}/sharedCriteria/#{shared_set_id}~#{criterion_id}" + end + + ## + # Create a fully-qualified SharedSet resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/sharedSets/{shared_set_id}` + # + # @param customer_id [String] + # @param shared_set_id [String] + # + # @return [::String] + def shared_set_path customer_id:, shared_set_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/sharedSets/#{shared_set_id}" + end + + ## + # Create a fully-qualified ShoppingPerformanceView resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/shoppingPerformanceView` + # + # @param customer_id [String] + # + # @return [::String] + def shopping_performance_view_path customer_id: + "customers/#{customer_id}/shoppingPerformanceView" + end + + ## + # Create a fully-qualified ShoppingProduct resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/shoppingProducts/{merchant_center_id}~{channel}~{language_code}~{feed_label}~{item_id}` + # + # @param customer_id [String] + # @param merchant_center_id [String] + # @param channel [String] + # @param language_code [String] + # @param feed_label [String] + # @param item_id [String] + # + # @return [::String] + def shopping_product_path customer_id:, merchant_center_id:, channel:, language_code:, feed_label:, + item_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + raise ::ArgumentError, "merchant_center_id cannot contain /" if merchant_center_id.to_s.include? "/" + raise ::ArgumentError, "channel cannot contain /" if channel.to_s.include? "/" + raise ::ArgumentError, "language_code cannot contain /" if language_code.to_s.include? "/" + raise ::ArgumentError, "feed_label cannot contain /" if feed_label.to_s.include? "/" + + "customers/#{customer_id}/shoppingProducts/#{merchant_center_id}~#{channel}~#{language_code}~#{feed_label}~#{item_id}" + end + + ## + # Create a fully-qualified SmartCampaignSearchTermView resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/smartCampaignSearchTermViews/{campaign_id}~{query}` + # + # @param customer_id [String] + # @param campaign_id [String] + # @param query [String] + # + # @return [::String] + def smart_campaign_search_term_view_path customer_id:, campaign_id:, query: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + raise ::ArgumentError, "campaign_id cannot contain /" if campaign_id.to_s.include? "/" + + "customers/#{customer_id}/smartCampaignSearchTermViews/#{campaign_id}~#{query}" + end + + ## + # Create a fully-qualified SmartCampaignSetting resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/smartCampaignSettings/{campaign_id}` + # + # @param customer_id [String] + # @param campaign_id [String] + # + # @return [::String] + def smart_campaign_setting_path customer_id:, campaign_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/smartCampaignSettings/#{campaign_id}" + end + + ## + # Create a fully-qualified TargetingExpansionView resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/targetingExpansionViews/{campaign_id}~{targeting_expansion_type}` + # + # @param customer_id [String] + # @param campaign_id [String] + # @param targeting_expansion_type [String] + # + # @return [::String] + def targeting_expansion_view_path customer_id:, campaign_id:, targeting_expansion_type: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + raise ::ArgumentError, "campaign_id cannot contain /" if campaign_id.to_s.include? "/" + + "customers/#{customer_id}/targetingExpansionViews/#{campaign_id}~#{targeting_expansion_type}" + end + + ## + # Create a fully-qualified ThirdPartyAppAnalyticsLink resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/thirdPartyAppAnalyticsLinks/{customer_link_id}` + # + # @param customer_id [String] + # @param customer_link_id [String] + # + # @return [::String] + def third_party_app_analytics_link_path customer_id:, customer_link_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/thirdPartyAppAnalyticsLinks/#{customer_link_id}" + end + + ## + # Create a fully-qualified TopicConstant resource string. + # + # The resource will be in the following format: + # + # `topicConstants/{topic_id}` + # + # @param topic_id [String] + # + # @return [::String] + def topic_constant_path topic_id: + "topicConstants/#{topic_id}" + end + + ## + # Create a fully-qualified TopicView resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/topicViews/{ad_group_id}~{criterion_id}` + # + # @param customer_id [String] + # @param ad_group_id [String] + # @param criterion_id [String] + # + # @return [::String] + def topic_view_path customer_id:, ad_group_id:, criterion_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + raise ::ArgumentError, "ad_group_id cannot contain /" if ad_group_id.to_s.include? "/" + + "customers/#{customer_id}/topicViews/#{ad_group_id}~#{criterion_id}" + end + + ## + # Create a fully-qualified TravelActivityGroupView resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/travelActivityGroupViews/{ad_group_id}~{criterion_id}` + # + # @param customer_id [String] + # @param ad_group_id [String] + # @param criterion_id [String] + # + # @return [::String] + def travel_activity_group_view_path customer_id:, ad_group_id:, criterion_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + raise ::ArgumentError, "ad_group_id cannot contain /" if ad_group_id.to_s.include? "/" + + "customers/#{customer_id}/travelActivityGroupViews/#{ad_group_id}~#{criterion_id}" + end + + ## + # Create a fully-qualified TravelActivityPerformanceView resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/travelActivityPerformanceViews` + # + # @param customer_id [String] + # + # @return [::String] + def travel_activity_performance_view_path customer_id: + "customers/#{customer_id}/travelActivityPerformanceViews" + end + + ## + # Create a fully-qualified UserInterest resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/userInterests/{user_interest_id}` + # + # @param customer_id [String] + # @param user_interest_id [String] + # + # @return [::String] + def user_interest_path customer_id:, user_interest_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/userInterests/#{user_interest_id}" + end + + ## + # Create a fully-qualified UserList resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/userLists/{user_list_id}` + # + # @param customer_id [String] + # @param user_list_id [String] + # + # @return [::String] + def user_list_path customer_id:, user_list_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/userLists/#{user_list_id}" + end + + ## + # Create a fully-qualified UserListCustomerType resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/userListCustomerTypes/{user_list_id}~{semantic_label}` + # + # @param customer_id [String] + # @param user_list_id [String] + # @param semantic_label [String] + # + # @return [::String] + def user_list_customer_type_path customer_id:, user_list_id:, semantic_label: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + raise ::ArgumentError, "user_list_id cannot contain /" if user_list_id.to_s.include? "/" + + "customers/#{customer_id}/userListCustomerTypes/#{user_list_id}~#{semantic_label}" + end + + ## + # Create a fully-qualified UserLocationView resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/userLocationViews/{country_criterion_id}~{is_targeting_location}` + # + # @param customer_id [String] + # @param country_criterion_id [String] + # @param is_targeting_location [String] + # + # @return [::String] + def user_location_view_path customer_id:, country_criterion_id:, is_targeting_location: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + raise ::ArgumentError, "country_criterion_id cannot contain /" if country_criterion_id.to_s.include? "/" + + "customers/#{customer_id}/userLocationViews/#{country_criterion_id}~#{is_targeting_location}" + end + + ## + # Create a fully-qualified Video resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/videos/{video_id}` + # + # @param customer_id [String] + # @param video_id [String] + # + # @return [::String] + def video_path customer_id:, video_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/videos/#{video_id}" + end + + ## + # Create a fully-qualified VideoEnhancement resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/videoEnhancements/{video_enhancement}` + # + # @param customer_id [String] + # @param video_enhancement [String] + # + # @return [::String] + def video_enhancement_path customer_id:, video_enhancement: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/videoEnhancements/#{video_enhancement}" + end + + ## + # Create a fully-qualified WebpageView resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/webpageViews/{ad_group_id}~{criterion_id}` + # + # @param customer_id [String] + # @param ad_group_id [String] + # @param criterion_id [String] + # + # @return [::String] + def webpage_view_path customer_id:, ad_group_id:, criterion_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + raise ::ArgumentError, "ad_group_id cannot contain /" if ad_group_id.to_s.include? "/" + + "customers/#{customer_id}/webpageViews/#{ad_group_id}~#{criterion_id}" + end + + ## + # Create a fully-qualified YouTubeVideoUpload resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/youTubeVideoUploads/{video_upload_id}` + # + # @param customer_id [String] + # @param video_upload_id [String] + # + # @return [::String] + def you_tube_video_upload_path customer_id:, video_upload_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/youTubeVideoUploads/#{video_upload_id}" + end + + extend self + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/google_ads_service_pb.rb b/lib/google/ads/google_ads/v25/services/google_ads_service_pb.rb new file mode 100644 index 000000000..8065feab3 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/google_ads_service_pb.rb @@ -0,0 +1,289 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/services/google_ads_service.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/actions/book_campaigns_pb' +require 'google/ads/google_ads/v25/actions/quote_campaigns_pb' +require 'google/ads/google_ads/v25/common/metrics_pb' +require 'google/ads/google_ads/v25/common/segments_pb' +require 'google/ads/google_ads/v25/enums/response_content_type_pb' +require 'google/ads/google_ads/v25/enums/summary_row_setting_pb' +require 'google/ads/google_ads/v25/resources/accessible_bidding_strategy_pb' +require 'google/ads/google_ads/v25/resources/account_budget_pb' +require 'google/ads/google_ads/v25/resources/account_budget_proposal_pb' +require 'google/ads/google_ads/v25/resources/account_link_pb' +require 'google/ads/google_ads/v25/resources/ad_pb' +require 'google/ads/google_ads/v25/resources/ad_group_pb' +require 'google/ads/google_ads/v25/resources/ad_group_ad_pb' +require 'google/ads/google_ads/v25/resources/ad_group_ad_asset_combination_view_pb' +require 'google/ads/google_ads/v25/resources/ad_group_ad_asset_view_pb' +require 'google/ads/google_ads/v25/resources/ad_group_ad_label_pb' +require 'google/ads/google_ads/v25/resources/ad_group_asset_pb' +require 'google/ads/google_ads/v25/resources/ad_group_asset_set_pb' +require 'google/ads/google_ads/v25/resources/ad_group_audience_view_pb' +require 'google/ads/google_ads/v25/resources/ad_group_bid_modifier_pb' +require 'google/ads/google_ads/v25/resources/ad_group_criterion_pb' +require 'google/ads/google_ads/v25/resources/ad_group_criterion_customizer_pb' +require 'google/ads/google_ads/v25/resources/ad_group_criterion_label_pb' +require 'google/ads/google_ads/v25/resources/ad_group_criterion_simulation_pb' +require 'google/ads/google_ads/v25/resources/ad_group_customizer_pb' +require 'google/ads/google_ads/v25/resources/ad_group_label_pb' +require 'google/ads/google_ads/v25/resources/ad_group_simulation_pb' +require 'google/ads/google_ads/v25/resources/ad_parameter_pb' +require 'google/ads/google_ads/v25/resources/ad_schedule_view_pb' +require 'google/ads/google_ads/v25/resources/age_range_view_pb' +require 'google/ads/google_ads/v25/resources/ai_max_search_term_ad_combination_view_pb' +require 'google/ads/google_ads/v25/resources/android_privacy_shared_key_google_ad_group_pb' +require 'google/ads/google_ads/v25/resources/android_privacy_shared_key_google_campaign_pb' +require 'google/ads/google_ads/v25/resources/android_privacy_shared_key_google_network_type_pb' +require 'google/ads/google_ads/v25/resources/app_top_combination_view_pb' +require 'google/ads/google_ads/v25/resources/applied_incentive_pb' +require 'google/ads/google_ads/v25/resources/asset_pb' +require 'google/ads/google_ads/v25/resources/asset_field_type_view_pb' +require 'google/ads/google_ads/v25/resources/asset_group_pb' +require 'google/ads/google_ads/v25/resources/asset_group_asset_pb' +require 'google/ads/google_ads/v25/resources/asset_group_listing_group_filter_pb' +require 'google/ads/google_ads/v25/resources/asset_group_product_group_view_pb' +require 'google/ads/google_ads/v25/resources/asset_group_signal_pb' +require 'google/ads/google_ads/v25/resources/asset_group_top_combination_view_pb' +require 'google/ads/google_ads/v25/resources/asset_set_pb' +require 'google/ads/google_ads/v25/resources/asset_set_asset_pb' +require 'google/ads/google_ads/v25/resources/asset_set_type_view_pb' +require 'google/ads/google_ads/v25/resources/audience_pb' +require 'google/ads/google_ads/v25/resources/batch_job_pb' +require 'google/ads/google_ads/v25/resources/bidding_data_exclusion_pb' +require 'google/ads/google_ads/v25/resources/bidding_seasonality_adjustment_pb' +require 'google/ads/google_ads/v25/resources/bidding_strategy_pb' +require 'google/ads/google_ads/v25/resources/bidding_strategy_simulation_pb' +require 'google/ads/google_ads/v25/resources/billing_setup_pb' +require 'google/ads/google_ads/v25/resources/call_view_pb' +require 'google/ads/google_ads/v25/resources/campaign_pb' +require 'google/ads/google_ads/v25/resources/campaign_aggregate_asset_view_pb' +require 'google/ads/google_ads/v25/resources/campaign_asset_pb' +require 'google/ads/google_ads/v25/resources/campaign_asset_set_pb' +require 'google/ads/google_ads/v25/resources/campaign_audience_view_pb' +require 'google/ads/google_ads/v25/resources/campaign_bid_modifier_pb' +require 'google/ads/google_ads/v25/resources/campaign_budget_pb' +require 'google/ads/google_ads/v25/resources/campaign_conversion_goal_pb' +require 'google/ads/google_ads/v25/resources/campaign_criterion_pb' +require 'google/ads/google_ads/v25/resources/campaign_customizer_pb' +require 'google/ads/google_ads/v25/resources/campaign_draft_pb' +require 'google/ads/google_ads/v25/resources/campaign_goal_config_pb' +require 'google/ads/google_ads/v25/resources/campaign_group_pb' +require 'google/ads/google_ads/v25/resources/campaign_label_pb' +require 'google/ads/google_ads/v25/resources/campaign_search_term_insight_pb' +require 'google/ads/google_ads/v25/resources/campaign_search_term_view_pb' +require 'google/ads/google_ads/v25/resources/campaign_shared_set_pb' +require 'google/ads/google_ads/v25/resources/campaign_simulation_pb' +require 'google/ads/google_ads/v25/resources/carrier_constant_pb' +require 'google/ads/google_ads/v25/resources/cart_data_sales_view_pb' +require 'google/ads/google_ads/v25/resources/change_event_pb' +require 'google/ads/google_ads/v25/resources/change_status_pb' +require 'google/ads/google_ads/v25/resources/channel_aggregate_asset_view_pb' +require 'google/ads/google_ads/v25/resources/click_view_pb' +require 'google/ads/google_ads/v25/resources/combined_audience_pb' +require 'google/ads/google_ads/v25/resources/content_criterion_view_pb' +require 'google/ads/google_ads/v25/resources/conversion_action_pb' +require 'google/ads/google_ads/v25/resources/conversion_custom_variable_pb' +require 'google/ads/google_ads/v25/resources/conversion_goal_campaign_config_pb' +require 'google/ads/google_ads/v25/resources/conversion_value_rule_pb' +require 'google/ads/google_ads/v25/resources/conversion_value_rule_set_pb' +require 'google/ads/google_ads/v25/resources/currency_constant_pb' +require 'google/ads/google_ads/v25/resources/custom_audience_pb' +require 'google/ads/google_ads/v25/resources/custom_conversion_goal_pb' +require 'google/ads/google_ads/v25/resources/custom_interest_pb' +require 'google/ads/google_ads/v25/resources/customer_pb' +require 'google/ads/google_ads/v25/resources/customer_asset_pb' +require 'google/ads/google_ads/v25/resources/customer_asset_set_pb' +require 'google/ads/google_ads/v25/resources/customer_client_pb' +require 'google/ads/google_ads/v25/resources/customer_client_link_pb' +require 'google/ads/google_ads/v25/resources/customer_conversion_goal_pb' +require 'google/ads/google_ads/v25/resources/customer_customizer_pb' +require 'google/ads/google_ads/v25/resources/customer_label_pb' +require 'google/ads/google_ads/v25/resources/customer_manager_link_pb' +require 'google/ads/google_ads/v25/resources/customer_negative_criterion_pb' +require 'google/ads/google_ads/v25/resources/customer_search_term_insight_pb' +require 'google/ads/google_ads/v25/resources/customer_user_access_pb' +require 'google/ads/google_ads/v25/resources/customer_user_access_invitation_pb' +require 'google/ads/google_ads/v25/resources/customizer_attribute_pb' +require 'google/ads/google_ads/v25/resources/data_link_pb' +require 'google/ads/google_ads/v25/resources/detail_content_suitability_placement_view_pb' +require 'google/ads/google_ads/v25/resources/detail_placement_view_pb' +require 'google/ads/google_ads/v25/resources/detailed_demographic_pb' +require 'google/ads/google_ads/v25/resources/display_keyword_view_pb' +require 'google/ads/google_ads/v25/resources/distance_view_pb' +require 'google/ads/google_ads/v25/resources/domain_category_pb' +require 'google/ads/google_ads/v25/resources/dynamic_search_ads_search_term_view_pb' +require 'google/ads/google_ads/v25/resources/expanded_landing_page_view_pb' +require 'google/ads/google_ads/v25/resources/experiment_pb' +require 'google/ads/google_ads/v25/resources/experiment_arm_pb' +require 'google/ads/google_ads/v25/resources/final_url_expansion_asset_view_pb' +require 'google/ads/google_ads/v25/resources/gender_view_pb' +require 'google/ads/google_ads/v25/resources/geo_target_constant_pb' +require 'google/ads/google_ads/v25/resources/geographic_view_pb' +require 'google/ads/google_ads/v25/resources/goal_pb' +require 'google/ads/google_ads/v25/resources/group_content_suitability_placement_view_pb' +require 'google/ads/google_ads/v25/resources/group_placement_view_pb' +require 'google/ads/google_ads/v25/resources/hotel_group_view_pb' +require 'google/ads/google_ads/v25/resources/hotel_performance_view_pb' +require 'google/ads/google_ads/v25/resources/hotel_reconciliation_pb' +require 'google/ads/google_ads/v25/resources/income_range_view_pb' +require 'google/ads/google_ads/v25/resources/keyword_plan_pb' +require 'google/ads/google_ads/v25/resources/keyword_plan_ad_group_pb' +require 'google/ads/google_ads/v25/resources/keyword_plan_ad_group_keyword_pb' +require 'google/ads/google_ads/v25/resources/keyword_plan_campaign_pb' +require 'google/ads/google_ads/v25/resources/keyword_plan_campaign_keyword_pb' +require 'google/ads/google_ads/v25/resources/keyword_theme_constant_pb' +require 'google/ads/google_ads/v25/resources/keyword_view_pb' +require 'google/ads/google_ads/v25/resources/label_pb' +require 'google/ads/google_ads/v25/resources/landing_page_view_pb' +require 'google/ads/google_ads/v25/resources/language_constant_pb' +require 'google/ads/google_ads/v25/resources/lead_form_submission_data_pb' +require 'google/ads/google_ads/v25/resources/life_event_pb' +require 'google/ads/google_ads/v25/resources/local_services_employee_pb' +require 'google/ads/google_ads/v25/resources/local_services_lead_pb' +require 'google/ads/google_ads/v25/resources/local_services_lead_conversation_pb' +require 'google/ads/google_ads/v25/resources/local_services_verification_artifact_pb' +require 'google/ads/google_ads/v25/resources/location_interest_view_pb' +require 'google/ads/google_ads/v25/resources/location_view_pb' +require 'google/ads/google_ads/v25/resources/managed_placement_view_pb' +require 'google/ads/google_ads/v25/resources/matched_location_interest_view_pb' +require 'google/ads/google_ads/v25/resources/media_file_pb' +require 'google/ads/google_ads/v25/resources/mobile_app_category_constant_pb' +require 'google/ads/google_ads/v25/resources/mobile_device_constant_pb' +require 'google/ads/google_ads/v25/resources/multi_party_auth_review_pb' +require 'google/ads/google_ads/v25/resources/offline_conversion_upload_client_summary_pb' +require 'google/ads/google_ads/v25/resources/offline_conversion_upload_conversion_action_summary_pb' +require 'google/ads/google_ads/v25/resources/offline_user_data_job_pb' +require 'google/ads/google_ads/v25/resources/operating_system_version_constant_pb' +require 'google/ads/google_ads/v25/resources/paid_organic_search_term_view_pb' +require 'google/ads/google_ads/v25/resources/parental_status_view_pb' +require 'google/ads/google_ads/v25/resources/per_store_view_pb' +require 'google/ads/google_ads/v25/resources/performance_max_placement_view_pb' +require 'google/ads/google_ads/v25/resources/product_category_constant_pb' +require 'google/ads/google_ads/v25/resources/product_group_view_pb' +require 'google/ads/google_ads/v25/resources/product_link_pb' +require 'google/ads/google_ads/v25/resources/product_link_invitation_pb' +require 'google/ads/google_ads/v25/resources/qualifying_question_pb' +require 'google/ads/google_ads/v25/resources/recommendation_pb' +require 'google/ads/google_ads/v25/resources/recommendation_subscription_pb' +require 'google/ads/google_ads/v25/resources/remarketing_action_pb' +require 'google/ads/google_ads/v25/resources/search_term_view_pb' +require 'google/ads/google_ads/v25/resources/shared_criterion_pb' +require 'google/ads/google_ads/v25/resources/shared_set_pb' +require 'google/ads/google_ads/v25/resources/shopping_performance_view_pb' +require 'google/ads/google_ads/v25/resources/shopping_product_pb' +require 'google/ads/google_ads/v25/resources/smart_campaign_search_term_view_pb' +require 'google/ads/google_ads/v25/resources/smart_campaign_setting_pb' +require 'google/ads/google_ads/v25/resources/targeting_expansion_view_pb' +require 'google/ads/google_ads/v25/resources/third_party_app_analytics_link_pb' +require 'google/ads/google_ads/v25/resources/topic_constant_pb' +require 'google/ads/google_ads/v25/resources/topic_view_pb' +require 'google/ads/google_ads/v25/resources/travel_activity_group_view_pb' +require 'google/ads/google_ads/v25/resources/travel_activity_performance_view_pb' +require 'google/ads/google_ads/v25/resources/user_interest_pb' +require 'google/ads/google_ads/v25/resources/user_list_pb' +require 'google/ads/google_ads/v25/resources/user_list_customer_type_pb' +require 'google/ads/google_ads/v25/resources/user_location_view_pb' +require 'google/ads/google_ads/v25/resources/video_pb' +require 'google/ads/google_ads/v25/resources/video_enhancement_pb' +require 'google/ads/google_ads/v25/resources/webpage_view_pb' +require 'google/ads/google_ads/v25/resources/youtube_video_upload_pb' +require 'google/ads/google_ads/v25/services/ad_group_ad_label_service_pb' +require 'google/ads/google_ads/v25/services/ad_group_ad_service_pb' +require 'google/ads/google_ads/v25/services/ad_group_asset_service_pb' +require 'google/ads/google_ads/v25/services/ad_group_bid_modifier_service_pb' +require 'google/ads/google_ads/v25/services/ad_group_criterion_customizer_service_pb' +require 'google/ads/google_ads/v25/services/ad_group_criterion_label_service_pb' +require 'google/ads/google_ads/v25/services/ad_group_criterion_service_pb' +require 'google/ads/google_ads/v25/services/ad_group_customizer_service_pb' +require 'google/ads/google_ads/v25/services/ad_group_label_service_pb' +require 'google/ads/google_ads/v25/services/ad_group_service_pb' +require 'google/ads/google_ads/v25/services/ad_parameter_service_pb' +require 'google/ads/google_ads/v25/services/ad_service_pb' +require 'google/ads/google_ads/v25/services/asset_group_asset_service_pb' +require 'google/ads/google_ads/v25/services/asset_group_listing_group_filter_service_pb' +require 'google/ads/google_ads/v25/services/asset_group_service_pb' +require 'google/ads/google_ads/v25/services/asset_group_signal_service_pb' +require 'google/ads/google_ads/v25/services/asset_service_pb' +require 'google/ads/google_ads/v25/services/asset_set_asset_service_pb' +require 'google/ads/google_ads/v25/services/asset_set_service_pb' +require 'google/ads/google_ads/v25/services/audience_service_pb' +require 'google/ads/google_ads/v25/services/bidding_data_exclusion_service_pb' +require 'google/ads/google_ads/v25/services/bidding_seasonality_adjustment_service_pb' +require 'google/ads/google_ads/v25/services/bidding_strategy_service_pb' +require 'google/ads/google_ads/v25/services/campaign_asset_service_pb' +require 'google/ads/google_ads/v25/services/campaign_asset_set_service_pb' +require 'google/ads/google_ads/v25/services/campaign_bid_modifier_service_pb' +require 'google/ads/google_ads/v25/services/campaign_budget_service_pb' +require 'google/ads/google_ads/v25/services/campaign_conversion_goal_service_pb' +require 'google/ads/google_ads/v25/services/campaign_criterion_service_pb' +require 'google/ads/google_ads/v25/services/campaign_customizer_service_pb' +require 'google/ads/google_ads/v25/services/campaign_draft_service_pb' +require 'google/ads/google_ads/v25/services/campaign_group_service_pb' +require 'google/ads/google_ads/v25/services/campaign_label_service_pb' +require 'google/ads/google_ads/v25/services/campaign_service_pb' +require 'google/ads/google_ads/v25/services/campaign_shared_set_service_pb' +require 'google/ads/google_ads/v25/services/conversion_action_service_pb' +require 'google/ads/google_ads/v25/services/conversion_custom_variable_service_pb' +require 'google/ads/google_ads/v25/services/conversion_goal_campaign_config_service_pb' +require 'google/ads/google_ads/v25/services/conversion_value_rule_service_pb' +require 'google/ads/google_ads/v25/services/conversion_value_rule_set_service_pb' +require 'google/ads/google_ads/v25/services/custom_conversion_goal_service_pb' +require 'google/ads/google_ads/v25/services/customer_asset_service_pb' +require 'google/ads/google_ads/v25/services/customer_conversion_goal_service_pb' +require 'google/ads/google_ads/v25/services/customer_customizer_service_pb' +require 'google/ads/google_ads/v25/services/customer_label_service_pb' +require 'google/ads/google_ads/v25/services/customer_negative_criterion_service_pb' +require 'google/ads/google_ads/v25/services/customer_service_pb' +require 'google/ads/google_ads/v25/services/customizer_attribute_service_pb' +require 'google/ads/google_ads/v25/services/experiment_arm_service_pb' +require 'google/ads/google_ads/v25/services/experiment_service_pb' +require 'google/ads/google_ads/v25/services/keyword_plan_ad_group_keyword_service_pb' +require 'google/ads/google_ads/v25/services/keyword_plan_ad_group_service_pb' +require 'google/ads/google_ads/v25/services/keyword_plan_campaign_keyword_service_pb' +require 'google/ads/google_ads/v25/services/keyword_plan_campaign_service_pb' +require 'google/ads/google_ads/v25/services/keyword_plan_service_pb' +require 'google/ads/google_ads/v25/services/label_service_pb' +require 'google/ads/google_ads/v25/services/recommendation_subscription_service_pb' +require 'google/ads/google_ads/v25/services/remarketing_action_service_pb' +require 'google/ads/google_ads/v25/services/shared_criterion_service_pb' +require 'google/ads/google_ads/v25/services/shared_set_service_pb' +require 'google/ads/google_ads/v25/services/smart_campaign_setting_service_pb' +require 'google/ads/google_ads/v25/services/user_list_service_pb' +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/protobuf/field_mask_pb' +require 'google/rpc/status_pb' + + +descriptor_data = "\n:google/ads/googleads/v25/services/google_ads_service.proto\x12!google.ads.googleads.v25.services\x1a\x35google/ads/googleads/v25/actions/book_campaigns.proto\x1a\x36google/ads/googleads/v25/actions/quote_campaigns.proto\x1a-google/ads/googleads/v25/common/metrics.proto\x1a.google/ads/googleads/v25/common/segments.proto\x1a:google/ads/googleads/v25/enums/response_content_type.proto\x1a\x38google/ads/googleads/v25/enums/summary_row_setting.proto\x1a\x44google/ads/googleads/v25/resources/accessible_bidding_strategy.proto\x1a\x37google/ads/googleads/v25/resources/account_budget.proto\x1a@google/ads/googleads/v25/resources/account_budget_proposal.proto\x1a\x35google/ads/googleads/v25/resources/account_link.proto\x1a+google/ads/googleads/v25/resources/ad.proto\x1a\x31google/ads/googleads/v25/resources/ad_group.proto\x1a\x34google/ads/googleads/v25/resources/ad_group_ad.proto\x1aKgoogle/ads/googleads/v25/resources/ad_group_ad_asset_combination_view.proto\x1a?google/ads/googleads/v25/resources/ad_group_ad_asset_view.proto\x1a:google/ads/googleads/v25/resources/ad_group_ad_label.proto\x1a\x37google/ads/googleads/v25/resources/ad_group_asset.proto\x1a;google/ads/googleads/v25/resources/ad_group_asset_set.proto\x1a?google/ads/googleads/v25/resources/ad_group_audience_view.proto\x1a>google/ads/googleads/v25/resources/ad_group_bid_modifier.proto\x1a;google/ads/googleads/v25/resources/ad_group_criterion.proto\x1a\x46google/ads/googleads/v25/resources/ad_group_criterion_customizer.proto\x1a\x41google/ads/googleads/v25/resources/ad_group_criterion_label.proto\x1a\x46google/ads/googleads/v25/resources/ad_group_criterion_simulation.proto\x1agoogle/ads/googleads/v25/resources/asset_field_type_view.proto\x1a\x34google/ads/googleads/v25/resources/asset_group.proto\x1a:google/ads/googleads/v25/resources/asset_group_asset.proto\x1aIgoogle/ads/googleads/v25/resources/asset_group_listing_group_filter.proto\x1aGgoogle/ads/googleads/v25/resources/asset_group_product_group_view.proto\x1a;google/ads/googleads/v25/resources/asset_group_signal.proto\x1aIgoogle/ads/googleads/v25/resources/asset_group_top_combination_view.proto\x1a\x32google/ads/googleads/v25/resources/asset_set.proto\x1a\x38google/ads/googleads/v25/resources/asset_set_asset.proto\x1agoogle/ads/googleads/v25/resources/campaign_bid_modifier.proto\x1a\x38google/ads/googleads/v25/resources/campaign_budget.proto\x1a\x41google/ads/googleads/v25/resources/campaign_conversion_goal.proto\x1a;google/ads/googleads/v25/resources/campaign_criterion.proto\x1agoogle/ads/googleads/v25/resources/conversion_value_rule.proto\x1a\x42google/ads/googleads/v25/resources/conversion_value_rule_set.proto\x1a:google/ads/googleads/v25/resources/currency_constant.proto\x1a\x38google/ads/googleads/v25/resources/custom_audience.proto\x1a?google/ads/googleads/v25/resources/custom_conversion_goal.proto\x1a\x38google/ads/googleads/v25/resources/custom_interest.proto\x1a\x31google/ads/googleads/v25/resources/customer.proto\x1a\x37google/ads/googleads/v25/resources/customer_asset.proto\x1a;google/ads/googleads/v25/resources/customer_asset_set.proto\x1a\x38google/ads/googleads/v25/resources/customer_client.proto\x1a=google/ads/googleads/v25/resources/customer_client_link.proto\x1a\x41google/ads/googleads/v25/resources/customer_conversion_goal.proto\x1agoogle/ads/googleads/v25/resources/customer_manager_link.proto\x1a\x44google/ads/googleads/v25/resources/customer_negative_criterion.proto\x1a\x45google/ads/googleads/v25/resources/customer_search_term_insight.proto\x1a=google/ads/googleads/v25/resources/customer_user_access.proto\x1aHgoogle/ads/googleads/v25/resources/customer_user_access_invitation.proto\x1a=google/ads/googleads/v25/resources/customizer_attribute.proto\x1a\x32google/ads/googleads/v25/resources/data_link.proto\x1aRgoogle/ads/googleads/v25/resources/detail_content_suitability_placement_view.proto\x1a>google/ads/googleads/v25/resources/detail_placement_view.proto\x1a=google/ads/googleads/v25/resources/detailed_demographic.proto\x1a=google/ads/googleads/v25/resources/display_keyword_view.proto\x1a\x36google/ads/googleads/v25/resources/distance_view.proto\x1a\x38google/ads/googleads/v25/resources/domain_category.proto\x1aLgoogle/ads/googleads/v25/resources/dynamic_search_ads_search_term_view.proto\x1a\x43google/ads/googleads/v25/resources/expanded_landing_page_view.proto\x1a\x33google/ads/googleads/v25/resources/experiment.proto\x1a\x37google/ads/googleads/v25/resources/experiment_arm.proto\x1aGgoogle/ads/googleads/v25/resources/final_url_expansion_asset_view.proto\x1a\x34google/ads/googleads/v25/resources/gender_view.proto\x1agoogle/ads/googleads/v25/resources/keyword_plan_ad_group.proto\x1a\x46google/ads/googleads/v25/resources/keyword_plan_ad_group_keyword.proto\x1a>google/ads/googleads/v25/resources/keyword_plan_campaign.proto\x1a\x46google/ads/googleads/v25/resources/keyword_plan_campaign_keyword.proto\x1a?google/ads/googleads/v25/resources/keyword_theme_constant.proto\x1a\x35google/ads/googleads/v25/resources/keyword_view.proto\x1a.google/ads/googleads/v25/resources/label.proto\x1a:google/ads/googleads/v25/resources/landing_page_view.proto\x1a:google/ads/googleads/v25/resources/language_constant.proto\x1a\x42google/ads/googleads/v25/resources/lead_form_submission_data.proto\x1a\x33google/ads/googleads/v25/resources/life_event.proto\x1a@google/ads/googleads/v25/resources/local_services_employee.proto\x1agoogle/ads/googleads/v25/resources/offline_user_data_job.proto\x1aJgoogle/ads/googleads/v25/resources/operating_system_version_constant.proto\x1a\x46google/ads/googleads/v25/resources/paid_organic_search_term_view.proto\x1a=google/ads/googleads/v25/resources/parental_status_view.proto\x1a\x37google/ads/googleads/v25/resources/per_store_view.proto\x1aGgoogle/ads/googleads/v25/resources/performance_max_placement_view.proto\x1a\x42google/ads/googleads/v25/resources/product_category_constant.proto\x1a;google/ads/googleads/v25/resources/product_group_view.proto\x1a\x35google/ads/googleads/v25/resources/product_link.proto\x1a@google/ads/googleads/v25/resources/product_link_invitation.proto\x1agoogle/ads/googleads/v25/services/ad_group_asset_service.proto\x1a\x45google/ads/googleads/v25/services/ad_group_bid_modifier_service.proto\x1aMgoogle/ads/googleads/v25/services/ad_group_criterion_customizer_service.proto\x1aHgoogle/ads/googleads/v25/services/ad_group_criterion_label_service.proto\x1a\x42google/ads/googleads/v25/services/ad_group_criterion_service.proto\x1a\x43google/ads/googleads/v25/services/ad_group_customizer_service.proto\x1a>google/ads/googleads/v25/services/ad_group_label_service.proto\x1a\x38google/ads/googleads/v25/services/ad_group_service.proto\x1agoogle/ads/googleads/v25/services/campaign_asset_service.proto\x1a\x42google/ads/googleads/v25/services/campaign_asset_set_service.proto\x1a\x45google/ads/googleads/v25/services/campaign_bid_modifier_service.proto\x1a?google/ads/googleads/v25/services/campaign_budget_service.proto\x1aHgoogle/ads/googleads/v25/services/campaign_conversion_goal_service.proto\x1a\x42google/ads/googleads/v25/services/campaign_criterion_service.proto\x1a\x43google/ads/googleads/v25/services/campaign_customizer_service.proto\x1a>google/ads/googleads/v25/services/campaign_draft_service.proto\x1a>google/ads/googleads/v25/services/campaign_group_service.proto\x1a>google/ads/googleads/v25/services/campaign_label_service.proto\x1a\x38google/ads/googleads/v25/services/campaign_service.proto\x1a\x43google/ads/googleads/v25/services/campaign_shared_set_service.proto\x1a\x41google/ads/googleads/v25/services/conversion_action_service.proto\x1aJgoogle/ads/googleads/v25/services/conversion_custom_variable_service.proto\x1aOgoogle/ads/googleads/v25/services/conversion_goal_campaign_config_service.proto\x1a\x45google/ads/googleads/v25/services/conversion_value_rule_service.proto\x1aIgoogle/ads/googleads/v25/services/conversion_value_rule_set_service.proto\x1a\x46google/ads/googleads/v25/services/custom_conversion_goal_service.proto\x1a>google/ads/googleads/v25/services/customer_asset_service.proto\x1aHgoogle/ads/googleads/v25/services/customer_conversion_goal_service.proto\x1a\x43google/ads/googleads/v25/services/customer_customizer_service.proto\x1a>google/ads/googleads/v25/services/customer_label_service.proto\x1aKgoogle/ads/googleads/v25/services/customer_negative_criterion_service.proto\x1a\x38google/ads/googleads/v25/services/customer_service.proto\x1a\x44google/ads/googleads/v25/services/customizer_attribute_service.proto\x1a>google/ads/googleads/v25/services/experiment_arm_service.proto\x1a:google/ads/googleads/v25/services/experiment_service.proto\x1aMgoogle/ads/googleads/v25/services/keyword_plan_ad_group_keyword_service.proto\x1a\x45google/ads/googleads/v25/services/keyword_plan_ad_group_service.proto\x1aMgoogle/ads/googleads/v25/services/keyword_plan_campaign_keyword_service.proto\x1a\x45google/ads/googleads/v25/services/keyword_plan_campaign_service.proto\x1a.google.ads.googleads.v25.resources.AdGroupCriterionCustomizer\x12[\n\x18\x61\x64_group_criterion_label\x18y \x01(\x0b\x32\x39.google.ads.googleads.v25.resources.AdGroupCriterionLabel\x12\x65\n\x1d\x61\x64_group_criterion_simulation\x18n \x01(\x0b\x32>.google.ads.googleads.v25.resources.AdGroupCriterionSimulation\x12S\n\x13\x61\x64_group_customizer\x18\xb9\x01 \x01(\x0b\x32\x35.google.ads.googleads.v25.resources.AdGroupCustomizer\x12H\n\x0e\x61\x64_group_label\x18s \x01(\x0b\x32\x30.google.ads.googleads.v25.resources.AdGroupLabel\x12R\n\x13\x61\x64_group_simulation\x18k \x01(\x0b\x32\x35.google.ads.googleads.v25.resources.AdGroupSimulation\x12\x46\n\x0c\x61\x64_parameter\x18\x82\x01 \x01(\x0b\x32/.google.ads.googleads.v25.resources.AdParameter\x12H\n\x0e\x61ge_range_view\x18\x30 \x01(\x0b\x32\x30.google.ads.googleads.v25.resources.AgeRangeView\x12L\n\x10\x61\x64_schedule_view\x18Y \x01(\x0b\x32\x32.google.ads.googleads.v25.resources.AdScheduleView\x12u\n&ai_max_search_term_ad_combination_view\x18\xf2\x01 \x01(\x0b\x32\x44.google.ads.googleads.v25.resources.AiMaxSearchTermAdCombinationView\x12K\n\x0f\x64omain_category\x18[ \x01(\x0b\x32\x32.google.ads.googleads.v25.resources.DomainCategory\x12\x38\n\x05\x61sset\x18i \x01(\x0b\x32).google.ads.googleads.v25.resources.Asset\x12V\n\x15\x61sset_field_type_view\x18\xa8\x01 \x01(\x0b\x32\x36.google.ads.googleads.v25.resources.AssetFieldTypeView\x12\x64\n\x1c\x63hannel_aggregate_asset_view\x18\xde\x01 \x01(\x0b\x32=.google.ads.googleads.v25.resources.ChannelAggregateAssetView\x12\x66\n\x1d\x63\x61mpaign_aggregate_asset_view\x18\xe0\x01 \x01(\x0b\x32>.google.ads.googleads.v25.resources.CampaignAggregateAssetView\x12O\n\x11\x61sset_group_asset\x18\xad\x01 \x01(\x0b\x32\x33.google.ads.googleads.v25.resources.AssetGroupAsset\x12Q\n\x12\x61sset_group_signal\x18\xbf\x01 \x01(\x0b\x32\x34.google.ads.googleads.v25.resources.AssetGroupSignal\x12k\n asset_group_listing_group_filter\x18\xb6\x01 \x01(\x0b\x32@.google.ads.googleads.v25.resources.AssetGroupListingGroupFilter\x12g\n\x1e\x61sset_group_product_group_view\x18\xbd\x01 \x01(\x0b\x32>.google.ads.googleads.v25.resources.AssetGroupProductGroupView\x12k\n asset_group_top_combination_view\x18\xc7\x01 \x01(\x0b\x32@.google.ads.googleads.v25.resources.AssetGroupTopCombinationView\x12\x44\n\x0b\x61sset_group\x18\xac\x01 \x01(\x0b\x32..google.ads.googleads.v25.resources.AssetGroup\x12K\n\x0f\x61sset_set_asset\x18\xb4\x01 \x01(\x0b\x32\x31.google.ads.googleads.v25.resources.AssetSetAsset\x12@\n\tasset_set\x18\xb3\x01 \x01(\x0b\x32,.google.ads.googleads.v25.resources.AssetSet\x12R\n\x13\x61sset_set_type_view\x18\xc5\x01 \x01(\x0b\x32\x34.google.ads.googleads.v25.resources.AssetSetTypeView\x12@\n\tbatch_job\x18\x8b\x01 \x01(\x0b\x32,.google.ads.googleads.v25.resources.BatchJob\x12Y\n\x16\x62idding_data_exclusion\x18\x9f\x01 \x01(\x0b\x32\x38.google.ads.googleads.v25.resources.BiddingDataExclusion\x12i\n\x1e\x62idding_seasonality_adjustment\x18\xa0\x01 \x01(\x0b\x32@.google.ads.googleads.v25.resources.BiddingSeasonalityAdjustment\x12M\n\x10\x62idding_strategy\x18\x12 \x01(\x0b\x32\x33.google.ads.googleads.v25.resources.BiddingStrategy\x12\x63\n\x1b\x62idding_strategy_simulation\x18\x9e\x01 \x01(\x0b\x32=.google.ads.googleads.v25.resources.BiddingStrategySimulation\x12G\n\rbilling_setup\x18) \x01(\x0b\x32\x30.google.ads.googleads.v25.resources.BillingSetup\x12@\n\tcall_view\x18\x98\x01 \x01(\x0b\x32,.google.ads.googleads.v25.resources.CallView\x12K\n\x0f\x63\x61mpaign_budget\x18\x13 \x01(\x0b\x32\x32.google.ads.googleads.v25.resources.CampaignBudget\x12>\n\x08\x63\x61mpaign\x18\x02 \x01(\x0b\x32,.google.ads.googleads.v25.resources.Campaign\x12J\n\x0e\x63\x61mpaign_asset\x18\x8e\x01 \x01(\x0b\x32\x31.google.ads.googleads.v25.resources.CampaignAsset\x12Q\n\x12\x63\x61mpaign_asset_set\x18\xb5\x01 \x01(\x0b\x32\x34.google.ads.googleads.v25.resources.CampaignAssetSet\x12X\n\x16\x63\x61mpaign_audience_view\x18\x45 \x01(\x0b\x32\x38.google.ads.googleads.v25.resources.CampaignAudienceView\x12V\n\x15\x63\x61mpaign_bid_modifier\x18\x1a \x01(\x0b\x32\x37.google.ads.googleads.v25.resources.CampaignBidModifier\x12]\n\x18\x63\x61mpaign_conversion_goal\x18\xaf\x01 \x01(\x0b\x32:.google.ads.googleads.v25.resources.CampaignConversionGoal\x12Q\n\x12\x63\x61mpaign_criterion\x18\x14 \x01(\x0b\x32\x35.google.ads.googleads.v25.resources.CampaignCriterion\x12T\n\x13\x63\x61mpaign_customizer\x18\xba\x01 \x01(\x0b\x32\x36.google.ads.googleads.v25.resources.CampaignCustomizer\x12I\n\x0e\x63\x61mpaign_draft\x18\x31 \x01(\x0b\x32\x31.google.ads.googleads.v25.resources.CampaignDraft\x12I\n\x0e\x63\x61mpaign_group\x18\x19 \x01(\x0b\x32\x31.google.ads.googleads.v25.resources.CampaignGroup\x12U\n\x14\x63\x61mpaign_goal_config\x18\xec\x01 \x01(\x0b\x32\x36.google.ads.googleads.v25.resources.CampaignGoalConfig\x12I\n\x0e\x63\x61mpaign_label\x18l \x01(\x0b\x32\x31.google.ads.googleads.v25.resources.CampaignLabel\x12\x64\n\x1c\x63\x61mpaign_search_term_insight\x18\xcc\x01 \x01(\x0b\x32=.google.ads.googleads.v25.resources.CampaignSearchTermInsight\x12^\n\x19\x63\x61mpaign_search_term_view\x18\xf3\x01 \x01(\x0b\x32:.google.ads.googleads.v25.resources.CampaignSearchTermView\x12R\n\x13\x63\x61mpaign_shared_set\x18\x1e \x01(\x0b\x32\x35.google.ads.googleads.v25.resources.CampaignSharedSet\x12T\n\x13\x63\x61mpaign_simulation\x18\x9d\x01 \x01(\x0b\x32\x36.google.ads.googleads.v25.resources.CampaignSimulation\x12M\n\x10\x63\x61rrier_constant\x18\x42 \x01(\x0b\x32\x33.google.ads.googleads.v25.resources.CarrierConstant\x12T\n\x14\x63\x61rt_data_sales_view\x18\xdd\x01 \x01(\x0b\x32\x35.google.ads.googleads.v25.resources.CartDataSalesView\x12\x46\n\x0c\x63hange_event\x18\x91\x01 \x01(\x0b\x32/.google.ads.googleads.v25.resources.ChangeEvent\x12G\n\rchange_status\x18% \x01(\x0b\x32\x30.google.ads.googleads.v25.resources.ChangeStatus\x12P\n\x11\x63ombined_audience\x18\x94\x01 \x01(\x0b\x32\x34.google.ads.googleads.v25.resources.CombinedAudience\x12?\n\x08\x61udience\x18\xbe\x01 \x01(\x0b\x32,.google.ads.googleads.v25.resources.Audience\x12O\n\x11\x63onversion_action\x18g \x01(\x0b\x32\x34.google.ads.googleads.v25.resources.ConversionAction\x12\x61\n\x1a\x63onversion_custom_variable\x18\x99\x01 \x01(\x0b\x32<.google.ads.googleads.v25.resources.ConversionCustomVariable\x12j\n\x1f\x63onversion_goal_campaign_config\x18\xb1\x01 \x01(\x0b\x32@.google.ads.googleads.v25.resources.ConversionGoalCampaignConfig\x12W\n\x15\x63onversion_value_rule\x18\xa4\x01 \x01(\x0b\x32\x37.google.ads.googleads.v25.resources.ConversionValueRule\x12^\n\x19\x63onversion_value_rule_set\x18\xa5\x01 \x01(\x0b\x32:.google.ads.googleads.v25.resources.ConversionValueRuleSet\x12\x41\n\nclick_view\x18z \x01(\x0b\x32-.google.ads.googleads.v25.resources.ClickView\x12P\n\x11\x63urrency_constant\x18\x86\x01 \x01(\x0b\x32\x34.google.ads.googleads.v25.resources.CurrencyConstant\x12L\n\x0f\x63ustom_audience\x18\x93\x01 \x01(\x0b\x32\x32.google.ads.googleads.v25.resources.CustomAudience\x12Y\n\x16\x63ustom_conversion_goal\x18\xb0\x01 \x01(\x0b\x32\x38.google.ads.googleads.v25.resources.CustomConversionGoal\x12K\n\x0f\x63ustom_interest\x18h \x01(\x0b\x32\x32.google.ads.googleads.v25.resources.CustomInterest\x12>\n\x08\x63ustomer\x18\x01 \x01(\x0b\x32,.google.ads.googleads.v25.resources.Customer\x12J\n\x0e\x63ustomer_asset\x18\x9b\x01 \x01(\x0b\x32\x31.google.ads.googleads.v25.resources.CustomerAsset\x12Q\n\x12\x63ustomer_asset_set\x18\xc3\x01 \x01(\x0b\x32\x34.google.ads.googleads.v25.resources.CustomerAssetSet\x12\x63\n\x1b\x61\x63\x63\x65ssible_bidding_strategy\x18\xa9\x01 \x01(\x0b\x32=.google.ads.googleads.v25.resources.AccessibleBiddingStrategy\x12T\n\x13\x63ustomer_customizer\x18\xb8\x01 \x01(\x0b\x32\x36.google.ads.googleads.v25.resources.CustomerCustomizer\x12V\n\x15\x63ustomer_manager_link\x18= \x01(\x0b\x32\x37.google.ads.googleads.v25.resources.CustomerManagerLink\x12T\n\x14\x63ustomer_client_link\x18> \x01(\x0b\x32\x36.google.ads.googleads.v25.resources.CustomerClientLink\x12K\n\x0f\x63ustomer_client\x18\x46 \x01(\x0b\x32\x32.google.ads.googleads.v25.resources.CustomerClient\x12]\n\x18\x63ustomer_conversion_goal\x18\xae\x01 \x01(\x0b\x32:.google.ads.googleads.v25.resources.CustomerConversionGoal\x12I\n\x0e\x63ustomer_label\x18| \x01(\x0b\x32\x31.google.ads.googleads.v25.resources.CustomerLabel\x12\x62\n\x1b\x63ustomer_negative_criterion\x18X \x01(\x0b\x32=.google.ads.googleads.v25.resources.CustomerNegativeCriterion\x12\x64\n\x1c\x63ustomer_search_term_insight\x18\xcd\x01 \x01(\x0b\x32=.google.ads.googleads.v25.resources.CustomerSearchTermInsight\x12U\n\x14\x63ustomer_user_access\x18\x92\x01 \x01(\x0b\x32\x36.google.ads.googleads.v25.resources.CustomerUserAccess\x12j\n\x1f\x63ustomer_user_access_invitation\x18\x96\x01 \x01(\x0b\x32@.google.ads.googleads.v25.resources.CustomerUserAccessInvitation\x12V\n\x14\x63ustomizer_attribute\x18\xb2\x01 \x01(\x0b\x32\x37.google.ads.googleads.v25.resources.CustomizerAttribute\x12@\n\tdata_link\x18\xe6\x01 \x01(\x0b\x32,.google.ads.googleads.v25.resources.DataLink\x12}\n)detail_content_suitability_placement_view\x18\xee\x01 \x01(\x0b\x32I.google.ads.googleads.v25.resources.DetailContentSuitabilityPlacementView\x12V\n\x15\x64\x65tail_placement_view\x18v \x01(\x0b\x32\x37.google.ads.googleads.v25.resources.DetailPlacementView\x12V\n\x14\x64\x65tailed_demographic\x18\xa6\x01 \x01(\x0b\x32\x37.google.ads.googleads.v25.resources.DetailedDemographic\x12T\n\x14\x64isplay_keyword_view\x18/ \x01(\x0b\x32\x36.google.ads.googleads.v25.resources.DisplayKeywordView\x12H\n\rdistance_view\x18\x84\x01 \x01(\x0b\x32\x30.google.ads.googleads.v25.resources.DistanceView\x12o\n#dynamic_search_ads_search_term_view\x18j \x01(\x0b\x32\x42.google.ads.googleads.v25.resources.DynamicSearchAdsSearchTermView\x12`\n\x1a\x65xpanded_landing_page_view\x18\x80\x01 \x01(\x0b\x32;.google.ads.googleads.v25.resources.ExpandedLandingPageView\x12g\n\x1e\x66inal_url_expansion_asset_view\x18\xf0\x01 \x01(\x0b\x32>.google.ads.googleads.v25.resources.FinalUrlExpansionAssetView\x12\x43\n\x0bgender_view\x18( \x01(\x0b\x32..google.ads.googleads.v25.resources.GenderView\x12R\n\x13geo_target_constant\x18\x17 \x01(\x0b\x32\x35.google.ads.googleads.v25.resources.GeoTargetConstant\x12K\n\x0fgeographic_view\x18} \x01(\x0b\x32\x32.google.ads.googleads.v25.resources.GeographicView\x12\x37\n\x04goal\x18\xed\x01 \x01(\x0b\x32(.google.ads.googleads.v25.resources.Goal\x12{\n(group_content_suitability_placement_view\x18\xef\x01 \x01(\x0b\x32H.google.ads.googleads.v25.resources.GroupContentSuitabilityPlacementView\x12T\n\x14group_placement_view\x18w \x01(\x0b\x32\x36.google.ads.googleads.v25.resources.GroupPlacementView\x12L\n\x10hotel_group_view\x18\x33 \x01(\x0b\x32\x32.google.ads.googleads.v25.resources.HotelGroupView\x12X\n\x16hotel_performance_view\x18G \x01(\x0b\x32\x38.google.ads.googleads.v25.resources.HotelPerformanceView\x12V\n\x14hotel_reconciliation\x18\xbc\x01 \x01(\x0b\x32\x37.google.ads.googleads.v25.resources.HotelReconciliation\x12O\n\x11income_range_view\x18\x8a\x01 \x01(\x0b\x32\x33.google.ads.googleads.v25.resources.IncomeRangeView\x12\x45\n\x0ckeyword_view\x18\x15 \x01(\x0b\x32/.google.ads.googleads.v25.resources.KeywordView\x12\x45\n\x0ckeyword_plan\x18 \x01(\x0b\x32/.google.ads.googleads.v25.resources.KeywordPlan\x12V\n\x15keyword_plan_campaign\x18! \x01(\x0b\x32\x37.google.ads.googleads.v25.resources.KeywordPlanCampaign\x12\x66\n\x1dkeyword_plan_campaign_keyword\x18\x8c\x01 \x01(\x0b\x32>.google.ads.googleads.v25.resources.KeywordPlanCampaignKeyword\x12U\n\x15keyword_plan_ad_group\x18# \x01(\x0b\x32\x36.google.ads.googleads.v25.resources.KeywordPlanAdGroup\x12\x65\n\x1dkeyword_plan_ad_group_keyword\x18\x8d\x01 \x01(\x0b\x32=.google.ads.googleads.v25.resources.KeywordPlanAdGroupKeyword\x12Y\n\x16keyword_theme_constant\x18\xa3\x01 \x01(\x0b\x32\x38.google.ads.googleads.v25.resources.KeywordThemeConstant\x12\x38\n\x05label\x18\x34 \x01(\x0b\x32).google.ads.googleads.v25.resources.Label\x12N\n\x11landing_page_view\x18~ \x01(\x0b\x32\x33.google.ads.googleads.v25.resources.LandingPageView\x12O\n\x11language_constant\x18\x37 \x01(\x0b\x32\x34.google.ads.googleads.v25.resources.LanguageConstant\x12G\n\rlocation_view\x18{ \x01(\x0b\x32\x30.google.ads.googleads.v25.resources.LocationView\x12Y\n\x16location_interest_view\x18\xf1\x01 \x01(\x0b\x32\x38.google.ads.googleads.v25.resources.LocationInterestView\x12X\n\x16managed_placement_view\x18\x35 \x01(\x0b\x32\x38.google.ads.googleads.v25.resources.ManagedPlacementView\x12h\n\x1ematched_location_interest_view\x18\xf8\x01 \x01(\x0b\x32?.google.ads.googleads.v25.resources.MatchedLocationInterestView\x12Y\n\x16\x63ontent_criterion_view\x18\xe8\x01 \x01(\x0b\x32\x38.google.ads.googleads.v25.resources.ContentCriterionView\x12\x41\n\nmedia_file\x18Z \x01(\x0b\x32-.google.ads.googleads.v25.resources.MediaFile\x12[\n\x17local_services_employee\x18\xdf\x01 \x01(\x0b\x32\x39.google.ads.googleads.v25.resources.LocalServicesEmployee\x12t\n$local_services_verification_artifact\x18\xd3\x01 \x01(\x0b\x32\x45.google.ads.googleads.v25.resources.LocalServicesVerificationArtifact\x12\x63\n\x1cmobile_app_category_constant\x18W \x01(\x0b\x32=.google.ads.googleads.v25.resources.MobileAppCategoryConstant\x12X\n\x16mobile_device_constant\x18\x62 \x01(\x0b\x32\x38.google.ads.googleads.v25.resources.MobileDeviceConstant\x12Z\n\x17multi_party_auth_review\x18\x89\x02 \x01(\x0b\x32\x38.google.ads.googleads.v25.resources.MultiPartyAuthReview\x12{\n(offline_conversion_upload_client_summary\x18\xd8\x01 \x01(\x0b\x32H.google.ads.googleads.v25.resources.OfflineConversionUploadClientSummary\x12\x90\x01\n3offline_conversion_upload_conversion_action_summary\x18\xe4\x01 \x01(\x0b\x32R.google.ads.googleads.v25.resources.OfflineConversionUploadConversionActionSummary\x12V\n\x15offline_user_data_job\x18\x89\x01 \x01(\x0b\x32\x36.google.ads.googleads.v25.resources.OfflineUserDataJob\x12m\n!operating_system_version_constant\x18V \x01(\x0b\x32\x42.google.ads.googleads.v25.resources.OperatingSystemVersionConstant\x12\x65\n\x1dpaid_organic_search_term_view\x18\x81\x01 \x01(\x0b\x32=.google.ads.googleads.v25.resources.PaidOrganicSearchTermView\x12T\n\x13qualifying_question\x18\xca\x01 \x01(\x0b\x32\x36.google.ads.googleads.v25.resources.QualifyingQuestion\x12T\n\x14parental_status_view\x18- \x01(\x0b\x32\x36.google.ads.googleads.v25.resources.ParentalStatusView\x12I\n\x0eper_store_view\x18\xc6\x01 \x01(\x0b\x32\x30.google.ads.googleads.v25.resources.PerStoreView\x12h\n\x1eperformance_max_placement_view\x18\xe9\x01 \x01(\x0b\x32?.google.ads.googleads.v25.resources.PerformanceMaxPlacementView\x12_\n\x19product_category_constant\x18\xd0\x01 \x01(\x0b\x32;.google.ads.googleads.v25.resources.ProductCategoryConstant\x12P\n\x12product_group_view\x18\x36 \x01(\x0b\x32\x34.google.ads.googleads.v25.resources.ProductGroupView\x12\x46\n\x0cproduct_link\x18\xc2\x01 \x01(\x0b\x32/.google.ads.googleads.v25.resources.ProductLink\x12[\n\x17product_link_invitation\x18\xd1\x01 \x01(\x0b\x32\x39.google.ads.googleads.v25.resources.ProductLinkInvitation\x12J\n\x0erecommendation\x18\x16 \x01(\x0b\x32\x32.google.ads.googleads.v25.resources.Recommendation\x12\x64\n\x1brecommendation_subscription\x18\xdc\x01 \x01(\x0b\x32>.google.ads.googleads.v25.resources.RecommendationSubscription\x12L\n\x10search_term_view\x18\x44 \x01(\x0b\x32\x32.google.ads.googleads.v25.resources.SearchTermView\x12M\n\x10shared_criterion\x18\x1d \x01(\x0b\x32\x33.google.ads.googleads.v25.resources.SharedCriterion\x12\x41\n\nshared_set\x18\x1b \x01(\x0b\x32-.google.ads.googleads.v25.resources.SharedSet\x12Y\n\x16smart_campaign_setting\x18\xa7\x01 \x01(\x0b\x32\x38.google.ads.googleads.v25.resources.SmartCampaignSetting\x12^\n\x19shopping_performance_view\x18u \x01(\x0b\x32;.google.ads.googleads.v25.resources.ShoppingPerformanceView\x12N\n\x10shopping_product\x18\xe2\x01 \x01(\x0b\x32\x33.google.ads.googleads.v25.resources.ShoppingProduct\x12i\n\x1fsmart_campaign_search_term_view\x18\xaa\x01 \x01(\x0b\x32?.google.ads.googleads.v25.resources.SmartCampaignSearchTermView\x12]\n\x18targeting_expansion_view\x18\xf4\x01 \x01(\x0b\x32:.google.ads.googleads.v25.resources.TargetingExpansionView\x12g\n\x1ethird_party_app_analytics_link\x18\x90\x01 \x01(\x0b\x32>.google.ads.googleads.v25.resources.ThirdPartyAppAnalyticsLink\x12\x41\n\ntopic_view\x18, \x01(\x0b\x32-.google.ads.googleads.v25.resources.TopicView\x12`\n\x1atravel_activity_group_view\x18\xc9\x01 \x01(\x0b\x32;.google.ads.googleads.v25.resources.TravelActivityGroupView\x12l\n travel_activity_performance_view\x18\xc8\x01 \x01(\x0b\x32\x41.google.ads.googleads.v25.resources.TravelActivityPerformanceView\x12\x43\n\nexperiment\x18\x85\x01 \x01(\x0b\x32..google.ads.googleads.v25.resources.Experiment\x12J\n\x0e\x65xperiment_arm\x18\xb7\x01 \x01(\x0b\x32\x31.google.ads.googleads.v25.resources.ExperimentArm\x12G\n\ruser_interest\x18; \x01(\x0b\x32\x30.google.ads.googleads.v25.resources.UserInterest\x12\x42\n\nlife_event\x18\xa1\x01 \x01(\x0b\x32-.google.ads.googleads.v25.resources.LifeEvent\x12?\n\tuser_list\x18& \x01(\x0b\x32,.google.ads.googleads.v25.resources.UserList\x12Z\n\x17user_list_customer_type\x18\xe1\x01 \x01(\x0b\x32\x38.google.ads.googleads.v25.resources.UserListCustomerType\x12Q\n\x12user_location_view\x18\x87\x01 \x01(\x0b\x32\x34.google.ads.googleads.v25.resources.UserLocationView\x12Q\n\x12remarketing_action\x18< \x01(\x0b\x32\x35.google.ads.googleads.v25.resources.RemarketingAction\x12I\n\x0etopic_constant\x18\x1f \x01(\x0b\x32\x31.google.ads.googleads.v25.resources.TopicConstant\x12\x38\n\x05video\x18\' \x01(\x0b\x32).google.ads.googleads.v25.resources.Video\x12P\n\x11video_enhancement\x18\xfa\x01 \x01(\x0b\x32\x34.google.ads.googleads.v25.resources.VideoEnhancement\x12\x46\n\x0cwebpage_view\x18\xa2\x01 \x01(\x0b\x32/.google.ads.googleads.v25.resources.WebpageView\x12^\n\x19lead_form_submission_data\x18\xc0\x01 \x01(\x0b\x32:.google.ads.googleads.v25.resources.LeadFormSubmissionData\x12S\n\x13local_services_lead\x18\xd2\x01 \x01(\x0b\x32\x35.google.ads.googleads.v25.resources.LocalServicesLead\x12l\n local_services_lead_conversation\x18\xd6\x01 \x01(\x0b\x32\x41.google.ads.googleads.v25.resources.LocalServicesLeadConversation\x12}\n*android_privacy_shared_key_google_ad_group\x18\xd9\x01 \x01(\x0b\x32H.google.ads.googleads.v25.resources.AndroidPrivacySharedKeyGoogleAdGroup\x12~\n*android_privacy_shared_key_google_campaign\x18\xda\x01 \x01(\x0b\x32I.google.ads.googleads.v25.resources.AndroidPrivacySharedKeyGoogleCampaign\x12\x85\x01\n.android_privacy_shared_key_google_network_type\x18\xdb\x01 \x01(\x0b\x32L.google.ads.googleads.v25.resources.AndroidPrivacySharedKeyGoogleNetworkType\x12V\n\x15you_tube_video_upload\x18\xf5\x01 \x01(\x0b\x32\x36.google.ads.googleads.v25.resources.YouTubeVideoUpload\x12P\n\x11\x61pplied_incentive\x18\xf6\x01 \x01(\x0b\x32\x34.google.ads.googleads.v25.resources.AppliedIncentive\x12\x39\n\x07metrics\x18\x04 \x01(\x0b\x32(.google.ads.googleads.v25.common.Metrics\x12;\n\x08segments\x18\x66 \x01(\x0b\x32).google.ads.googleads.v25.common.Segments\"\xa2\x02\n\x16MutateGoogleAdsRequest\x12\x18\n\x0b\x63ustomer_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12R\n\x11mutate_operations\x18\x02 \x03(\x0b\x32\x32.google.ads.googleads.v25.services.MutateOperationB\x03\xe0\x41\x02\x12\x17\n\x0fpartial_failure\x18\x03 \x01(\x08\x12\x15\n\rvalidate_only\x18\x04 \x01(\x08\x12j\n\x15response_content_type\x18\x05 \x01(\x0e\x32K.google.ads.googleads.v25.enums.ResponseContentTypeEnum.ResponseContentType\"\xac\x01\n\x17MutateGoogleAdsResponse\x12\x31\n\x15partial_failure_error\x18\x03 \x01(\x0b\x32\x12.google.rpc.Status\x12^\n\x1amutate_operation_responses\x18\x01 \x03(\x0b\x32:.google.ads.googleads.v25.services.MutateOperationResponse\"\xe4\x32\n\x0fMutateOperation\x12\x61\n\x1b\x61\x64_group_ad_label_operation\x18\x11 \x01(\x0b\x32:.google.ads.googleads.v25.services.AdGroupAdLabelOperationH\x00\x12V\n\x15\x61\x64_group_ad_operation\x18\x01 \x01(\x0b\x32\x35.google.ads.googleads.v25.services.AdGroupAdOperationH\x00\x12\\\n\x18\x61\x64_group_asset_operation\x18\x38 \x01(\x0b\x32\x38.google.ads.googleads.v25.services.AdGroupAssetOperationH\x00\x12i\n\x1f\x61\x64_group_bid_modifier_operation\x18\x02 \x01(\x0b\x32>.google.ads.googleads.v25.services.AdGroupBidModifierOperationH\x00\x12y\n\'ad_group_criterion_customizer_operation\x18M \x01(\x0b\x32\x46.google.ads.googleads.v25.services.AdGroupCriterionCustomizerOperationH\x00\x12o\n\"ad_group_criterion_label_operation\x18\x12 \x01(\x0b\x32\x41.google.ads.googleads.v25.services.AdGroupCriterionLabelOperationH\x00\x12\x64\n\x1c\x61\x64_group_criterion_operation\x18\x03 \x01(\x0b\x32<.google.ads.googleads.v25.services.AdGroupCriterionOperationH\x00\x12\x66\n\x1d\x61\x64_group_customizer_operation\x18K \x01(\x0b\x32=.google.ads.googleads.v25.services.AdGroupCustomizerOperationH\x00\x12\\\n\x18\x61\x64_group_label_operation\x18\x15 \x01(\x0b\x32\x38.google.ads.googleads.v25.services.AdGroupLabelOperationH\x00\x12Q\n\x12\x61\x64_group_operation\x18\x05 \x01(\x0b\x32\x33.google.ads.googleads.v25.services.AdGroupOperationH\x00\x12\x46\n\x0c\x61\x64_operation\x18\x31 \x01(\x0b\x32..google.ads.googleads.v25.services.AdOperationH\x00\x12Y\n\x16\x61\x64_parameter_operation\x18\x16 \x01(\x0b\x32\x37.google.ads.googleads.v25.services.AdParameterOperationH\x00\x12L\n\x0f\x61sset_operation\x18\x17 \x01(\x0b\x32\x31.google.ads.googleads.v25.services.AssetOperationH\x00\x12\x62\n\x1b\x61sset_group_asset_operation\x18\x41 \x01(\x0b\x32;.google.ads.googleads.v25.services.AssetGroupAssetOperationH\x00\x12~\n*asset_group_listing_group_filter_operation\x18N \x01(\x0b\x32H.google.ads.googleads.v25.services.AssetGroupListingGroupFilterOperationH\x00\x12\x64\n\x1c\x61sset_group_signal_operation\x18P \x01(\x0b\x32<.google.ads.googleads.v25.services.AssetGroupSignalOperationH\x00\x12W\n\x15\x61sset_group_operation\x18> \x01(\x0b\x32\x36.google.ads.googleads.v25.services.AssetGroupOperationH\x00\x12^\n\x19\x61sset_set_asset_operation\x18G \x01(\x0b\x32\x39.google.ads.googleads.v25.services.AssetSetAssetOperationH\x00\x12S\n\x13\x61sset_set_operation\x18H \x01(\x0b\x32\x34.google.ads.googleads.v25.services.AssetSetOperationH\x00\x12R\n\x12\x61udience_operation\x18Q \x01(\x0b\x32\x34.google.ads.googleads.v25.services.AudienceOperationH\x00\x12l\n bidding_data_exclusion_operation\x18: \x01(\x0b\x32@.google.ads.googleads.v25.services.BiddingDataExclusionOperationH\x00\x12|\n(bidding_seasonality_adjustment_operation\x18; \x01(\x0b\x32H.google.ads.googleads.v25.services.BiddingSeasonalityAdjustmentOperationH\x00\x12\x61\n\x1a\x62idding_strategy_operation\x18\x06 \x01(\x0b\x32;.google.ads.googleads.v25.services.BiddingStrategyOperationH\x00\x12\\\n\x18\x62ook_campaigns_operation\x18Y \x01(\x0b\x32\x38.google.ads.googleads.v25.actions.BookCampaignsOperationH\x00\x12]\n\x18\x63\x61mpaign_asset_operation\x18\x34 \x01(\x0b\x32\x39.google.ads.googleads.v25.services.CampaignAssetOperationH\x00\x12\x64\n\x1c\x63\x61mpaign_asset_set_operation\x18I \x01(\x0b\x32<.google.ads.googleads.v25.services.CampaignAssetSetOperationH\x00\x12j\n\x1f\x63\x61mpaign_bid_modifier_operation\x18\x07 \x01(\x0b\x32?.google.ads.googleads.v25.services.CampaignBidModifierOperationH\x00\x12_\n\x19\x63\x61mpaign_budget_operation\x18\x08 \x01(\x0b\x32:.google.ads.googleads.v25.services.CampaignBudgetOperationH\x00\x12p\n\"campaign_conversion_goal_operation\x18\x43 \x01(\x0b\x32\x42.google.ads.googleads.v25.services.CampaignConversionGoalOperationH\x00\x12\x65\n\x1c\x63\x61mpaign_criterion_operation\x18\r \x01(\x0b\x32=.google.ads.googleads.v25.services.CampaignCriterionOperationH\x00\x12g\n\x1d\x63\x61mpaign_customizer_operation\x18L \x01(\x0b\x32>.google.ads.googleads.v25.services.CampaignCustomizerOperationH\x00\x12]\n\x18\x63\x61mpaign_draft_operation\x18\x18 \x01(\x0b\x32\x39.google.ads.googleads.v25.services.CampaignDraftOperationH\x00\x12]\n\x18\x63\x61mpaign_group_operation\x18\t \x01(\x0b\x32\x39.google.ads.googleads.v25.services.CampaignGroupOperationH\x00\x12]\n\x18\x63\x61mpaign_label_operation\x18\x1c \x01(\x0b\x32\x39.google.ads.googleads.v25.services.CampaignLabelOperationH\x00\x12R\n\x12\x63\x61mpaign_operation\x18\n \x01(\x0b\x32\x34.google.ads.googleads.v25.services.CampaignOperationH\x00\x12\x66\n\x1d\x63\x61mpaign_shared_set_operation\x18\x0b \x01(\x0b\x32=.google.ads.googleads.v25.services.CampaignSharedSetOperationH\x00\x12\x63\n\x1b\x63onversion_action_operation\x18\x0c \x01(\x0b\x32<.google.ads.googleads.v25.services.ConversionActionOperationH\x00\x12t\n$conversion_custom_variable_operation\x18\x37 \x01(\x0b\x32\x44.google.ads.googleads.v25.services.ConversionCustomVariableOperationH\x00\x12}\n)conversion_goal_campaign_config_operation\x18\x45 \x01(\x0b\x32H.google.ads.googleads.v25.services.ConversionGoalCampaignConfigOperationH\x00\x12j\n\x1f\x63onversion_value_rule_operation\x18? \x01(\x0b\x32?.google.ads.googleads.v25.services.ConversionValueRuleOperationH\x00\x12q\n#conversion_value_rule_set_operation\x18@ \x01(\x0b\x32\x42.google.ads.googleads.v25.services.ConversionValueRuleSetOperationH\x00\x12l\n custom_conversion_goal_operation\x18\x44 \x01(\x0b\x32@.google.ads.googleads.v25.services.CustomConversionGoalOperationH\x00\x12]\n\x18\x63ustomer_asset_operation\x18\x39 \x01(\x0b\x32\x39.google.ads.googleads.v25.services.CustomerAssetOperationH\x00\x12p\n\"customer_conversion_goal_operation\x18\x42 \x01(\x0b\x32\x42.google.ads.googleads.v25.services.CustomerConversionGoalOperationH\x00\x12g\n\x1d\x63ustomer_customizer_operation\x18O \x01(\x0b\x32>.google.ads.googleads.v25.services.CustomerCustomizerOperationH\x00\x12]\n\x18\x63ustomer_label_operation\x18 \x01(\x0b\x32\x39.google.ads.googleads.v25.services.CustomerLabelOperationH\x00\x12v\n%customer_negative_criterion_operation\x18\" \x01(\x0b\x32\x45.google.ads.googleads.v25.services.CustomerNegativeCriterionOperationH\x00\x12R\n\x12\x63ustomer_operation\x18# \x01(\x0b\x32\x34.google.ads.googleads.v25.services.CustomerOperationH\x00\x12i\n\x1e\x63ustomizer_attribute_operation\x18\x46 \x01(\x0b\x32?.google.ads.googleads.v25.services.CustomizerAttributeOperationH\x00\x12V\n\x14\x65xperiment_operation\x18R \x01(\x0b\x32\x36.google.ads.googleads.v25.services.ExperimentOperationH\x00\x12]\n\x18\x65xperiment_arm_operation\x18S \x01(\x0b\x32\x39.google.ads.googleads.v25.services.ExperimentArmOperationH\x00\x12i\n\x1fkeyword_plan_ad_group_operation\x18, \x01(\x0b\x32>.google.ads.googleads.v25.services.KeywordPlanAdGroupOperationH\x00\x12x\n\'keyword_plan_ad_group_keyword_operation\x18\x32 \x01(\x0b\x32\x45.google.ads.googleads.v25.services.KeywordPlanAdGroupKeywordOperationH\x00\x12y\n\'keyword_plan_campaign_keyword_operation\x18\x33 \x01(\x0b\x32\x46.google.ads.googleads.v25.services.KeywordPlanCampaignKeywordOperationH\x00\x12j\n\x1fkeyword_plan_campaign_operation\x18- \x01(\x0b\x32?.google.ads.googleads.v25.services.KeywordPlanCampaignOperationH\x00\x12Y\n\x16keyword_plan_operation\x18\x30 \x01(\x0b\x32\x37.google.ads.googleads.v25.services.KeywordPlanOperationH\x00\x12L\n\x0flabel_operation\x18) \x01(\x0b\x32\x31.google.ads.googleads.v25.services.LabelOperationH\x00\x12^\n\x19quote_campaigns_operation\x18X \x01(\x0b\x32\x39.google.ads.googleads.v25.actions.QuoteCampaignsOperationH\x00\x12w\n%recommendation_subscription_operation\x18V \x01(\x0b\x32\x46.google.ads.googleads.v25.services.RecommendationSubscriptionOperationH\x00\x12\x65\n\x1cremarketing_action_operation\x18+ \x01(\x0b\x32=.google.ads.googleads.v25.services.RemarketingActionOperationH\x00\x12\x61\n\x1ashared_criterion_operation\x18\x0e \x01(\x0b\x32;.google.ads.googleads.v25.services.SharedCriterionOperationH\x00\x12U\n\x14shared_set_operation\x18\x0f \x01(\x0b\x32\x35.google.ads.googleads.v25.services.SharedSetOperationH\x00\x12l\n smart_campaign_setting_operation\x18= \x01(\x0b\x32@.google.ads.googleads.v25.services.SmartCampaignSettingOperationH\x00\x12S\n\x13user_list_operation\x18\x10 \x01(\x0b\x32\x34.google.ads.googleads.v25.services.UserListOperationH\x00\x42\x0b\n\toperation\"\xe1\x32\n\x17MutateOperationResponse\x12\x61\n\x18\x61\x64_group_ad_label_result\x18\x11 \x01(\x0b\x32=.google.ads.googleads.v25.services.MutateAdGroupAdLabelResultH\x00\x12V\n\x12\x61\x64_group_ad_result\x18\x01 \x01(\x0b\x32\x38.google.ads.googleads.v25.services.MutateAdGroupAdResultH\x00\x12\\\n\x15\x61\x64_group_asset_result\x18\x38 \x01(\x0b\x32;.google.ads.googleads.v25.services.MutateAdGroupAssetResultH\x00\x12i\n\x1c\x61\x64_group_bid_modifier_result\x18\x02 \x01(\x0b\x32\x41.google.ads.googleads.v25.services.MutateAdGroupBidModifierResultH\x00\x12y\n$ad_group_criterion_customizer_result\x18M \x01(\x0b\x32I.google.ads.googleads.v25.services.MutateAdGroupCriterionCustomizerResultH\x00\x12o\n\x1f\x61\x64_group_criterion_label_result\x18\x12 \x01(\x0b\x32\x44.google.ads.googleads.v25.services.MutateAdGroupCriterionLabelResultH\x00\x12\x64\n\x19\x61\x64_group_criterion_result\x18\x03 \x01(\x0b\x32?.google.ads.googleads.v25.services.MutateAdGroupCriterionResultH\x00\x12\x66\n\x1a\x61\x64_group_customizer_result\x18K \x01(\x0b\x32@.google.ads.googleads.v25.services.MutateAdGroupCustomizerResultH\x00\x12\\\n\x15\x61\x64_group_label_result\x18\x15 \x01(\x0b\x32;.google.ads.googleads.v25.services.MutateAdGroupLabelResultH\x00\x12Q\n\x0f\x61\x64_group_result\x18\x05 \x01(\x0b\x32\x36.google.ads.googleads.v25.services.MutateAdGroupResultH\x00\x12Y\n\x13\x61\x64_parameter_result\x18\x16 \x01(\x0b\x32:.google.ads.googleads.v25.services.MutateAdParameterResultH\x00\x12\x46\n\tad_result\x18\x31 \x01(\x0b\x32\x31.google.ads.googleads.v25.services.MutateAdResultH\x00\x12L\n\x0c\x61sset_result\x18\x17 \x01(\x0b\x32\x34.google.ads.googleads.v25.services.MutateAssetResultH\x00\x12\x62\n\x18\x61sset_group_asset_result\x18\x41 \x01(\x0b\x32>.google.ads.googleads.v25.services.MutateAssetGroupAssetResultH\x00\x12~\n\'asset_group_listing_group_filter_result\x18N \x01(\x0b\x32K.google.ads.googleads.v25.services.MutateAssetGroupListingGroupFilterResultH\x00\x12\x64\n\x19\x61sset_group_signal_result\x18O \x01(\x0b\x32?.google.ads.googleads.v25.services.MutateAssetGroupSignalResultH\x00\x12W\n\x12\x61sset_group_result\x18> \x01(\x0b\x32\x39.google.ads.googleads.v25.services.MutateAssetGroupResultH\x00\x12^\n\x16\x61sset_set_asset_result\x18G \x01(\x0b\x32<.google.ads.googleads.v25.services.MutateAssetSetAssetResultH\x00\x12S\n\x10\x61sset_set_result\x18H \x01(\x0b\x32\x37.google.ads.googleads.v25.services.MutateAssetSetResultH\x00\x12R\n\x0f\x61udience_result\x18P \x01(\x0b\x32\x37.google.ads.googleads.v25.services.MutateAudienceResultH\x00\x12m\n\x1d\x62idding_data_exclusion_result\x18: \x01(\x0b\x32\x44.google.ads.googleads.v25.services.MutateBiddingDataExclusionsResultH\x00\x12}\n%bidding_seasonality_adjustment_result\x18; \x01(\x0b\x32L.google.ads.googleads.v25.services.MutateBiddingSeasonalityAdjustmentsResultH\x00\x12\x61\n\x17\x62idding_strategy_result\x18\x06 \x01(\x0b\x32>.google.ads.googleads.v25.services.MutateBiddingStrategyResultH\x00\x12V\n\x15\x62ook_campaigns_result\x18Y \x01(\x0b\x32\x35.google.ads.googleads.v25.actions.BookCampaignsResultH\x00\x12]\n\x15\x63\x61mpaign_asset_result\x18\x34 \x01(\x0b\x32<.google.ads.googleads.v25.services.MutateCampaignAssetResultH\x00\x12\x64\n\x19\x63\x61mpaign_asset_set_result\x18I \x01(\x0b\x32?.google.ads.googleads.v25.services.MutateCampaignAssetSetResultH\x00\x12j\n\x1c\x63\x61mpaign_bid_modifier_result\x18\x07 \x01(\x0b\x32\x42.google.ads.googleads.v25.services.MutateCampaignBidModifierResultH\x00\x12_\n\x16\x63\x61mpaign_budget_result\x18\x08 \x01(\x0b\x32=.google.ads.googleads.v25.services.MutateCampaignBudgetResultH\x00\x12p\n\x1f\x63\x61mpaign_conversion_goal_result\x18\x43 \x01(\x0b\x32\x45.google.ads.googleads.v25.services.MutateCampaignConversionGoalResultH\x00\x12\x65\n\x19\x63\x61mpaign_criterion_result\x18\r \x01(\x0b\x32@.google.ads.googleads.v25.services.MutateCampaignCriterionResultH\x00\x12g\n\x1a\x63\x61mpaign_customizer_result\x18L \x01(\x0b\x32\x41.google.ads.googleads.v25.services.MutateCampaignCustomizerResultH\x00\x12]\n\x15\x63\x61mpaign_draft_result\x18\x18 \x01(\x0b\x32<.google.ads.googleads.v25.services.MutateCampaignDraftResultH\x00\x12]\n\x15\x63\x61mpaign_group_result\x18\t \x01(\x0b\x32<.google.ads.googleads.v25.services.MutateCampaignGroupResultH\x00\x12]\n\x15\x63\x61mpaign_label_result\x18\x1c \x01(\x0b\x32<.google.ads.googleads.v25.services.MutateCampaignLabelResultH\x00\x12R\n\x0f\x63\x61mpaign_result\x18\n \x01(\x0b\x32\x37.google.ads.googleads.v25.services.MutateCampaignResultH\x00\x12\x66\n\x1a\x63\x61mpaign_shared_set_result\x18\x0b \x01(\x0b\x32@.google.ads.googleads.v25.services.MutateCampaignSharedSetResultH\x00\x12\x63\n\x18\x63onversion_action_result\x18\x0c \x01(\x0b\x32?.google.ads.googleads.v25.services.MutateConversionActionResultH\x00\x12t\n!conversion_custom_variable_result\x18\x37 \x01(\x0b\x32G.google.ads.googleads.v25.services.MutateConversionCustomVariableResultH\x00\x12}\n&conversion_goal_campaign_config_result\x18\x45 \x01(\x0b\x32K.google.ads.googleads.v25.services.MutateConversionGoalCampaignConfigResultH\x00\x12j\n\x1c\x63onversion_value_rule_result\x18? \x01(\x0b\x32\x42.google.ads.googleads.v25.services.MutateConversionValueRuleResultH\x00\x12q\n conversion_value_rule_set_result\x18@ \x01(\x0b\x32\x45.google.ads.googleads.v25.services.MutateConversionValueRuleSetResultH\x00\x12l\n\x1d\x63ustom_conversion_goal_result\x18\x44 \x01(\x0b\x32\x43.google.ads.googleads.v25.services.MutateCustomConversionGoalResultH\x00\x12]\n\x15\x63ustomer_asset_result\x18\x39 \x01(\x0b\x32<.google.ads.googleads.v25.services.MutateCustomerAssetResultH\x00\x12p\n\x1f\x63ustomer_conversion_goal_result\x18\x42 \x01(\x0b\x32\x45.google.ads.googleads.v25.services.MutateCustomerConversionGoalResultH\x00\x12g\n\x1a\x63ustomer_customizer_result\x18J \x01(\x0b\x32\x41.google.ads.googleads.v25.services.MutateCustomerCustomizerResultH\x00\x12]\n\x15\x63ustomer_label_result\x18 \x01(\x0b\x32<.google.ads.googleads.v25.services.MutateCustomerLabelResultH\x00\x12u\n\"customer_negative_criterion_result\x18\" \x01(\x0b\x32G.google.ads.googleads.v25.services.MutateCustomerNegativeCriteriaResultH\x00\x12R\n\x0f\x63ustomer_result\x18# \x01(\x0b\x32\x37.google.ads.googleads.v25.services.MutateCustomerResultH\x00\x12i\n\x1b\x63ustomizer_attribute_result\x18\x46 \x01(\x0b\x32\x42.google.ads.googleads.v25.services.MutateCustomizerAttributeResultH\x00\x12V\n\x11\x65xperiment_result\x18Q \x01(\x0b\x32\x39.google.ads.googleads.v25.services.MutateExperimentResultH\x00\x12]\n\x15\x65xperiment_arm_result\x18R \x01(\x0b\x32<.google.ads.googleads.v25.services.MutateExperimentArmResultH\x00\x12i\n\x1ckeyword_plan_ad_group_result\x18, \x01(\x0b\x32\x41.google.ads.googleads.v25.services.MutateKeywordPlanAdGroupResultH\x00\x12j\n\x1ckeyword_plan_campaign_result\x18- \x01(\x0b\x32\x42.google.ads.googleads.v25.services.MutateKeywordPlanCampaignResultH\x00\x12x\n$keyword_plan_ad_group_keyword_result\x18\x32 \x01(\x0b\x32H.google.ads.googleads.v25.services.MutateKeywordPlanAdGroupKeywordResultH\x00\x12y\n$keyword_plan_campaign_keyword_result\x18\x33 \x01(\x0b\x32I.google.ads.googleads.v25.services.MutateKeywordPlanCampaignKeywordResultH\x00\x12Z\n\x13keyword_plan_result\x18\x30 \x01(\x0b\x32;.google.ads.googleads.v25.services.MutateKeywordPlansResultH\x00\x12L\n\x0clabel_result\x18) \x01(\x0b\x32\x34.google.ads.googleads.v25.services.MutateLabelResultH\x00\x12X\n\x16quote_campaigns_result\x18X \x01(\x0b\x32\x36.google.ads.googleads.v25.actions.QuoteCampaignsResultH\x00\x12w\n\"recommendation_subscription_result\x18U \x01(\x0b\x32I.google.ads.googleads.v25.services.MutateRecommendationSubscriptionResultH\x00\x12\x65\n\x19remarketing_action_result\x18+ \x01(\x0b\x32@.google.ads.googleads.v25.services.MutateRemarketingActionResultH\x00\x12\x61\n\x17shared_criterion_result\x18\x0e \x01(\x0b\x32>.google.ads.googleads.v25.services.MutateSharedCriterionResultH\x00\x12U\n\x11shared_set_result\x18\x0f \x01(\x0b\x32\x38.google.ads.googleads.v25.services.MutateSharedSetResultH\x00\x12l\n\x1dsmart_campaign_setting_result\x18= \x01(\x0b\x32\x43.google.ads.googleads.v25.services.MutateSmartCampaignSettingResultH\x00\x12S\n\x10user_list_result\x18\x10 \x01(\x0b\x32\x37.google.ads.googleads.v25.services.MutateUserListResultH\x00\x42\n\n\x08response\"f\n\x0eSearchSettings\x12\x14\n\x0comit_results\x18\x01 \x01(\x08\x12\x1a\n\x12return_summary_row\x18\x02 \x01(\x08\x12\"\n\x1areturn_total_results_count\x18\x03 \x01(\x08\"\x9c\x01\n\x10MetricAttributes\x12\x0c\n\x04name\x18\x01 \x01(\t\x12Q\n\nattributes\x18\x02 \x03(\x0b\x32=.google.ads.googleads.v25.services.MetricAttributes.Attribute\x1a\'\n\tAttribute\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t2\xf5\x05\n\x10GoogleAdsService\x12\xcf\x01\n\x06Search\x12\x39.google.ads.googleads.v25.services.SearchGoogleAdsRequest\x1a:.google.ads.googleads.v25.services.SearchGoogleAdsResponse\"N\xda\x41\x11\x63ustomer_id,query\x82\xd3\xe4\x93\x02\x34\"//v25/customers/{customer_id=*}/googleAds:search:\x01*\x12\xe9\x01\n\x0cSearchStream\x12?.google.ads.googleads.v25.services.SearchGoogleAdsStreamRequest\x1a@.google.ads.googleads.v25.services.SearchGoogleAdsStreamResponse\"T\xda\x41\x11\x63ustomer_id,query\x82\xd3\xe4\x93\x02:\"5/v25/customers/{customer_id=*}/googleAds:searchStream:\x01*0\x01\x12\xdb\x01\n\x06Mutate\x12\x39.google.ads.googleads.v25.services.MutateGoogleAdsRequest\x1a:.google.ads.googleads.v25.services.MutateGoogleAdsResponse\"Z\xda\x41\x1d\x63ustomer_id,mutate_operations\x82\xd3\xe4\x93\x02\x34\"//v25/customers/{customer_id=*}/googleAds:mutate:\x01*\x1a\x45\xca\x41\x18googleads.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/adwordsB\x81\x02\n%com.google.ads.googleads.v25.servicesB\x15GoogleAdsServiceProtoP\x01ZIgoogle.golang.org/genproto/googleapis/ads/googleads/v25/services;services\xa2\x02\x03GAA\xaa\x02!Google.Ads.GoogleAds.V25.Services\xca\x02!Google\\Ads\\GoogleAds\\V25\\Services\xea\x02%Google::Ads::GoogleAds::V25::Servicesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Services + SearchGoogleAdsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.SearchGoogleAdsRequest").msgclass + SearchGoogleAdsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.SearchGoogleAdsResponse").msgclass + SearchGoogleAdsStreamRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.SearchGoogleAdsStreamRequest").msgclass + SearchGoogleAdsStreamResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.SearchGoogleAdsStreamResponse").msgclass + GoogleAdsRow = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.GoogleAdsRow").msgclass + MutateGoogleAdsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.MutateGoogleAdsRequest").msgclass + MutateGoogleAdsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.MutateGoogleAdsResponse").msgclass + MutateOperation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.MutateOperation").msgclass + MutateOperationResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.MutateOperationResponse").msgclass + SearchSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.SearchSettings").msgclass + MetricAttributes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.MetricAttributes").msgclass + MetricAttributes::Attribute = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.MetricAttributes.Attribute").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/google_ads_service_services_pb.rb b/lib/google/ads/google_ads/v25/services/google_ads_service_services_pb.rb new file mode 100644 index 000000000..16241c2a5 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/google_ads_service_services_pb.rb @@ -0,0 +1,189 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/ads/googleads/v25/services/google_ads_service.proto for package 'Google.Ads.GoogleAds.V25.Services' +# Original file comments: +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +require 'grpc' +require 'google/ads/google_ads/v25/services/google_ads_service_pb' + +module Google + module Ads + module GoogleAds + module V25 + module Services + module GoogleAdsService + # Proto file describing the GoogleAdsService. + # + # Service to fetch data and metrics across resources. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.ads.googleads.v25.services.GoogleAdsService' + + # Returns all rows that match the search query. + # + # List of thrown errors: + # [AuthenticationError]() + # [AuthorizationError]() + # [ChangeEventError]() + # [ChangeStatusError]() + # [ClickViewError]() + # [HeaderError]() + # [InternalError]() + # [QueryError]() + # [QuotaError]() + # [RequestError]() + rpc :Search, ::Google::Ads::GoogleAds::V25::Services::SearchGoogleAdsRequest, ::Google::Ads::GoogleAds::V25::Services::SearchGoogleAdsResponse + # Returns all rows that match the search stream query. + # + # List of thrown errors: + # [AuthenticationError]() + # [AuthorizationError]() + # [ChangeEventError]() + # [ChangeStatusError]() + # [ClickViewError]() + # [HeaderError]() + # [InternalError]() + # [QueryError]() + # [QuotaError]() + # [RequestError]() + rpc :SearchStream, ::Google::Ads::GoogleAds::V25::Services::SearchGoogleAdsStreamRequest, stream(::Google::Ads::GoogleAds::V25::Services::SearchGoogleAdsStreamResponse) + # Executes mutate and actions operations. Mutate operations create, update, + # or remove resources. Actions perform custom operations. This method + # supports atomic transactions with multiple types of resources and + # actions. For example, you can atomically create a campaign and a campaign + # budget, or perform up to thousands of mutates atomically. + # + # This method is essentially a wrapper around a series of mutate methods. The + # only features it offers over calling those methods directly are: + # + # - Atomic transactions + # - Temp resource names (described below) + # - Somewhat reduced latency over making a series of mutate calls + # + # Note: Only resources that support atomic transactions are included, so this + # method can't replace all calls to individual services. + # + # ## Atomic Transaction Benefits + # + # Atomicity makes error handling much easier. If you're making a series of + # changes and one fails, it can leave your account in an inconsistent state. + # With atomicity, you either reach the chosen state directly, or the request + # fails and you can retry. + # + # ## Temp Resource Names + # + # Temp resource names are a special type of resource name used to create a + # resource and reference that resource in the same request. For example, if a + # campaign budget is created with `resource_name` equal to + # `customers/123/campaignBudgets/-1`, that resource name can be reused in + # the `Campaign.budget` field in the same request. That way, the two + # resources are created and linked atomically. + # + # To create a temp resource name, put a negative number in the part of the + # name that the server would normally allocate. + # + # Note: + # + # - Resources must be created with a temp name before the name can be reused. + # For example, the previous CampaignBudget+Campaign example would fail if + # the mutate order was reversed. + # - Temp names are not remembered across requests. + # - There's no limit to the number of temp names in a request. + # - Each temp name must use a unique negative number, even if the resource + # types differ. + # + # ## Latency + # + # It's important to group mutates by resource type or the request may time + # out and fail. Latency is roughly equal to a series of calls to individual + # mutate methods, where each change in resource type is a new call. For + # example, mutating 10 campaigns then 10 ad groups is like 2 calls, while + # mutating 1 campaign, 1 ad group, 1 campaign, 1 ad group is like 4 calls. + # + # List of thrown errors: + # [AdCustomizerError]() + # [AdError]() + # [AdGroupAdError]() + # [AdGroupCriterionError]() + # [AdGroupError]() + # [AssetError]() + # [AuthenticationError]() + # [AuthorizationError]() + # [BiddingError]() + # [CampaignBudgetError]() + # [CampaignCriterionError]() + # [CampaignError]() + # [CampaignExperimentError]() + # [CampaignSharedSetError]() + # [CollectionSizeError]() + # [ContextError]() + # [ConversionActionError]() + # [CriterionError]() + # [CustomerFeedError]() + # [DatabaseError]() + # [DateError]() + # [DateRangeError]() + # [DistinctError]() + # [ExtensionFeedItemError]() + # [ExtensionSettingError]() + # [FeedAttributeReferenceError]() + # [FeedError]() + # [FeedItemError]() + # [FeedItemSetError]() + # [FieldError]() + # [FieldMaskError]() + # [FunctionParsingError]() + # [HeaderError]() + # [ImageError]() + # [InternalError]() + # [KeywordPlanAdGroupKeywordError]() + # [KeywordPlanCampaignError]() + # [KeywordPlanError]() + # [LabelError]() + # [ListOperationError]() + # [MediaUploadError]() + # [MutateError]() + # [NewResourceCreationError]() + # [NullError]() + # [OperationAccessDeniedError]() + # [PolicyFindingError]() + # [PolicyViolationError]() + # [QuotaError]() + # [RangeError]() + # [RequestError]() + # [ResourceCountLimitExceededError]() + # [SettingError]() + # [SharedSetError]() + # [SizeLimitError]() + # [StringFormatError]() + # [StringLengthError]() + # [UrlFieldError]() + # [UserListError]() + # [YoutubeVideoRegistrationError]() + rpc :Mutate, ::Google::Ads::GoogleAds::V25::Services::MutateGoogleAdsRequest, ::Google::Ads::GoogleAds::V25::Services::MutateGoogleAdsResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/identity_verification_service.rb b/lib/google/ads/google_ads/v25/services/identity_verification_service.rb new file mode 100644 index 000000000..6ff58974c --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/identity_verification_service.rb @@ -0,0 +1,50 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/ads/google_ads/version" + +require "google/ads/google_ads/v25/services/identity_verification_service/credentials" +require "google/ads/google_ads/v25/services/identity_verification_service/client" + +module Google + module Ads + module GoogleAds + module V25 + module Services + ## + # A service for managing Identity Verification Service. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/ads/google_ads/v25/services/identity_verification_service" + # client = ::Google::Ads::GoogleAds::V25::Services::IdentityVerificationService::Client.new + # + module IdentityVerificationService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "identity_verification_service", "helpers.rb" +require "google/ads/google_ads/v25/services/identity_verification_service/helpers" if ::File.file? helper_path diff --git a/lib/google/ads/google_ads/v25/services/identity_verification_service/client.rb b/lib/google/ads/google_ads/v25/services/identity_verification_service/client.rb new file mode 100644 index 000000000..ff2c4411f --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/identity_verification_service/client.rb @@ -0,0 +1,591 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# require "google/ads/google_ads/error" +require "google/ads/google_ads/v25/services/identity_verification_service_pb" + +module Google + module Ads + module GoogleAds + module V25 + module Services + module IdentityVerificationService + ## + # Client for the IdentityVerificationService service. + # + # A service for managing Identity Verification Service. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "googleads.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :identity_verification_service_stub + + ## + # Configure the IdentityVerificationService Client class. + # + # See {::Google::Ads::GoogleAds::V25::Services::IdentityVerificationService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all IdentityVerificationService clients + # ::Google::Ads::GoogleAds::V25::Services::IdentityVerificationService::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + default_config = Client::Configuration.new + + default_config.timeout = 14_400.0 + default_config.retry_policy = { + initial_delay: 5.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the IdentityVerificationService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Ads::GoogleAds::V25::Services::IdentityVerificationService::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @identity_verification_service_stub.universe_domain + end + + ## + # Create a new IdentityVerificationService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Ads::GoogleAds::V25::Services::IdentityVerificationService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Ads::GoogleAds::V25::Services::IdentityVerificationService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the IdentityVerificationService client. + # @yieldparam config [Client::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/ads/google_ads/v25/services/identity_verification_service_services_pb" + + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @identity_verification_service_stub = ::Gapic::ServiceStub.new( + ::Google::Ads::GoogleAds::V25::Services::IdentityVerificationService::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool, + logger: @config.logger + ) + + @identity_verification_service_stub.stub_logger&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @identity_verification_service_stub.logger + end + + # Service calls + + ## + # Starts Identity Verification for a given verification program type. + # Statuses are returned. + # + # List of thrown errors: + # [AuthenticationError]() + # [AuthorizationError]() + # [HeaderError]() + # [InternalError]() + # [QuotaError]() + # [RequestError]() + # + # @overload start_identity_verification(request, options = nil) + # Pass arguments to `start_identity_verification` via a request object, either of type + # {::Google::Ads::GoogleAds::V25::Services::StartIdentityVerificationRequest} or an equivalent Hash. + # + # @param request [::Google::Ads::GoogleAds::V25::Services::StartIdentityVerificationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload start_identity_verification(customer_id: nil, verification_program: nil) + # Pass arguments to `start_identity_verification` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param customer_id [::String] + # Required. The Id of the customer for whom we are creating this + # verification. + # @param verification_program [::Google::Ads::GoogleAds::V25::Enums::IdentityVerificationProgramEnum::IdentityVerificationProgram] + # Required. The verification program type for which we want to start the + # verification. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [Google::Ads::GoogleAds::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/ads/google_ads/v25/services" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Ads::GoogleAds::V25::Services::IdentityVerificationService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Ads::GoogleAds::V25::Services::StartIdentityVerificationRequest.new + # + # # Call the start_identity_verification method. + # result = client.start_identity_verification request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def start_identity_verification request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::GoogleAds::V25::Services::StartIdentityVerificationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.start_identity_verification.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Ads::GoogleAds::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.customer_id + header_params["customer_id"] = request.customer_id + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.start_identity_verification.timeout, + metadata: metadata, + retry_policy: @config.rpcs.start_identity_verification.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @identity_verification_service_stub.call_rpc :start_identity_verification, request, + options: options do |response, operation| + yield response, operation if block_given? + end + # rescue GRPC::BadStatus => grpc_error + # raise Google::Ads::GoogleAds::Error.new grpc_error.message + end + + ## + # Returns Identity Verification information. + # + # List of thrown errors: + # [AuthenticationError]() + # [AuthorizationError]() + # [HeaderError]() + # [InternalError]() + # [QuotaError]() + # [RequestError]() + # + # @overload get_identity_verification(request, options = nil) + # Pass arguments to `get_identity_verification` via a request object, either of type + # {::Google::Ads::GoogleAds::V25::Services::GetIdentityVerificationRequest} or an equivalent Hash. + # + # @param request [::Google::Ads::GoogleAds::V25::Services::GetIdentityVerificationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_identity_verification(customer_id: nil) + # Pass arguments to `get_identity_verification` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param customer_id [::String] + # Required. The ID of the customer for whom we are requesting verification + # information. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Ads::GoogleAds::V25::Services::GetIdentityVerificationResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Ads::GoogleAds::V25::Services::GetIdentityVerificationResponse] + # + # @raise [Google::Ads::GoogleAds::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/ads/google_ads/v25/services" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Ads::GoogleAds::V25::Services::IdentityVerificationService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Ads::GoogleAds::V25::Services::GetIdentityVerificationRequest.new + # + # # Call the get_identity_verification method. + # result = client.get_identity_verification request + # + # # The returned object is of type Google::Ads::GoogleAds::V25::Services::GetIdentityVerificationResponse. + # p result + # + def get_identity_verification request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::GoogleAds::V25::Services::GetIdentityVerificationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_identity_verification.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Ads::GoogleAds::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.customer_id + header_params["customer_id"] = request.customer_id + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_identity_verification.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_identity_verification.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @identity_verification_service_stub.call_rpc :get_identity_verification, request, + options: options do |response, operation| + yield response, operation if block_given? + end + # rescue GRPC::BadStatus => grpc_error + # raise Google::Ads::GoogleAds::Error.new grpc_error.message + end + + ## + # Configuration class for the IdentityVerificationService API. + # + # This class represents the configuration for IdentityVerificationService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Ads::GoogleAds::V25::Services::IdentityVerificationService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # start_identity_verification to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Ads::GoogleAds::V25::Services::IdentityVerificationService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.start_identity_verification.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Ads::GoogleAds::V25::Services::IdentityVerificationService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.start_identity_verification.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Ads::GoogleAds::V25::Services::IdentityVerificationService::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "googleads.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, + ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the IdentityVerificationService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `start_identity_verification` + # @return [::Gapic::Config::Method] + # + attr_reader :start_identity_verification + ## + # RPC-specific configuration for `get_identity_verification` + # @return [::Gapic::Config::Method] + # + attr_reader :get_identity_verification + + # @private + def initialize parent_rpcs = nil + start_identity_verification_config = parent_rpcs.start_identity_verification if parent_rpcs.respond_to? :start_identity_verification + @start_identity_verification = ::Gapic::Config::Method.new start_identity_verification_config + get_identity_verification_config = parent_rpcs.get_identity_verification if parent_rpcs.respond_to? :get_identity_verification + @get_identity_verification = ::Gapic::Config::Method.new get_identity_verification_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/identity_verification_service/credentials.rb b/lib/google/ads/google_ads/v25/services/identity_verification_service/credentials.rb new file mode 100644 index 000000000..62bf09b21 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/identity_verification_service/credentials.rb @@ -0,0 +1,38 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Ads + module GoogleAds + module V25 + module Services + module IdentityVerificationService + # Credentials for the IdentityVerificationService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/adwords" + ] + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/identity_verification_service_pb.rb b/lib/google/ads/google_ads/v25/services/identity_verification_service_pb.rb new file mode 100644 index 000000000..bcb0a80c8 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/identity_verification_service_pb.rb @@ -0,0 +1,35 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/services/identity_verification_service.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/enums/identity_verification_program_pb' +require 'google/ads/google_ads/v25/enums/identity_verification_program_status_pb' +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/protobuf/empty_pb' + + +descriptor_data = "\nEgoogle/ads/googleads/v25/services/identity_verification_service.proto\x12!google.ads.googleads.v25.services\x1a\x42google/ads/googleads/v25/enums/identity_verification_program.proto\x1aIgoogle/ads/googleads/v25/enums/identity_verification_program_status.proto\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1bgoogle/protobuf/empty.proto\"\xbc\x01\n StartIdentityVerificationRequest\x12\x18\n\x0b\x63ustomer_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12~\n\x14verification_program\x18\x02 \x01(\x0e\x32[.google.ads.googleads.v25.enums.IdentityVerificationProgramEnum.IdentityVerificationProgramB\x03\xe0\x41\x02\":\n\x1eGetIdentityVerificationRequest\x12\x18\n\x0b\x63ustomer_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\"y\n\x1fGetIdentityVerificationResponse\x12V\n\x15identity_verification\x18\x01 \x03(\x0b\x32\x37.google.ads.googleads.v25.services.IdentityVerification\"\xaa\x03\n\x14IdentityVerification\x12y\n\x14verification_program\x18\x01 \x01(\x0e\x32[.google.ads.googleads.v25.enums.IdentityVerificationProgramEnum.IdentityVerificationProgram\x12r\n!identity_verification_requirement\x18\x02 \x01(\x0b\x32\x42.google.ads.googleads.v25.services.IdentityVerificationRequirementH\x00\x88\x01\x01\x12\x63\n\x15verification_progress\x18\x03 \x01(\x0b\x32?.google.ads.googleads.v25.services.IdentityVerificationProgressH\x01\x88\x01\x01\x42$\n\"_identity_verification_requirementB\x18\n\x16_verification_progress\"\xdc\x01\n\x1cIdentityVerificationProgress\x12\x7f\n\x0eprogram_status\x18\x01 \x01(\x0e\x32g.google.ads.googleads.v25.enums.IdentityVerificationProgramStatusEnum.IdentityVerificationProgramStatus\x12\'\n\x1finvitation_link_expiration_time\x18\x02 \x01(\t\x12\x12\n\naction_url\x18\x03 \x01(\t\"z\n\x1fIdentityVerificationRequirement\x12(\n verification_start_deadline_time\x18\x01 \x01(\t\x12-\n%verification_completion_deadline_time\x18\x02 \x01(\t2\xb8\x04\n\x1bIdentityVerificationService\x12\xe0\x01\n\x19StartIdentityVerification\x12\x43.google.ads.googleads.v25.services.StartIdentityVerificationRequest\x1a\x16.google.protobuf.Empty\"f\xda\x41 customer_id,verification_program\x82\xd3\xe4\x93\x02=\"8/v25/customers/{customer_id=*}:startIdentityVerification:\x01*\x12\xee\x01\n\x17GetIdentityVerification\x12\x41.google.ads.googleads.v25.services.GetIdentityVerificationRequest\x1a\x42.google.ads.googleads.v25.services.GetIdentityVerificationResponse\"L\xda\x41\x0b\x63ustomer_id\x82\xd3\xe4\x93\x02\x38\x12\x36/v25/customers/{customer_id=*}/getIdentityVerification\x1a\x45\xca\x41\x18googleads.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/adwordsB\x8c\x02\n%com.google.ads.googleads.v25.servicesB IdentityVerificationServiceProtoP\x01ZIgoogle.golang.org/genproto/googleapis/ads/googleads/v25/services;services\xa2\x02\x03GAA\xaa\x02!Google.Ads.GoogleAds.V25.Services\xca\x02!Google\\Ads\\GoogleAds\\V25\\Services\xea\x02%Google::Ads::GoogleAds::V25::Servicesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Services + StartIdentityVerificationRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.StartIdentityVerificationRequest").msgclass + GetIdentityVerificationRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.GetIdentityVerificationRequest").msgclass + GetIdentityVerificationResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.GetIdentityVerificationResponse").msgclass + IdentityVerification = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.IdentityVerification").msgclass + IdentityVerificationProgress = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.IdentityVerificationProgress").msgclass + IdentityVerificationRequirement = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.IdentityVerificationRequirement").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/identity_verification_service_services_pb.rb b/lib/google/ads/google_ads/v25/services/identity_verification_service_services_pb.rb new file mode 100644 index 000000000..d0d6c3177 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/identity_verification_service_services_pb.rb @@ -0,0 +1,68 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/ads/googleads/v25/services/identity_verification_service.proto for package 'Google.Ads.GoogleAds.V25.Services' +# Original file comments: +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +require 'grpc' +require 'google/ads/google_ads/v25/services/identity_verification_service_pb' + +module Google + module Ads + module GoogleAds + module V25 + module Services + module IdentityVerificationService + # Proto file describing the IdentityVerificatio Service. + # + # A service for managing Identity Verification Service. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.ads.googleads.v25.services.IdentityVerificationService' + + # Starts Identity Verification for a given verification program type. + # Statuses are returned. + # + # List of thrown errors: + # [AuthenticationError]() + # [AuthorizationError]() + # [HeaderError]() + # [InternalError]() + # [QuotaError]() + # [RequestError]() + rpc :StartIdentityVerification, ::Google::Ads::GoogleAds::V25::Services::StartIdentityVerificationRequest, ::Google::Protobuf::Empty + # Returns Identity Verification information. + # + # List of thrown errors: + # [AuthenticationError]() + # [AuthorizationError]() + # [HeaderError]() + # [InternalError]() + # [QuotaError]() + # [RequestError]() + rpc :GetIdentityVerification, ::Google::Ads::GoogleAds::V25::Services::GetIdentityVerificationRequest, ::Google::Ads::GoogleAds::V25::Services::GetIdentityVerificationResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/incentive_service.rb b/lib/google/ads/google_ads/v25/services/incentive_service.rb new file mode 100644 index 000000000..23f58e14b --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/incentive_service.rb @@ -0,0 +1,50 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/ads/google_ads/version" + +require "google/ads/google_ads/v25/services/incentive_service/credentials" +require "google/ads/google_ads/v25/services/incentive_service/client" + +module Google + module Ads + module GoogleAds + module V25 + module Services + ## + # Service to support incentive related operations. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/ads/google_ads/v25/services/incentive_service" + # client = ::Google::Ads::GoogleAds::V25::Services::IncentiveService::Client.new + # + module IncentiveService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "incentive_service", "helpers.rb" +require "google/ads/google_ads/v25/services/incentive_service/helpers" if ::File.file? helper_path diff --git a/lib/google/ads/google_ads/v25/services/incentive_service/client.rb b/lib/google/ads/google_ads/v25/services/incentive_service/client.rb new file mode 100644 index 000000000..920a463a8 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/incentive_service/client.rb @@ -0,0 +1,589 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# require "google/ads/google_ads/error" +require "google/ads/google_ads/v25/services/incentive_service_pb" + +module Google + module Ads + module GoogleAds + module V25 + module Services + module IncentiveService + ## + # Client for the IncentiveService service. + # + # Service to support incentive related operations. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "googleads.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :incentive_service_stub + + ## + # Configure the IncentiveService Client class. + # + # See {::Google::Ads::GoogleAds::V25::Services::IncentiveService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all IncentiveService clients + # ::Google::Ads::GoogleAds::V25::Services::IncentiveService::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + default_config = Client::Configuration.new + + default_config.timeout = 14_400.0 + default_config.retry_policy = { + initial_delay: 5.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the IncentiveService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Ads::GoogleAds::V25::Services::IncentiveService::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @incentive_service_stub.universe_domain + end + + ## + # Create a new IncentiveService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Ads::GoogleAds::V25::Services::IncentiveService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Ads::GoogleAds::V25::Services::IncentiveService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the IncentiveService client. + # @yieldparam config [Client::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/ads/google_ads/v25/services/incentive_service_services_pb" + + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @incentive_service_stub = ::Gapic::ServiceStub.new( + ::Google::Ads::GoogleAds::V25::Services::IncentiveService::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool, + logger: @config.logger + ) + + @incentive_service_stub.stub_logger&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @incentive_service_stub.logger + end + + # Service calls + + ## + # Returns incentives for a given user. + # + # @overload fetch_incentive(request, options = nil) + # Pass arguments to `fetch_incentive` via a request object, either of type + # {::Google::Ads::GoogleAds::V25::Services::FetchIncentiveRequest} or an equivalent Hash. + # + # @param request [::Google::Ads::GoogleAds::V25::Services::FetchIncentiveRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload fetch_incentive(language_code: nil, country_code: nil, email: nil, incentive_type: nil) + # Pass arguments to `fetch_incentive` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param language_code [::String] + # Optional. User's language code. + # If not provided, the server will default to "en". + # Possible language codes: + # https://developers.google.com/google-ads/api/data/codes-formats#languages + # @param country_code [::String] + # Optional. User's country code. + # If not provided, the server will default to "US". + # Possible country codes: + # https://developers.google.com/google-ads/api/data/codes-formats#country_codes + # @param email [::String] + # Optional. Email of the user that the requested incentive is meant for. + # Will be used for channel partners who do NOT use OAuth to authenticate on + # behalf of user. + # @param incentive_type [::Google::Ads::GoogleAds::V25::Enums::IncentiveTypeEnum::IncentiveType] + # Optional. The type of incentive to get. + # Defaults to ACQUISITION. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Ads::GoogleAds::V25::Services::FetchIncentiveResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Ads::GoogleAds::V25::Services::FetchIncentiveResponse] + # + # @raise [Google::Ads::GoogleAds::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/ads/google_ads/v25/services" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Ads::GoogleAds::V25::Services::IncentiveService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Ads::GoogleAds::V25::Services::FetchIncentiveRequest.new + # + # # Call the fetch_incentive method. + # result = client.fetch_incentive request + # + # # The returned object is of type Google::Ads::GoogleAds::V25::Services::FetchIncentiveResponse. + # p result + # + def fetch_incentive request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::GoogleAds::V25::Services::FetchIncentiveRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.fetch_incentive.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Ads::GoogleAds::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.fetch_incentive.timeout, + metadata: metadata, + retry_policy: @config.rpcs.fetch_incentive.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @incentive_service_stub.call_rpc :fetch_incentive, request, options: options do |response, operation| + yield response, operation if block_given? + end + # rescue GRPC::BadStatus => grpc_error + # raise Google::Ads::GoogleAds::Error.new grpc_error.message + end + + ## + # Applies the incentive for the ads customer. + # + # @overload apply_incentive(request, options = nil) + # Pass arguments to `apply_incentive` via a request object, either of type + # {::Google::Ads::GoogleAds::V25::Services::ApplyIncentiveRequest} or an equivalent Hash. + # + # @param request [::Google::Ads::GoogleAds::V25::Services::ApplyIncentiveRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload apply_incentive(selected_incentive_id: nil, customer_id: nil, country_code: nil) + # Pass arguments to `apply_incentive` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param selected_incentive_id [::Integer] + # Required. The incentive ID of this incentive. This is used to identify + # which incentive is selected by the user in the CYO flow. + # @param customer_id [::String] + # Required. The customer ID of the account that the incentive is being + # applied to. + # @param country_code [::String] + # Required. User's country code. + # Required. This field must be equal to the Google Ads account's billing + # country. Incentive eligibility, terms of service, and reward values are + # often country-specific. This country code is used to ensure the selected + # incentive is applicable to the user. + # Possible country codes: + # https://developers.google.com/google-ads/api/data/codes-formats#country_codes + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Ads::GoogleAds::V25::Services::ApplyIncentiveResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Ads::GoogleAds::V25::Services::ApplyIncentiveResponse] + # + # @raise [Google::Ads::GoogleAds::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/ads/google_ads/v25/services" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Ads::GoogleAds::V25::Services::IncentiveService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Ads::GoogleAds::V25::Services::ApplyIncentiveRequest.new + # + # # Call the apply_incentive method. + # result = client.apply_incentive request + # + # # The returned object is of type Google::Ads::GoogleAds::V25::Services::ApplyIncentiveResponse. + # p result + # + def apply_incentive request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::GoogleAds::V25::Services::ApplyIncentiveRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.apply_incentive.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Ads::GoogleAds::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.customer_id + header_params["customer_id"] = request.customer_id + end + if request.selected_incentive_id + header_params["selected_incentive_id"] = request.selected_incentive_id + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.apply_incentive.timeout, + metadata: metadata, + retry_policy: @config.rpcs.apply_incentive.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @incentive_service_stub.call_rpc :apply_incentive, request, options: options do |response, operation| + yield response, operation if block_given? + end + # rescue GRPC::BadStatus => grpc_error + # raise Google::Ads::GoogleAds::Error.new grpc_error.message + end + + ## + # Configuration class for the IncentiveService API. + # + # This class represents the configuration for IncentiveService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Ads::GoogleAds::V25::Services::IncentiveService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # fetch_incentive to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Ads::GoogleAds::V25::Services::IncentiveService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.fetch_incentive.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Ads::GoogleAds::V25::Services::IncentiveService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.fetch_incentive.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Ads::GoogleAds::V25::Services::IncentiveService::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "googleads.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, + ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the IncentiveService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `fetch_incentive` + # @return [::Gapic::Config::Method] + # + attr_reader :fetch_incentive + ## + # RPC-specific configuration for `apply_incentive` + # @return [::Gapic::Config::Method] + # + attr_reader :apply_incentive + + # @private + def initialize parent_rpcs = nil + fetch_incentive_config = parent_rpcs.fetch_incentive if parent_rpcs.respond_to? :fetch_incentive + @fetch_incentive = ::Gapic::Config::Method.new fetch_incentive_config + apply_incentive_config = parent_rpcs.apply_incentive if parent_rpcs.respond_to? :apply_incentive + @apply_incentive = ::Gapic::Config::Method.new apply_incentive_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/incentive_service/credentials.rb b/lib/google/ads/google_ads/v25/services/incentive_service/credentials.rb new file mode 100644 index 000000000..9bf831bee --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/incentive_service/credentials.rb @@ -0,0 +1,38 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Ads + module GoogleAds + module V25 + module Services + module IncentiveService + # Credentials for the IncentiveService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/adwords" + ] + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/incentive_service_pb.rb b/lib/google/ads/google_ads/v25/services/incentive_service_pb.rb new file mode 100644 index 000000000..2fbc290ae --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/incentive_service_pb.rb @@ -0,0 +1,38 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/services/incentive_service.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/enums/incentive_offer_type_pb' +require 'google/ads/google_ads/v25/enums/incentive_type_pb' +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/type/money_pb' + + +descriptor_data = "\n9google/ads/googleads/v25/services/incentive_service.proto\x12!google.ads.googleads.v25.services\x1a\x39google/ads/googleads/v25/enums/incentive_offer_type.proto\x1a\x33google/ads/googleads/v25/enums/incentive_type.proto\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x17google/type/money.proto\"\x94\x02\n\x15\x46\x65tchIncentiveRequest\x12\x1f\n\rlanguage_code\x18\x01 \x01(\tB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12\x1e\n\x0c\x63ountry_code\x18\x02 \x01(\tB\x03\xe0\x41\x01H\x01\x88\x01\x01\x12\x17\n\x05\x65mail\x18\x03 \x01(\tB\x03\xe0\x41\x01H\x02\x88\x01\x01\x12\x61\n\x0eincentive_type\x18\x05 \x01(\x0e\x32?.google.ads.googleads.v25.enums.IncentiveTypeEnum.IncentiveTypeB\x03\xe0\x41\x01H\x03\x88\x01\x01\x42\x10\n\x0e_language_codeB\x0f\n\r_country_codeB\x08\n\x06_emailB\x11\n\x0f_incentive_type\"\xf3\x04\n\tIncentive\x12\x19\n\x0cincentive_id\x18\x01 \x01(\x03H\x00\x88\x01\x01\x12R\n\x0brequirement\x18\x02 \x01(\x0b\x32\x38.google.ads.googleads.v25.services.Incentive.RequirementH\x01\x88\x01\x01\x12/\n\"incentive_terms_and_conditions_url\x18\x03 \x01(\tH\x02\x88\x01\x01\x12\\\n\x0eincentive_type\x18\x05 \x01(\x0e\x32?.google.ads.googleads.v25.enums.IncentiveTypeEnum.IncentiveTypeH\x03\x88\x01\x01\x1a\x8c\x02\n\x0bRequirement\x12T\n\x05spend\x18\x01 \x01(\x0b\x32>.google.ads.googleads.v25.services.Incentive.Requirement.SpendB\x03\xe0\x41\x01H\x00\x1a\x97\x01\n\x05Spend\x12\x32\n\x0c\x61ward_amount\x18\x01 \x01(\x0b\x32\x12.google.type.MoneyB\x03\xe0\x41\x02H\x00\x88\x01\x01\x12\x35\n\x0frequired_amount\x18\x02 \x01(\x0b\x32\x12.google.type.MoneyB\x03\xe0\x41\x02H\x01\x88\x01\x01\x42\x0f\n\r_award_amountB\x12\n\x10_required_amountB\r\n\x0brequirementB\x0f\n\r_incentive_idB\x0e\n\x0c_requirementB%\n#_incentive_terms_and_conditions_urlB\x11\n\x0f_incentive_type\"\xa2\x02\n\rCyoIncentives\x12I\n\tlow_offer\x18\x01 \x01(\x0b\x32,.google.ads.googleads.v25.services.IncentiveB\x03\xe0\x41\x02H\x00\x88\x01\x01\x12L\n\x0cmedium_offer\x18\x02 \x01(\x0b\x32,.google.ads.googleads.v25.services.IncentiveB\x03\xe0\x41\x02H\x01\x88\x01\x01\x12J\n\nhigh_offer\x18\x03 \x01(\x0b\x32,.google.ads.googleads.v25.services.IncentiveB\x03\xe0\x41\x02H\x02\x88\x01\x01\x42\x0c\n\n_low_offerB\x0f\n\r_medium_offerB\r\n\x0b_high_offer\"\xc3\x02\n\x0eIncentiveOffer\x12\x37\n%consolidated_terms_and_conditions_url\x18\x02 \x01(\tB\x03\xe0\x41\x01H\x01\x88\x01\x01\x12^\n\noffer_type\x18\x04 \x01(\x0e\x32@.google.ads.googleads.v25.enums.IncentiveOfferTypeEnum.OfferTypeB\x03\xe0\x41\x02H\x02\x88\x01\x01\x12J\n\x0e\x63yo_incentives\x18\x03 \x01(\x0b\x32\x30.google.ads.googleads.v25.services.CyoIncentivesH\x00\x42\x13\n\x11incentive_detailsB(\n&_consolidated_terms_and_conditions_urlB\r\n\x0b_offer_type\"\x82\x01\n\x16\x46\x65tchIncentiveResponse\x12T\n\x0fincentive_offer\x18\x01 \x01(\x0b\x32\x31.google.ads.googleads.v25.services.IncentiveOfferB\x03\xe0\x41\x02H\x00\x88\x01\x01\x42\x12\n\x10_incentive_offer\"p\n\x15\x41pplyIncentiveRequest\x12\"\n\x15selected_incentive_id\x18\x01 \x01(\x03\x42\x03\xe0\x41\x02\x12\x18\n\x0b\x63ustomer_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x19\n\x0c\x63ountry_code\x18\x03 \x01(\tB\x03\xe0\x41\x02\"p\n\x16\x41pplyIncentiveResponse\x12\x18\n\x0b\x63oupon_code\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x1a\n\rcreation_time\x18\x02 \x01(\tH\x01\x88\x01\x01\x42\x0e\n\x0c_coupon_codeB\x10\n\x0e_creation_time2\xb1\x04\n\x10IncentiveService\x12\xad\x01\n\x0e\x46\x65tchIncentive\x12\x38.google.ads.googleads.v25.services.FetchIncentiveRequest\x1a\x39.google.ads.googleads.v25.services.FetchIncentiveResponse\"&\x82\xd3\xe4\x93\x02 \x12\x1e/v25/incentives:fetchIncentive\x12\xa5\x02\n\x0e\x41pplyIncentive\x12\x38.google.ads.googleads.v25.services.ApplyIncentiveRequest\x1a\x39.google.ads.googleads.v25.services.ApplyIncentiveResponse\"\x9d\x01\xda\x41\x0c\x63ountry_code\xda\x41.selected_incentive_id,customer_id,country_code\x82\xd3\xe4\x93\x02W\"R/v25/customers/{customer_id=*}/incentives/{selected_incentive_id=*}:applyIncentive:\x01*\x1a\x45\xca\x41\x18googleads.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/adwordsB\x81\x02\n%com.google.ads.googleads.v25.servicesB\x15IncentiveServiceProtoP\x01ZIgoogle.golang.org/genproto/googleapis/ads/googleads/v25/services;services\xa2\x02\x03GAA\xaa\x02!Google.Ads.GoogleAds.V25.Services\xca\x02!Google\\Ads\\GoogleAds\\V25\\Services\xea\x02%Google::Ads::GoogleAds::V25::Servicesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Services + FetchIncentiveRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.FetchIncentiveRequest").msgclass + Incentive = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.Incentive").msgclass + Incentive::Requirement = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.Incentive.Requirement").msgclass + Incentive::Requirement::Spend = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.Incentive.Requirement.Spend").msgclass + CyoIncentives = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.CyoIncentives").msgclass + IncentiveOffer = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.IncentiveOffer").msgclass + FetchIncentiveResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.FetchIncentiveResponse").msgclass + ApplyIncentiveRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.ApplyIncentiveRequest").msgclass + ApplyIncentiveResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.ApplyIncentiveResponse").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/incentive_service_services_pb.rb b/lib/google/ads/google_ads/v25/services/incentive_service_services_pb.rb new file mode 100644 index 000000000..38d4bc0d5 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/incentive_service_services_pb.rb @@ -0,0 +1,49 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/ads/googleads/v25/services/incentive_service.proto for package 'Google.Ads.GoogleAds.V25.Services' +# Original file comments: +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +require 'grpc' +require 'google/ads/google_ads/v25/services/incentive_service_pb' + +module Google + module Ads + module GoogleAds + module V25 + module Services + module IncentiveService + # Service to support incentive related operations. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.ads.googleads.v25.services.IncentiveService' + + # Returns incentives for a given user. + rpc :FetchIncentive, ::Google::Ads::GoogleAds::V25::Services::FetchIncentiveRequest, ::Google::Ads::GoogleAds::V25::Services::FetchIncentiveResponse + # Applies the incentive for the ads customer. + rpc :ApplyIncentive, ::Google::Ads::GoogleAds::V25::Services::ApplyIncentiveRequest, ::Google::Ads::GoogleAds::V25::Services::ApplyIncentiveResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/invoice_service.rb b/lib/google/ads/google_ads/v25/services/invoice_service.rb new file mode 100644 index 000000000..3142985f3 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/invoice_service.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/ads/google_ads/version" + +require "google/ads/google_ads/v25/services/invoice_service/credentials" +require "google/ads/google_ads/v25/services/invoice_service/paths" +require "google/ads/google_ads/v25/services/invoice_service/client" + +module Google + module Ads + module GoogleAds + module V25 + module Services + ## + # A service to fetch invoices issued for a billing setup during a given month. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/ads/google_ads/v25/services/invoice_service" + # client = ::Google::Ads::GoogleAds::V25::Services::InvoiceService::Client.new + # + module InvoiceService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "invoice_service", "helpers.rb" +require "google/ads/google_ads/v25/services/invoice_service/helpers" if ::File.file? helper_path diff --git a/lib/google/ads/google_ads/v25/services/invoice_service/client.rb b/lib/google/ads/google_ads/v25/services/invoice_service/client.rb new file mode 100644 index 000000000..713514573 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/invoice_service/client.rb @@ -0,0 +1,500 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# require "google/ads/google_ads/error" +require "google/ads/google_ads/v25/services/invoice_service_pb" + +module Google + module Ads + module GoogleAds + module V25 + module Services + module InvoiceService + ## + # Client for the InvoiceService service. + # + # A service to fetch invoices issued for a billing setup during a given month. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "googleads.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :invoice_service_stub + + ## + # Configure the InvoiceService Client class. + # + # See {::Google::Ads::GoogleAds::V25::Services::InvoiceService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all InvoiceService clients + # ::Google::Ads::GoogleAds::V25::Services::InvoiceService::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + default_config = Client::Configuration.new + + default_config.timeout = 14_400.0 + default_config.retry_policy = { + initial_delay: 5.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the InvoiceService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Ads::GoogleAds::V25::Services::InvoiceService::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @invoice_service_stub.universe_domain + end + + ## + # Create a new InvoiceService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Ads::GoogleAds::V25::Services::InvoiceService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Ads::GoogleAds::V25::Services::InvoiceService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the InvoiceService client. + # @yieldparam config [Client::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/ads/google_ads/v25/services/invoice_service_services_pb" + + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @invoice_service_stub = ::Gapic::ServiceStub.new( + ::Google::Ads::GoogleAds::V25::Services::InvoiceService::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool, + logger: @config.logger + ) + + @invoice_service_stub.stub_logger&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @invoice_service_stub.logger + end + + # Service calls + + ## + # Returns all invoices associated with a billing setup, for a given month. + # + # List of thrown errors: + # [AuthenticationError]() + # [AuthorizationError]() + # [FieldError]() + # [HeaderError]() + # [InternalError]() + # [InvoiceError]() + # [QuotaError]() + # [RequestError]() + # + # @overload list_invoices(request, options = nil) + # Pass arguments to `list_invoices` via a request object, either of type + # {::Google::Ads::GoogleAds::V25::Services::ListInvoicesRequest} or an equivalent Hash. + # + # @param request [::Google::Ads::GoogleAds::V25::Services::ListInvoicesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_invoices(customer_id: nil, billing_setup: nil, issue_year: nil, issue_month: nil, include_granular_level_invoice_details: nil) + # Pass arguments to `list_invoices` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param customer_id [::String] + # Required. The ID of the customer to fetch invoices for. + # @param billing_setup [::String] + # Required. The billing setup resource name of the requested invoices. + # + # `customers/{customer_id}/billingSetups/{billing_setup_id}` + # @param issue_year [::String] + # Required. The issue year to retrieve invoices, in yyyy format. Only + # invoices issued in 2019 or later can be retrieved. + # @param issue_month [::Google::Ads::GoogleAds::V25::Enums::MonthOfYearEnum::MonthOfYear] + # Required. The issue month to retrieve invoices. + # @param include_granular_level_invoice_details [::Boolean] + # Optional. When true, the response will include more granular level invoice + # details such as campaign level cost breakdown, itemized regulatory costs + # and adjustments. The default value is false. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Ads::GoogleAds::V25::Services::ListInvoicesResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Ads::GoogleAds::V25::Services::ListInvoicesResponse] + # + # @raise [Google::Ads::GoogleAds::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/ads/google_ads/v25/services" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Ads::GoogleAds::V25::Services::InvoiceService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Ads::GoogleAds::V25::Services::ListInvoicesRequest.new + # + # # Call the list_invoices method. + # result = client.list_invoices request + # + # # The returned object is of type Google::Ads::GoogleAds::V25::Services::ListInvoicesResponse. + # p result + # + def list_invoices request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::GoogleAds::V25::Services::ListInvoicesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_invoices.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Ads::GoogleAds::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.customer_id + header_params["customer_id"] = request.customer_id + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_invoices.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_invoices.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @invoice_service_stub.call_rpc :list_invoices, request, options: options do |response, operation| + yield response, operation if block_given? + end + # rescue GRPC::BadStatus => grpc_error + # raise Google::Ads::GoogleAds::Error.new grpc_error.message + end + + ## + # Configuration class for the InvoiceService API. + # + # This class represents the configuration for InvoiceService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Ads::GoogleAds::V25::Services::InvoiceService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_invoices to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Ads::GoogleAds::V25::Services::InvoiceService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_invoices.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Ads::GoogleAds::V25::Services::InvoiceService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_invoices.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Ads::GoogleAds::V25::Services::InvoiceService::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "googleads.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, + ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the InvoiceService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_invoices` + # @return [::Gapic::Config::Method] + # + attr_reader :list_invoices + + # @private + def initialize parent_rpcs = nil + list_invoices_config = parent_rpcs.list_invoices if parent_rpcs.respond_to? :list_invoices + @list_invoices = ::Gapic::Config::Method.new list_invoices_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/invoice_service/credentials.rb b/lib/google/ads/google_ads/v25/services/invoice_service/credentials.rb new file mode 100644 index 000000000..3a4111552 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/invoice_service/credentials.rb @@ -0,0 +1,38 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Ads + module GoogleAds + module V25 + module Services + module InvoiceService + # Credentials for the InvoiceService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/adwords" + ] + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/invoice_service/paths.rb b/lib/google/ads/google_ads/v25/services/invoice_service/paths.rb new file mode 100644 index 000000000..072c2bf9b --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/invoice_service/paths.rb @@ -0,0 +1,52 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Ads + module GoogleAds + module V25 + module Services + module InvoiceService + # Path helper methods for the InvoiceService API. + module Paths + ## + # Create a fully-qualified Invoice resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/invoices/{invoice_id}` + # + # @param customer_id [String] + # @param invoice_id [String] + # + # @return [::String] + def invoice_path customer_id:, invoice_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/invoices/#{invoice_id}" + end + + extend self + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/invoice_service_pb.rb b/lib/google/ads/google_ads/v25/services/invoice_service_pb.rb new file mode 100644 index 000000000..476488587 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/invoice_service_pb.rb @@ -0,0 +1,30 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/services/invoice_service.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/enums/month_of_year_pb' +require 'google/ads/google_ads/v25/resources/invoice_pb' +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' + + +descriptor_data = "\n7google/ads/googleads/v25/services/invoice_service.proto\x12!google.ads.googleads.v25.services\x1a\x32google/ads/googleads/v25/enums/month_of_year.proto\x1a\x30google/ads/googleads/v25/resources/invoice.proto\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\"\xf0\x01\n\x13ListInvoicesRequest\x12\x18\n\x0b\x63ustomer_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x1a\n\rbilling_setup\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x17\n\nissue_year\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12U\n\x0bissue_month\x18\x04 \x01(\x0e\x32;.google.ads.googleads.v25.enums.MonthOfYearEnum.MonthOfYearB\x03\xe0\x41\x02\x12\x33\n&include_granular_level_invoice_details\x18\x05 \x01(\x08\x42\x03\xe0\x41\x01\"U\n\x14ListInvoicesResponse\x12=\n\x08invoices\x18\x01 \x03(\x0b\x32+.google.ads.googleads.v25.resources.Invoice2\xbd\x02\n\x0eInvoiceService\x12\xe3\x01\n\x0cListInvoices\x12\x36.google.ads.googleads.v25.services.ListInvoicesRequest\x1a\x37.google.ads.googleads.v25.services.ListInvoicesResponse\"b\xda\x41\x30\x63ustomer_id,billing_setup,issue_year,issue_month\x82\xd3\xe4\x93\x02)\x12\'/v25/customers/{customer_id=*}/invoices\x1a\x45\xca\x41\x18googleads.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/adwordsB\xff\x01\n%com.google.ads.googleads.v25.servicesB\x13InvoiceServiceProtoP\x01ZIgoogle.golang.org/genproto/googleapis/ads/googleads/v25/services;services\xa2\x02\x03GAA\xaa\x02!Google.Ads.GoogleAds.V25.Services\xca\x02!Google\\Ads\\GoogleAds\\V25\\Services\xea\x02%Google::Ads::GoogleAds::V25::Servicesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Services + ListInvoicesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.ListInvoicesRequest").msgclass + ListInvoicesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.ListInvoicesResponse").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/invoice_service_services_pb.rb b/lib/google/ads/google_ads/v25/services/invoice_service_services_pb.rb new file mode 100644 index 000000000..aaef2b98e --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/invoice_service_services_pb.rb @@ -0,0 +1,59 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/ads/googleads/v25/services/invoice_service.proto for package 'Google.Ads.GoogleAds.V25.Services' +# Original file comments: +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +require 'grpc' +require 'google/ads/google_ads/v25/services/invoice_service_pb' + +module Google + module Ads + module GoogleAds + module V25 + module Services + module InvoiceService + # Proto file describing the Invoice service. + # + # A service to fetch invoices issued for a billing setup during a given month. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.ads.googleads.v25.services.InvoiceService' + + # Returns all invoices associated with a billing setup, for a given month. + # + # List of thrown errors: + # [AuthenticationError]() + # [AuthorizationError]() + # [FieldError]() + # [HeaderError]() + # [InternalError]() + # [InvoiceError]() + # [QuotaError]() + # [RequestError]() + rpc :ListInvoices, ::Google::Ads::GoogleAds::V25::Services::ListInvoicesRequest, ::Google::Ads::GoogleAds::V25::Services::ListInvoicesResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/keyword_plan_ad_group_keyword_service.rb b/lib/google/ads/google_ads/v25/services/keyword_plan_ad_group_keyword_service.rb new file mode 100644 index 000000000..abd452f19 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/keyword_plan_ad_group_keyword_service.rb @@ -0,0 +1,55 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/ads/google_ads/version" + +require "google/ads/google_ads/v25/services/keyword_plan_ad_group_keyword_service/credentials" +require "google/ads/google_ads/v25/services/keyword_plan_ad_group_keyword_service/paths" +require "google/ads/google_ads/v25/services/keyword_plan_ad_group_keyword_service/client" + +module Google + module Ads + module GoogleAds + module V25 + module Services + ## + # Service to manage Keyword Plan ad group keywords. KeywordPlanAdGroup is + # required to add ad group keywords. Positive and negative keywords are + # supported. A maximum of 10,000 positive keywords are allowed per keyword + # plan. A maximum of 1,000 negative keywords are allower per keyword plan. This + # includes campaign negative keywords and ad group negative keywords. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/ads/google_ads/v25/services/keyword_plan_ad_group_keyword_service" + # client = ::Google::Ads::GoogleAds::V25::Services::KeywordPlanAdGroupKeywordService::Client.new + # + module KeywordPlanAdGroupKeywordService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "keyword_plan_ad_group_keyword_service", "helpers.rb" +require "google/ads/google_ads/v25/services/keyword_plan_ad_group_keyword_service/helpers" if ::File.file? helper_path diff --git a/lib/google/ads/google_ads/v25/services/keyword_plan_ad_group_keyword_service/client.rb b/lib/google/ads/google_ads/v25/services/keyword_plan_ad_group_keyword_service/client.rb new file mode 100644 index 000000000..e5df11d83 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/keyword_plan_ad_group_keyword_service/client.rb @@ -0,0 +1,509 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# require "google/ads/google_ads/error" +require "google/ads/google_ads/v25/services/keyword_plan_ad_group_keyword_service_pb" + +module Google + module Ads + module GoogleAds + module V25 + module Services + module KeywordPlanAdGroupKeywordService + ## + # Client for the KeywordPlanAdGroupKeywordService service. + # + # Service to manage Keyword Plan ad group keywords. KeywordPlanAdGroup is + # required to add ad group keywords. Positive and negative keywords are + # supported. A maximum of 10,000 positive keywords are allowed per keyword + # plan. A maximum of 1,000 negative keywords are allower per keyword plan. This + # includes campaign negative keywords and ad group negative keywords. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "googleads.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :keyword_plan_ad_group_keyword_service_stub + + ## + # Configure the KeywordPlanAdGroupKeywordService Client class. + # + # See {::Google::Ads::GoogleAds::V25::Services::KeywordPlanAdGroupKeywordService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all KeywordPlanAdGroupKeywordService clients + # ::Google::Ads::GoogleAds::V25::Services::KeywordPlanAdGroupKeywordService::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + default_config = Client::Configuration.new + + default_config.timeout = 14_400.0 + default_config.retry_policy = { + initial_delay: 5.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the KeywordPlanAdGroupKeywordService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Ads::GoogleAds::V25::Services::KeywordPlanAdGroupKeywordService::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @keyword_plan_ad_group_keyword_service_stub.universe_domain + end + + ## + # Create a new KeywordPlanAdGroupKeywordService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Ads::GoogleAds::V25::Services::KeywordPlanAdGroupKeywordService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Ads::GoogleAds::V25::Services::KeywordPlanAdGroupKeywordService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the KeywordPlanAdGroupKeywordService client. + # @yieldparam config [Client::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/ads/google_ads/v25/services/keyword_plan_ad_group_keyword_service_services_pb" + + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @keyword_plan_ad_group_keyword_service_stub = ::Gapic::ServiceStub.new( + ::Google::Ads::GoogleAds::V25::Services::KeywordPlanAdGroupKeywordService::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool, + logger: @config.logger + ) + + @keyword_plan_ad_group_keyword_service_stub.stub_logger&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @keyword_plan_ad_group_keyword_service_stub.logger + end + + # Service calls + + ## + # Creates, updates, or removes Keyword Plan ad group keywords. Operation + # statuses are returned. + # + # List of thrown errors: + # [AuthenticationError]() + # [AuthorizationError]() + # [DatabaseError]() + # [FieldError]() + # [HeaderError]() + # [InternalError]() + # [KeywordPlanAdGroupKeywordError]() + # [KeywordPlanError]() + # [MutateError]() + # [QuotaError]() + # [RequestError]() + # [ResourceCountLimitExceededError]() + # + # @overload mutate_keyword_plan_ad_group_keywords(request, options = nil) + # Pass arguments to `mutate_keyword_plan_ad_group_keywords` via a request object, either of type + # {::Google::Ads::GoogleAds::V25::Services::MutateKeywordPlanAdGroupKeywordsRequest} or an equivalent Hash. + # + # @param request [::Google::Ads::GoogleAds::V25::Services::MutateKeywordPlanAdGroupKeywordsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload mutate_keyword_plan_ad_group_keywords(customer_id: nil, operations: nil, partial_failure: nil, validate_only: nil) + # Pass arguments to `mutate_keyword_plan_ad_group_keywords` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param customer_id [::String] + # Required. The ID of the customer whose Keyword Plan ad group keywords are + # being modified. + # @param operations [::Array<::Google::Ads::GoogleAds::V25::Services::KeywordPlanAdGroupKeywordOperation, ::Hash>] + # Required. The list of operations to perform on individual Keyword Plan ad + # group keywords. + # @param partial_failure [::Boolean] + # 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. + # @param validate_only [::Boolean] + # If true, the request is validated but not executed. Only errors are + # returned, not results. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Ads::GoogleAds::V25::Services::MutateKeywordPlanAdGroupKeywordsResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Ads::GoogleAds::V25::Services::MutateKeywordPlanAdGroupKeywordsResponse] + # + # @raise [Google::Ads::GoogleAds::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/ads/google_ads/v25/services" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Ads::GoogleAds::V25::Services::KeywordPlanAdGroupKeywordService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Ads::GoogleAds::V25::Services::MutateKeywordPlanAdGroupKeywordsRequest.new + # + # # Call the mutate_keyword_plan_ad_group_keywords method. + # result = client.mutate_keyword_plan_ad_group_keywords request + # + # # The returned object is of type Google::Ads::GoogleAds::V25::Services::MutateKeywordPlanAdGroupKeywordsResponse. + # p result + # + def mutate_keyword_plan_ad_group_keywords request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::GoogleAds::V25::Services::MutateKeywordPlanAdGroupKeywordsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.mutate_keyword_plan_ad_group_keywords.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Ads::GoogleAds::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.customer_id + header_params["customer_id"] = request.customer_id + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.mutate_keyword_plan_ad_group_keywords.timeout, + metadata: metadata, + retry_policy: @config.rpcs.mutate_keyword_plan_ad_group_keywords.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @keyword_plan_ad_group_keyword_service_stub.call_rpc :mutate_keyword_plan_ad_group_keywords, request, + options: options do |response, operation| + yield response, operation if block_given? + end + # rescue GRPC::BadStatus => grpc_error + # raise Google::Ads::GoogleAds::Error.new grpc_error.message + end + + ## + # Configuration class for the KeywordPlanAdGroupKeywordService API. + # + # This class represents the configuration for KeywordPlanAdGroupKeywordService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Ads::GoogleAds::V25::Services::KeywordPlanAdGroupKeywordService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # mutate_keyword_plan_ad_group_keywords to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Ads::GoogleAds::V25::Services::KeywordPlanAdGroupKeywordService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.mutate_keyword_plan_ad_group_keywords.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Ads::GoogleAds::V25::Services::KeywordPlanAdGroupKeywordService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.mutate_keyword_plan_ad_group_keywords.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Ads::GoogleAds::V25::Services::KeywordPlanAdGroupKeywordService::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "googleads.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, + ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the KeywordPlanAdGroupKeywordService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `mutate_keyword_plan_ad_group_keywords` + # @return [::Gapic::Config::Method] + # + attr_reader :mutate_keyword_plan_ad_group_keywords + + # @private + def initialize parent_rpcs = nil + mutate_keyword_plan_ad_group_keywords_config = parent_rpcs.mutate_keyword_plan_ad_group_keywords if parent_rpcs.respond_to? :mutate_keyword_plan_ad_group_keywords + @mutate_keyword_plan_ad_group_keywords = ::Gapic::Config::Method.new mutate_keyword_plan_ad_group_keywords_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/keyword_plan_ad_group_keyword_service/credentials.rb b/lib/google/ads/google_ads/v25/services/keyword_plan_ad_group_keyword_service/credentials.rb new file mode 100644 index 000000000..9b61ff034 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/keyword_plan_ad_group_keyword_service/credentials.rb @@ -0,0 +1,38 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Ads + module GoogleAds + module V25 + module Services + module KeywordPlanAdGroupKeywordService + # Credentials for the KeywordPlanAdGroupKeywordService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/adwords" + ] + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/keyword_plan_ad_group_keyword_service/paths.rb b/lib/google/ads/google_ads/v25/services/keyword_plan_ad_group_keyword_service/paths.rb new file mode 100644 index 000000000..606db439b --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/keyword_plan_ad_group_keyword_service/paths.rb @@ -0,0 +1,69 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Ads + module GoogleAds + module V25 + module Services + module KeywordPlanAdGroupKeywordService + # Path helper methods for the KeywordPlanAdGroupKeywordService API. + module Paths + ## + # Create a fully-qualified KeywordPlanAdGroup resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/keywordPlanAdGroups/{keyword_plan_ad_group_id}` + # + # @param customer_id [String] + # @param keyword_plan_ad_group_id [String] + # + # @return [::String] + def keyword_plan_ad_group_path customer_id:, keyword_plan_ad_group_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/keywordPlanAdGroups/#{keyword_plan_ad_group_id}" + end + + ## + # Create a fully-qualified KeywordPlanAdGroupKeyword resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/keywordPlanAdGroupKeywords/{keyword_plan_ad_group_keyword_id}` + # + # @param customer_id [String] + # @param keyword_plan_ad_group_keyword_id [String] + # + # @return [::String] + def keyword_plan_ad_group_keyword_path customer_id:, keyword_plan_ad_group_keyword_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/keywordPlanAdGroupKeywords/#{keyword_plan_ad_group_keyword_id}" + end + + extend self + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/keyword_plan_ad_group_keyword_service_pb.rb b/lib/google/ads/google_ads/v25/services/keyword_plan_ad_group_keyword_service_pb.rb new file mode 100644 index 000000000..81facb592 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/keyword_plan_ad_group_keyword_service_pb.rb @@ -0,0 +1,34 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/services/keyword_plan_ad_group_keyword_service.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/resources/keyword_plan_ad_group_keyword_pb' +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/field_mask_pb' +require 'google/rpc/status_pb' + + +descriptor_data = "\nMgoogle/ads/googleads/v25/services/keyword_plan_ad_group_keyword_service.proto\x12!google.ads.googleads.v25.services\x1a\x46google/ads/googleads/v25/resources/keyword_plan_ad_group_keyword.proto\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\x1a\x17google/rpc/status.proto\"\xd3\x01\n\'MutateKeywordPlanAdGroupKeywordsRequest\x12\x18\n\x0b\x63ustomer_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12^\n\noperations\x18\x02 \x03(\x0b\x32\x45.google.ads.googleads.v25.services.KeywordPlanAdGroupKeywordOperationB\x03\xe0\x41\x02\x12\x17\n\x0fpartial_failure\x18\x03 \x01(\x08\x12\x15\n\rvalidate_only\x18\x04 \x01(\x08\"\xcf\x02\n\"KeywordPlanAdGroupKeywordOperation\x12/\n\x0bupdate_mask\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\x12O\n\x06\x63reate\x18\x01 \x01(\x0b\x32=.google.ads.googleads.v25.resources.KeywordPlanAdGroupKeywordH\x00\x12O\n\x06update\x18\x02 \x01(\x0b\x32=.google.ads.googleads.v25.resources.KeywordPlanAdGroupKeywordH\x00\x12I\n\x06remove\x18\x03 \x01(\tB7\xfa\x41\x34\n2googleads.googleapis.com/KeywordPlanAdGroupKeywordH\x00\x42\x0b\n\toperation\"\xb8\x01\n(MutateKeywordPlanAdGroupKeywordsResponse\x12\x31\n\x15partial_failure_error\x18\x03 \x01(\x0b\x32\x12.google.rpc.Status\x12Y\n\x07results\x18\x02 \x03(\x0b\x32H.google.ads.googleads.v25.services.MutateKeywordPlanAdGroupKeywordResult\"w\n%MutateKeywordPlanAdGroupKeywordResult\x12N\n\rresource_name\x18\x01 \x01(\tB7\xfa\x41\x34\n2googleads.googleapis.com/KeywordPlanAdGroupKeyword2\x8d\x03\n KeywordPlanAdGroupKeywordService\x12\xa1\x02\n MutateKeywordPlanAdGroupKeywords\x12J.google.ads.googleads.v25.services.MutateKeywordPlanAdGroupKeywordsRequest\x1aK.google.ads.googleads.v25.services.MutateKeywordPlanAdGroupKeywordsResponse\"d\xda\x41\x16\x63ustomer_id,operations\x82\xd3\xe4\x93\x02\x45\"@/v25/customers/{customer_id=*}/keywordPlanAdGroupKeywords:mutate:\x01*\x1a\x45\xca\x41\x18googleads.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/adwordsB\x91\x02\n%com.google.ads.googleads.v25.servicesB%KeywordPlanAdGroupKeywordServiceProtoP\x01ZIgoogle.golang.org/genproto/googleapis/ads/googleads/v25/services;services\xa2\x02\x03GAA\xaa\x02!Google.Ads.GoogleAds.V25.Services\xca\x02!Google\\Ads\\GoogleAds\\V25\\Services\xea\x02%Google::Ads::GoogleAds::V25::Servicesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Services + MutateKeywordPlanAdGroupKeywordsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.MutateKeywordPlanAdGroupKeywordsRequest").msgclass + KeywordPlanAdGroupKeywordOperation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.KeywordPlanAdGroupKeywordOperation").msgclass + MutateKeywordPlanAdGroupKeywordsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.MutateKeywordPlanAdGroupKeywordsResponse").msgclass + MutateKeywordPlanAdGroupKeywordResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.MutateKeywordPlanAdGroupKeywordResult").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/keyword_plan_ad_group_keyword_service_services_pb.rb b/lib/google/ads/google_ads/v25/services/keyword_plan_ad_group_keyword_service_services_pb.rb new file mode 100644 index 000000000..0663d672a --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/keyword_plan_ad_group_keyword_service_services_pb.rb @@ -0,0 +1,68 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/ads/googleads/v25/services/keyword_plan_ad_group_keyword_service.proto for package 'Google.Ads.GoogleAds.V25.Services' +# Original file comments: +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +require 'grpc' +require 'google/ads/google_ads/v25/services/keyword_plan_ad_group_keyword_service_pb' + +module Google + module Ads + module GoogleAds + module V25 + module Services + module KeywordPlanAdGroupKeywordService + # Proto file describing the keyword plan ad group keyword service. + # + # Service to manage Keyword Plan ad group keywords. KeywordPlanAdGroup is + # required to add ad group keywords. Positive and negative keywords are + # supported. A maximum of 10,000 positive keywords are allowed per keyword + # plan. A maximum of 1,000 negative keywords are allower per keyword plan. This + # includes campaign negative keywords and ad group negative keywords. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.ads.googleads.v25.services.KeywordPlanAdGroupKeywordService' + + # Creates, updates, or removes Keyword Plan ad group keywords. Operation + # statuses are returned. + # + # List of thrown errors: + # [AuthenticationError]() + # [AuthorizationError]() + # [DatabaseError]() + # [FieldError]() + # [HeaderError]() + # [InternalError]() + # [KeywordPlanAdGroupKeywordError]() + # [KeywordPlanError]() + # [MutateError]() + # [QuotaError]() + # [RequestError]() + # [ResourceCountLimitExceededError]() + rpc :MutateKeywordPlanAdGroupKeywords, ::Google::Ads::GoogleAds::V25::Services::MutateKeywordPlanAdGroupKeywordsRequest, ::Google::Ads::GoogleAds::V25::Services::MutateKeywordPlanAdGroupKeywordsResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/keyword_plan_ad_group_service.rb b/lib/google/ads/google_ads/v25/services/keyword_plan_ad_group_service.rb new file mode 100644 index 000000000..2f0754ff6 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/keyword_plan_ad_group_service.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/ads/google_ads/version" + +require "google/ads/google_ads/v25/services/keyword_plan_ad_group_service/credentials" +require "google/ads/google_ads/v25/services/keyword_plan_ad_group_service/paths" +require "google/ads/google_ads/v25/services/keyword_plan_ad_group_service/client" + +module Google + module Ads + module GoogleAds + module V25 + module Services + ## + # Service to manage Keyword Plan ad groups. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/ads/google_ads/v25/services/keyword_plan_ad_group_service" + # client = ::Google::Ads::GoogleAds::V25::Services::KeywordPlanAdGroupService::Client.new + # + module KeywordPlanAdGroupService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "keyword_plan_ad_group_service", "helpers.rb" +require "google/ads/google_ads/v25/services/keyword_plan_ad_group_service/helpers" if ::File.file? helper_path diff --git a/lib/google/ads/google_ads/v25/services/keyword_plan_ad_group_service/client.rb b/lib/google/ads/google_ads/v25/services/keyword_plan_ad_group_service/client.rb new file mode 100644 index 000000000..fff49707f --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/keyword_plan_ad_group_service/client.rb @@ -0,0 +1,507 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# require "google/ads/google_ads/error" +require "google/ads/google_ads/v25/services/keyword_plan_ad_group_service_pb" + +module Google + module Ads + module GoogleAds + module V25 + module Services + module KeywordPlanAdGroupService + ## + # Client for the KeywordPlanAdGroupService service. + # + # Service to manage Keyword Plan ad groups. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "googleads.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :keyword_plan_ad_group_service_stub + + ## + # Configure the KeywordPlanAdGroupService Client class. + # + # See {::Google::Ads::GoogleAds::V25::Services::KeywordPlanAdGroupService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all KeywordPlanAdGroupService clients + # ::Google::Ads::GoogleAds::V25::Services::KeywordPlanAdGroupService::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + default_config = Client::Configuration.new + + default_config.timeout = 14_400.0 + default_config.retry_policy = { + initial_delay: 5.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the KeywordPlanAdGroupService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Ads::GoogleAds::V25::Services::KeywordPlanAdGroupService::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @keyword_plan_ad_group_service_stub.universe_domain + end + + ## + # Create a new KeywordPlanAdGroupService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Ads::GoogleAds::V25::Services::KeywordPlanAdGroupService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Ads::GoogleAds::V25::Services::KeywordPlanAdGroupService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the KeywordPlanAdGroupService client. + # @yieldparam config [Client::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/ads/google_ads/v25/services/keyword_plan_ad_group_service_services_pb" + + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @keyword_plan_ad_group_service_stub = ::Gapic::ServiceStub.new( + ::Google::Ads::GoogleAds::V25::Services::KeywordPlanAdGroupService::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool, + logger: @config.logger + ) + + @keyword_plan_ad_group_service_stub.stub_logger&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @keyword_plan_ad_group_service_stub.logger + end + + # Service calls + + ## + # Creates, updates, or removes Keyword Plan ad groups. Operation statuses are + # returned. + # + # List of thrown errors: + # [AuthenticationError]() + # [AuthorizationError]() + # [DatabaseError]() + # [FieldError]() + # [FieldMaskError]() + # [HeaderError]() + # [InternalError]() + # [KeywordPlanAdGroupError]() + # [KeywordPlanError]() + # [MutateError]() + # [NewResourceCreationError]() + # [QuotaError]() + # [RequestError]() + # [ResourceCountLimitExceededError]() + # + # @overload mutate_keyword_plan_ad_groups(request, options = nil) + # Pass arguments to `mutate_keyword_plan_ad_groups` via a request object, either of type + # {::Google::Ads::GoogleAds::V25::Services::MutateKeywordPlanAdGroupsRequest} or an equivalent Hash. + # + # @param request [::Google::Ads::GoogleAds::V25::Services::MutateKeywordPlanAdGroupsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload mutate_keyword_plan_ad_groups(customer_id: nil, operations: nil, partial_failure: nil, validate_only: nil) + # Pass arguments to `mutate_keyword_plan_ad_groups` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param customer_id [::String] + # Required. The ID of the customer whose Keyword Plan ad groups are being + # modified. + # @param operations [::Array<::Google::Ads::GoogleAds::V25::Services::KeywordPlanAdGroupOperation, ::Hash>] + # Required. The list of operations to perform on individual Keyword Plan ad + # groups. + # @param partial_failure [::Boolean] + # 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. + # @param validate_only [::Boolean] + # If true, the request is validated but not executed. Only errors are + # returned, not results. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Ads::GoogleAds::V25::Services::MutateKeywordPlanAdGroupsResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Ads::GoogleAds::V25::Services::MutateKeywordPlanAdGroupsResponse] + # + # @raise [Google::Ads::GoogleAds::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/ads/google_ads/v25/services" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Ads::GoogleAds::V25::Services::KeywordPlanAdGroupService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Ads::GoogleAds::V25::Services::MutateKeywordPlanAdGroupsRequest.new + # + # # Call the mutate_keyword_plan_ad_groups method. + # result = client.mutate_keyword_plan_ad_groups request + # + # # The returned object is of type Google::Ads::GoogleAds::V25::Services::MutateKeywordPlanAdGroupsResponse. + # p result + # + def mutate_keyword_plan_ad_groups request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::GoogleAds::V25::Services::MutateKeywordPlanAdGroupsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.mutate_keyword_plan_ad_groups.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Ads::GoogleAds::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.customer_id + header_params["customer_id"] = request.customer_id + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.mutate_keyword_plan_ad_groups.timeout, + metadata: metadata, + retry_policy: @config.rpcs.mutate_keyword_plan_ad_groups.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @keyword_plan_ad_group_service_stub.call_rpc :mutate_keyword_plan_ad_groups, request, + options: options do |response, operation| + yield response, operation if block_given? + end + # rescue GRPC::BadStatus => grpc_error + # raise Google::Ads::GoogleAds::Error.new grpc_error.message + end + + ## + # Configuration class for the KeywordPlanAdGroupService API. + # + # This class represents the configuration for KeywordPlanAdGroupService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Ads::GoogleAds::V25::Services::KeywordPlanAdGroupService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # mutate_keyword_plan_ad_groups to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Ads::GoogleAds::V25::Services::KeywordPlanAdGroupService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.mutate_keyword_plan_ad_groups.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Ads::GoogleAds::V25::Services::KeywordPlanAdGroupService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.mutate_keyword_plan_ad_groups.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Ads::GoogleAds::V25::Services::KeywordPlanAdGroupService::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "googleads.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, + ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the KeywordPlanAdGroupService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `mutate_keyword_plan_ad_groups` + # @return [::Gapic::Config::Method] + # + attr_reader :mutate_keyword_plan_ad_groups + + # @private + def initialize parent_rpcs = nil + mutate_keyword_plan_ad_groups_config = parent_rpcs.mutate_keyword_plan_ad_groups if parent_rpcs.respond_to? :mutate_keyword_plan_ad_groups + @mutate_keyword_plan_ad_groups = ::Gapic::Config::Method.new mutate_keyword_plan_ad_groups_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/keyword_plan_ad_group_service/credentials.rb b/lib/google/ads/google_ads/v25/services/keyword_plan_ad_group_service/credentials.rb new file mode 100644 index 000000000..9e7912b83 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/keyword_plan_ad_group_service/credentials.rb @@ -0,0 +1,38 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Ads + module GoogleAds + module V25 + module Services + module KeywordPlanAdGroupService + # Credentials for the KeywordPlanAdGroupService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/adwords" + ] + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/keyword_plan_ad_group_service/paths.rb b/lib/google/ads/google_ads/v25/services/keyword_plan_ad_group_service/paths.rb new file mode 100644 index 000000000..f97ef881b --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/keyword_plan_ad_group_service/paths.rb @@ -0,0 +1,69 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Ads + module GoogleAds + module V25 + module Services + module KeywordPlanAdGroupService + # Path helper methods for the KeywordPlanAdGroupService API. + module Paths + ## + # Create a fully-qualified KeywordPlanAdGroup resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/keywordPlanAdGroups/{keyword_plan_ad_group_id}` + # + # @param customer_id [String] + # @param keyword_plan_ad_group_id [String] + # + # @return [::String] + def keyword_plan_ad_group_path customer_id:, keyword_plan_ad_group_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/keywordPlanAdGroups/#{keyword_plan_ad_group_id}" + end + + ## + # Create a fully-qualified KeywordPlanCampaign resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/keywordPlanCampaigns/{keyword_plan_campaign_id}` + # + # @param customer_id [String] + # @param keyword_plan_campaign_id [String] + # + # @return [::String] + def keyword_plan_campaign_path customer_id:, keyword_plan_campaign_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/keywordPlanCampaigns/#{keyword_plan_campaign_id}" + end + + extend self + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/keyword_plan_ad_group_service_pb.rb b/lib/google/ads/google_ads/v25/services/keyword_plan_ad_group_service_pb.rb new file mode 100644 index 000000000..92dc9a38d --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/keyword_plan_ad_group_service_pb.rb @@ -0,0 +1,34 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/services/keyword_plan_ad_group_service.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/resources/keyword_plan_ad_group_pb' +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/field_mask_pb' +require 'google/rpc/status_pb' + + +descriptor_data = "\nEgoogle/ads/googleads/v25/services/keyword_plan_ad_group_service.proto\x12!google.ads.googleads.v25.services\x1a>google/ads/googleads/v25/resources/keyword_plan_ad_group.proto\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\x1a\x17google/rpc/status.proto\"\xc5\x01\n MutateKeywordPlanAdGroupsRequest\x12\x18\n\x0b\x63ustomer_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12W\n\noperations\x18\x02 \x03(\x0b\x32>.google.ads.googleads.v25.services.KeywordPlanAdGroupOperationB\x03\xe0\x41\x02\x12\x17\n\x0fpartial_failure\x18\x03 \x01(\x08\x12\x15\n\rvalidate_only\x18\x04 \x01(\x08\"\xb3\x02\n\x1bKeywordPlanAdGroupOperation\x12/\n\x0bupdate_mask\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\x12H\n\x06\x63reate\x18\x01 \x01(\x0b\x32\x36.google.ads.googleads.v25.resources.KeywordPlanAdGroupH\x00\x12H\n\x06update\x18\x02 \x01(\x0b\x32\x36.google.ads.googleads.v25.resources.KeywordPlanAdGroupH\x00\x12\x42\n\x06remove\x18\x03 \x01(\tB0\xfa\x41-\n+googleads.googleapis.com/KeywordPlanAdGroupH\x00\x42\x0b\n\toperation\"\xaa\x01\n!MutateKeywordPlanAdGroupsResponse\x12\x31\n\x15partial_failure_error\x18\x03 \x01(\x0b\x32\x12.google.rpc.Status\x12R\n\x07results\x18\x02 \x03(\x0b\x32\x41.google.ads.googleads.v25.services.MutateKeywordPlanAdGroupResult\"i\n\x1eMutateKeywordPlanAdGroupResult\x12G\n\rresource_name\x18\x01 \x01(\tB0\xfa\x41-\n+googleads.googleapis.com/KeywordPlanAdGroup2\xea\x02\n\x19KeywordPlanAdGroupService\x12\x85\x02\n\x19MutateKeywordPlanAdGroups\x12\x43.google.ads.googleads.v25.services.MutateKeywordPlanAdGroupsRequest\x1a\x44.google.ads.googleads.v25.services.MutateKeywordPlanAdGroupsResponse\"]\xda\x41\x16\x63ustomer_id,operations\x82\xd3\xe4\x93\x02>\"9/v25/customers/{customer_id=*}/keywordPlanAdGroups:mutate:\x01*\x1a\x45\xca\x41\x18googleads.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/adwordsB\x8a\x02\n%com.google.ads.googleads.v25.servicesB\x1eKeywordPlanAdGroupServiceProtoP\x01ZIgoogle.golang.org/genproto/googleapis/ads/googleads/v25/services;services\xa2\x02\x03GAA\xaa\x02!Google.Ads.GoogleAds.V25.Services\xca\x02!Google\\Ads\\GoogleAds\\V25\\Services\xea\x02%Google::Ads::GoogleAds::V25::Servicesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Services + MutateKeywordPlanAdGroupsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.MutateKeywordPlanAdGroupsRequest").msgclass + KeywordPlanAdGroupOperation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.KeywordPlanAdGroupOperation").msgclass + MutateKeywordPlanAdGroupsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.MutateKeywordPlanAdGroupsResponse").msgclass + MutateKeywordPlanAdGroupResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.MutateKeywordPlanAdGroupResult").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/keyword_plan_ad_group_service_services_pb.rb b/lib/google/ads/google_ads/v25/services/keyword_plan_ad_group_service_services_pb.rb new file mode 100644 index 000000000..0281a3c09 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/keyword_plan_ad_group_service_services_pb.rb @@ -0,0 +1,66 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/ads/googleads/v25/services/keyword_plan_ad_group_service.proto for package 'Google.Ads.GoogleAds.V25.Services' +# Original file comments: +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +require 'grpc' +require 'google/ads/google_ads/v25/services/keyword_plan_ad_group_service_pb' + +module Google + module Ads + module GoogleAds + module V25 + module Services + module KeywordPlanAdGroupService + # Proto file describing the keyword plan ad group service. + # + # Service to manage Keyword Plan ad groups. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.ads.googleads.v25.services.KeywordPlanAdGroupService' + + # Creates, updates, or removes Keyword Plan ad groups. Operation statuses are + # returned. + # + # List of thrown errors: + # [AuthenticationError]() + # [AuthorizationError]() + # [DatabaseError]() + # [FieldError]() + # [FieldMaskError]() + # [HeaderError]() + # [InternalError]() + # [KeywordPlanAdGroupError]() + # [KeywordPlanError]() + # [MutateError]() + # [NewResourceCreationError]() + # [QuotaError]() + # [RequestError]() + # [ResourceCountLimitExceededError]() + rpc :MutateKeywordPlanAdGroups, ::Google::Ads::GoogleAds::V25::Services::MutateKeywordPlanAdGroupsRequest, ::Google::Ads::GoogleAds::V25::Services::MutateKeywordPlanAdGroupsResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/keyword_plan_campaign_keyword_service.rb b/lib/google/ads/google_ads/v25/services/keyword_plan_campaign_keyword_service.rb new file mode 100644 index 000000000..2719d344e --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/keyword_plan_campaign_keyword_service.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/ads/google_ads/version" + +require "google/ads/google_ads/v25/services/keyword_plan_campaign_keyword_service/credentials" +require "google/ads/google_ads/v25/services/keyword_plan_campaign_keyword_service/paths" +require "google/ads/google_ads/v25/services/keyword_plan_campaign_keyword_service/client" + +module Google + module Ads + module GoogleAds + module V25 + module Services + ## + # Service to manage Keyword Plan campaign keywords. KeywordPlanCampaign is + # required to add the campaign keywords. Only negative keywords are supported. + # A maximum of 1000 negative keywords are allowed per plan. This includes both + # campaign negative keywords and ad group negative keywords. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/ads/google_ads/v25/services/keyword_plan_campaign_keyword_service" + # client = ::Google::Ads::GoogleAds::V25::Services::KeywordPlanCampaignKeywordService::Client.new + # + module KeywordPlanCampaignKeywordService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "keyword_plan_campaign_keyword_service", "helpers.rb" +require "google/ads/google_ads/v25/services/keyword_plan_campaign_keyword_service/helpers" if ::File.file? helper_path diff --git a/lib/google/ads/google_ads/v25/services/keyword_plan_campaign_keyword_service/client.rb b/lib/google/ads/google_ads/v25/services/keyword_plan_campaign_keyword_service/client.rb new file mode 100644 index 000000000..4bd3e47bd --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/keyword_plan_campaign_keyword_service/client.rb @@ -0,0 +1,507 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# require "google/ads/google_ads/error" +require "google/ads/google_ads/v25/services/keyword_plan_campaign_keyword_service_pb" + +module Google + module Ads + module GoogleAds + module V25 + module Services + module KeywordPlanCampaignKeywordService + ## + # Client for the KeywordPlanCampaignKeywordService service. + # + # Service to manage Keyword Plan campaign keywords. KeywordPlanCampaign is + # required to add the campaign keywords. Only negative keywords are supported. + # A maximum of 1000 negative keywords are allowed per plan. This includes both + # campaign negative keywords and ad group negative keywords. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "googleads.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :keyword_plan_campaign_keyword_service_stub + + ## + # Configure the KeywordPlanCampaignKeywordService Client class. + # + # See {::Google::Ads::GoogleAds::V25::Services::KeywordPlanCampaignKeywordService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all KeywordPlanCampaignKeywordService clients + # ::Google::Ads::GoogleAds::V25::Services::KeywordPlanCampaignKeywordService::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + default_config = Client::Configuration.new + + default_config.timeout = 14_400.0 + default_config.retry_policy = { + initial_delay: 5.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the KeywordPlanCampaignKeywordService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Ads::GoogleAds::V25::Services::KeywordPlanCampaignKeywordService::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @keyword_plan_campaign_keyword_service_stub.universe_domain + end + + ## + # Create a new KeywordPlanCampaignKeywordService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Ads::GoogleAds::V25::Services::KeywordPlanCampaignKeywordService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Ads::GoogleAds::V25::Services::KeywordPlanCampaignKeywordService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the KeywordPlanCampaignKeywordService client. + # @yieldparam config [Client::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/ads/google_ads/v25/services/keyword_plan_campaign_keyword_service_services_pb" + + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @keyword_plan_campaign_keyword_service_stub = ::Gapic::ServiceStub.new( + ::Google::Ads::GoogleAds::V25::Services::KeywordPlanCampaignKeywordService::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool, + logger: @config.logger + ) + + @keyword_plan_campaign_keyword_service_stub.stub_logger&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @keyword_plan_campaign_keyword_service_stub.logger + end + + # Service calls + + ## + # Creates, updates, or removes Keyword Plan campaign keywords. Operation + # statuses are returned. + # + # List of thrown errors: + # [AuthenticationError]() + # [AuthorizationError]() + # [DatabaseError]() + # [FieldError]() + # [HeaderError]() + # [InternalError]() + # [KeywordPlanAdGroupKeywordError]() + # [KeywordPlanCampaignKeywordError]() + # [QuotaError]() + # [RequestError]() + # [ResourceCountLimitExceededError]() + # + # @overload mutate_keyword_plan_campaign_keywords(request, options = nil) + # Pass arguments to `mutate_keyword_plan_campaign_keywords` via a request object, either of type + # {::Google::Ads::GoogleAds::V25::Services::MutateKeywordPlanCampaignKeywordsRequest} or an equivalent Hash. + # + # @param request [::Google::Ads::GoogleAds::V25::Services::MutateKeywordPlanCampaignKeywordsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload mutate_keyword_plan_campaign_keywords(customer_id: nil, operations: nil, partial_failure: nil, validate_only: nil) + # Pass arguments to `mutate_keyword_plan_campaign_keywords` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param customer_id [::String] + # Required. The ID of the customer whose campaign keywords are being + # modified. + # @param operations [::Array<::Google::Ads::GoogleAds::V25::Services::KeywordPlanCampaignKeywordOperation, ::Hash>] + # Required. The list of operations to perform on individual Keyword Plan + # campaign keywords. + # @param partial_failure [::Boolean] + # 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. + # @param validate_only [::Boolean] + # If true, the request is validated but not executed. Only errors are + # returned, not results. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Ads::GoogleAds::V25::Services::MutateKeywordPlanCampaignKeywordsResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Ads::GoogleAds::V25::Services::MutateKeywordPlanCampaignKeywordsResponse] + # + # @raise [Google::Ads::GoogleAds::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/ads/google_ads/v25/services" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Ads::GoogleAds::V25::Services::KeywordPlanCampaignKeywordService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Ads::GoogleAds::V25::Services::MutateKeywordPlanCampaignKeywordsRequest.new + # + # # Call the mutate_keyword_plan_campaign_keywords method. + # result = client.mutate_keyword_plan_campaign_keywords request + # + # # The returned object is of type Google::Ads::GoogleAds::V25::Services::MutateKeywordPlanCampaignKeywordsResponse. + # p result + # + def mutate_keyword_plan_campaign_keywords request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::GoogleAds::V25::Services::MutateKeywordPlanCampaignKeywordsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.mutate_keyword_plan_campaign_keywords.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Ads::GoogleAds::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.customer_id + header_params["customer_id"] = request.customer_id + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.mutate_keyword_plan_campaign_keywords.timeout, + metadata: metadata, + retry_policy: @config.rpcs.mutate_keyword_plan_campaign_keywords.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @keyword_plan_campaign_keyword_service_stub.call_rpc :mutate_keyword_plan_campaign_keywords, request, + options: options do |response, operation| + yield response, operation if block_given? + end + # rescue GRPC::BadStatus => grpc_error + # raise Google::Ads::GoogleAds::Error.new grpc_error.message + end + + ## + # Configuration class for the KeywordPlanCampaignKeywordService API. + # + # This class represents the configuration for KeywordPlanCampaignKeywordService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Ads::GoogleAds::V25::Services::KeywordPlanCampaignKeywordService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # mutate_keyword_plan_campaign_keywords to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Ads::GoogleAds::V25::Services::KeywordPlanCampaignKeywordService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.mutate_keyword_plan_campaign_keywords.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Ads::GoogleAds::V25::Services::KeywordPlanCampaignKeywordService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.mutate_keyword_plan_campaign_keywords.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Ads::GoogleAds::V25::Services::KeywordPlanCampaignKeywordService::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "googleads.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, + ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the KeywordPlanCampaignKeywordService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `mutate_keyword_plan_campaign_keywords` + # @return [::Gapic::Config::Method] + # + attr_reader :mutate_keyword_plan_campaign_keywords + + # @private + def initialize parent_rpcs = nil + mutate_keyword_plan_campaign_keywords_config = parent_rpcs.mutate_keyword_plan_campaign_keywords if parent_rpcs.respond_to? :mutate_keyword_plan_campaign_keywords + @mutate_keyword_plan_campaign_keywords = ::Gapic::Config::Method.new mutate_keyword_plan_campaign_keywords_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/keyword_plan_campaign_keyword_service/credentials.rb b/lib/google/ads/google_ads/v25/services/keyword_plan_campaign_keyword_service/credentials.rb new file mode 100644 index 000000000..32931f90c --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/keyword_plan_campaign_keyword_service/credentials.rb @@ -0,0 +1,38 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Ads + module GoogleAds + module V25 + module Services + module KeywordPlanCampaignKeywordService + # Credentials for the KeywordPlanCampaignKeywordService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/adwords" + ] + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/keyword_plan_campaign_keyword_service/paths.rb b/lib/google/ads/google_ads/v25/services/keyword_plan_campaign_keyword_service/paths.rb new file mode 100644 index 000000000..da6a6d127 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/keyword_plan_campaign_keyword_service/paths.rb @@ -0,0 +1,69 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Ads + module GoogleAds + module V25 + module Services + module KeywordPlanCampaignKeywordService + # Path helper methods for the KeywordPlanCampaignKeywordService API. + module Paths + ## + # Create a fully-qualified KeywordPlanCampaign resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/keywordPlanCampaigns/{keyword_plan_campaign_id}` + # + # @param customer_id [String] + # @param keyword_plan_campaign_id [String] + # + # @return [::String] + def keyword_plan_campaign_path customer_id:, keyword_plan_campaign_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/keywordPlanCampaigns/#{keyword_plan_campaign_id}" + end + + ## + # Create a fully-qualified KeywordPlanCampaignKeyword resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/keywordPlanCampaignKeywords/{keyword_plan_campaign_keyword_id}` + # + # @param customer_id [String] + # @param keyword_plan_campaign_keyword_id [String] + # + # @return [::String] + def keyword_plan_campaign_keyword_path customer_id:, keyword_plan_campaign_keyword_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/keywordPlanCampaignKeywords/#{keyword_plan_campaign_keyword_id}" + end + + extend self + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/keyword_plan_campaign_keyword_service_pb.rb b/lib/google/ads/google_ads/v25/services/keyword_plan_campaign_keyword_service_pb.rb new file mode 100644 index 000000000..7899ce65c --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/keyword_plan_campaign_keyword_service_pb.rb @@ -0,0 +1,34 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/services/keyword_plan_campaign_keyword_service.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/resources/keyword_plan_campaign_keyword_pb' +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/field_mask_pb' +require 'google/rpc/status_pb' + + +descriptor_data = "\nMgoogle/ads/googleads/v25/services/keyword_plan_campaign_keyword_service.proto\x12!google.ads.googleads.v25.services\x1a\x46google/ads/googleads/v25/resources/keyword_plan_campaign_keyword.proto\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\x1a\x17google/rpc/status.proto\"\xd5\x01\n(MutateKeywordPlanCampaignKeywordsRequest\x12\x18\n\x0b\x63ustomer_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12_\n\noperations\x18\x02 \x03(\x0b\x32\x46.google.ads.googleads.v25.services.KeywordPlanCampaignKeywordOperationB\x03\xe0\x41\x02\x12\x17\n\x0fpartial_failure\x18\x03 \x01(\x08\x12\x15\n\rvalidate_only\x18\x04 \x01(\x08\"\xd3\x02\n#KeywordPlanCampaignKeywordOperation\x12/\n\x0bupdate_mask\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\x12P\n\x06\x63reate\x18\x01 \x01(\x0b\x32>.google.ads.googleads.v25.resources.KeywordPlanCampaignKeywordH\x00\x12P\n\x06update\x18\x02 \x01(\x0b\x32>.google.ads.googleads.v25.resources.KeywordPlanCampaignKeywordH\x00\x12J\n\x06remove\x18\x03 \x01(\tB8\xfa\x41\x35\n3googleads.googleapis.com/KeywordPlanCampaignKeywordH\x00\x42\x0b\n\toperation\"\xba\x01\n)MutateKeywordPlanCampaignKeywordsResponse\x12\x31\n\x15partial_failure_error\x18\x03 \x01(\x0b\x32\x12.google.rpc.Status\x12Z\n\x07results\x18\x02 \x03(\x0b\x32I.google.ads.googleads.v25.services.MutateKeywordPlanCampaignKeywordResult\"y\n&MutateKeywordPlanCampaignKeywordResult\x12O\n\rresource_name\x18\x01 \x01(\tB8\xfa\x41\x35\n3googleads.googleapis.com/KeywordPlanCampaignKeyword2\x92\x03\n!KeywordPlanCampaignKeywordService\x12\xa5\x02\n!MutateKeywordPlanCampaignKeywords\x12K.google.ads.googleads.v25.services.MutateKeywordPlanCampaignKeywordsRequest\x1aL.google.ads.googleads.v25.services.MutateKeywordPlanCampaignKeywordsResponse\"e\xda\x41\x16\x63ustomer_id,operations\x82\xd3\xe4\x93\x02\x46\"A/v25/customers/{customer_id=*}/keywordPlanCampaignKeywords:mutate:\x01*\x1a\x45\xca\x41\x18googleads.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/adwordsB\x92\x02\n%com.google.ads.googleads.v25.servicesB&KeywordPlanCampaignKeywordServiceProtoP\x01ZIgoogle.golang.org/genproto/googleapis/ads/googleads/v25/services;services\xa2\x02\x03GAA\xaa\x02!Google.Ads.GoogleAds.V25.Services\xca\x02!Google\\Ads\\GoogleAds\\V25\\Services\xea\x02%Google::Ads::GoogleAds::V25::Servicesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Services + MutateKeywordPlanCampaignKeywordsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.MutateKeywordPlanCampaignKeywordsRequest").msgclass + KeywordPlanCampaignKeywordOperation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.KeywordPlanCampaignKeywordOperation").msgclass + MutateKeywordPlanCampaignKeywordsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.MutateKeywordPlanCampaignKeywordsResponse").msgclass + MutateKeywordPlanCampaignKeywordResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.MutateKeywordPlanCampaignKeywordResult").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/keyword_plan_campaign_keyword_service_services_pb.rb b/lib/google/ads/google_ads/v25/services/keyword_plan_campaign_keyword_service_services_pb.rb new file mode 100644 index 000000000..660fb5c51 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/keyword_plan_campaign_keyword_service_services_pb.rb @@ -0,0 +1,66 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/ads/googleads/v25/services/keyword_plan_campaign_keyword_service.proto for package 'Google.Ads.GoogleAds.V25.Services' +# Original file comments: +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +require 'grpc' +require 'google/ads/google_ads/v25/services/keyword_plan_campaign_keyword_service_pb' + +module Google + module Ads + module GoogleAds + module V25 + module Services + module KeywordPlanCampaignKeywordService + # Proto file describing the keyword plan campaign keyword service. + # + # Service to manage Keyword Plan campaign keywords. KeywordPlanCampaign is + # required to add the campaign keywords. Only negative keywords are supported. + # A maximum of 1000 negative keywords are allowed per plan. This includes both + # campaign negative keywords and ad group negative keywords. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.ads.googleads.v25.services.KeywordPlanCampaignKeywordService' + + # Creates, updates, or removes Keyword Plan campaign keywords. Operation + # statuses are returned. + # + # List of thrown errors: + # [AuthenticationError]() + # [AuthorizationError]() + # [DatabaseError]() + # [FieldError]() + # [HeaderError]() + # [InternalError]() + # [KeywordPlanAdGroupKeywordError]() + # [KeywordPlanCampaignKeywordError]() + # [QuotaError]() + # [RequestError]() + # [ResourceCountLimitExceededError]() + rpc :MutateKeywordPlanCampaignKeywords, ::Google::Ads::GoogleAds::V25::Services::MutateKeywordPlanCampaignKeywordsRequest, ::Google::Ads::GoogleAds::V25::Services::MutateKeywordPlanCampaignKeywordsResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/keyword_plan_campaign_service.rb b/lib/google/ads/google_ads/v25/services/keyword_plan_campaign_service.rb new file mode 100644 index 000000000..41204c2b5 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/keyword_plan_campaign_service.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/ads/google_ads/version" + +require "google/ads/google_ads/v25/services/keyword_plan_campaign_service/credentials" +require "google/ads/google_ads/v25/services/keyword_plan_campaign_service/paths" +require "google/ads/google_ads/v25/services/keyword_plan_campaign_service/client" + +module Google + module Ads + module GoogleAds + module V25 + module Services + ## + # Service to manage Keyword Plan campaigns. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/ads/google_ads/v25/services/keyword_plan_campaign_service" + # client = ::Google::Ads::GoogleAds::V25::Services::KeywordPlanCampaignService::Client.new + # + module KeywordPlanCampaignService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "keyword_plan_campaign_service", "helpers.rb" +require "google/ads/google_ads/v25/services/keyword_plan_campaign_service/helpers" if ::File.file? helper_path diff --git a/lib/google/ads/google_ads/v25/services/keyword_plan_campaign_service/client.rb b/lib/google/ads/google_ads/v25/services/keyword_plan_campaign_service/client.rb new file mode 100644 index 000000000..dfea91a80 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/keyword_plan_campaign_service/client.rb @@ -0,0 +1,508 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# require "google/ads/google_ads/error" +require "google/ads/google_ads/v25/services/keyword_plan_campaign_service_pb" + +module Google + module Ads + module GoogleAds + module V25 + module Services + module KeywordPlanCampaignService + ## + # Client for the KeywordPlanCampaignService service. + # + # Service to manage Keyword Plan campaigns. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "googleads.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :keyword_plan_campaign_service_stub + + ## + # Configure the KeywordPlanCampaignService Client class. + # + # See {::Google::Ads::GoogleAds::V25::Services::KeywordPlanCampaignService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all KeywordPlanCampaignService clients + # ::Google::Ads::GoogleAds::V25::Services::KeywordPlanCampaignService::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + default_config = Client::Configuration.new + + default_config.timeout = 14_400.0 + default_config.retry_policy = { + initial_delay: 5.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the KeywordPlanCampaignService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Ads::GoogleAds::V25::Services::KeywordPlanCampaignService::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @keyword_plan_campaign_service_stub.universe_domain + end + + ## + # Create a new KeywordPlanCampaignService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Ads::GoogleAds::V25::Services::KeywordPlanCampaignService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Ads::GoogleAds::V25::Services::KeywordPlanCampaignService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the KeywordPlanCampaignService client. + # @yieldparam config [Client::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/ads/google_ads/v25/services/keyword_plan_campaign_service_services_pb" + + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @keyword_plan_campaign_service_stub = ::Gapic::ServiceStub.new( + ::Google::Ads::GoogleAds::V25::Services::KeywordPlanCampaignService::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool, + logger: @config.logger + ) + + @keyword_plan_campaign_service_stub.stub_logger&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @keyword_plan_campaign_service_stub.logger + end + + # Service calls + + ## + # Creates, updates, or removes Keyword Plan campaigns. Operation statuses are + # returned. + # + # List of thrown errors: + # [AuthenticationError]() + # [AuthorizationError]() + # [DatabaseError]() + # [FieldError]() + # [FieldMaskError]() + # [HeaderError]() + # [InternalError]() + # [KeywordPlanCampaignError]() + # [KeywordPlanError]() + # [ListOperationError]() + # [MutateError]() + # [QuotaError]() + # [RangeError]() + # [RequestError]() + # [ResourceCountLimitExceededError]() + # + # @overload mutate_keyword_plan_campaigns(request, options = nil) + # Pass arguments to `mutate_keyword_plan_campaigns` via a request object, either of type + # {::Google::Ads::GoogleAds::V25::Services::MutateKeywordPlanCampaignsRequest} or an equivalent Hash. + # + # @param request [::Google::Ads::GoogleAds::V25::Services::MutateKeywordPlanCampaignsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload mutate_keyword_plan_campaigns(customer_id: nil, operations: nil, partial_failure: nil, validate_only: nil) + # Pass arguments to `mutate_keyword_plan_campaigns` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param customer_id [::String] + # Required. The ID of the customer whose Keyword Plan campaigns are being + # modified. + # @param operations [::Array<::Google::Ads::GoogleAds::V25::Services::KeywordPlanCampaignOperation, ::Hash>] + # Required. The list of operations to perform on individual Keyword Plan + # campaigns. + # @param partial_failure [::Boolean] + # 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. + # @param validate_only [::Boolean] + # If true, the request is validated but not executed. Only errors are + # returned, not results. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Ads::GoogleAds::V25::Services::MutateKeywordPlanCampaignsResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Ads::GoogleAds::V25::Services::MutateKeywordPlanCampaignsResponse] + # + # @raise [Google::Ads::GoogleAds::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/ads/google_ads/v25/services" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Ads::GoogleAds::V25::Services::KeywordPlanCampaignService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Ads::GoogleAds::V25::Services::MutateKeywordPlanCampaignsRequest.new + # + # # Call the mutate_keyword_plan_campaigns method. + # result = client.mutate_keyword_plan_campaigns request + # + # # The returned object is of type Google::Ads::GoogleAds::V25::Services::MutateKeywordPlanCampaignsResponse. + # p result + # + def mutate_keyword_plan_campaigns request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::GoogleAds::V25::Services::MutateKeywordPlanCampaignsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.mutate_keyword_plan_campaigns.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Ads::GoogleAds::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.customer_id + header_params["customer_id"] = request.customer_id + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.mutate_keyword_plan_campaigns.timeout, + metadata: metadata, + retry_policy: @config.rpcs.mutate_keyword_plan_campaigns.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @keyword_plan_campaign_service_stub.call_rpc :mutate_keyword_plan_campaigns, request, + options: options do |response, operation| + yield response, operation if block_given? + end + # rescue GRPC::BadStatus => grpc_error + # raise Google::Ads::GoogleAds::Error.new grpc_error.message + end + + ## + # Configuration class for the KeywordPlanCampaignService API. + # + # This class represents the configuration for KeywordPlanCampaignService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Ads::GoogleAds::V25::Services::KeywordPlanCampaignService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # mutate_keyword_plan_campaigns to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Ads::GoogleAds::V25::Services::KeywordPlanCampaignService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.mutate_keyword_plan_campaigns.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Ads::GoogleAds::V25::Services::KeywordPlanCampaignService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.mutate_keyword_plan_campaigns.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Ads::GoogleAds::V25::Services::KeywordPlanCampaignService::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "googleads.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, + ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the KeywordPlanCampaignService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `mutate_keyword_plan_campaigns` + # @return [::Gapic::Config::Method] + # + attr_reader :mutate_keyword_plan_campaigns + + # @private + def initialize parent_rpcs = nil + mutate_keyword_plan_campaigns_config = parent_rpcs.mutate_keyword_plan_campaigns if parent_rpcs.respond_to? :mutate_keyword_plan_campaigns + @mutate_keyword_plan_campaigns = ::Gapic::Config::Method.new mutate_keyword_plan_campaigns_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/keyword_plan_campaign_service/credentials.rb b/lib/google/ads/google_ads/v25/services/keyword_plan_campaign_service/credentials.rb new file mode 100644 index 000000000..71c670502 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/keyword_plan_campaign_service/credentials.rb @@ -0,0 +1,38 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Ads + module GoogleAds + module V25 + module Services + module KeywordPlanCampaignService + # Credentials for the KeywordPlanCampaignService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/adwords" + ] + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/keyword_plan_campaign_service/paths.rb b/lib/google/ads/google_ads/v25/services/keyword_plan_campaign_service/paths.rb new file mode 100644 index 000000000..c73d852e0 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/keyword_plan_campaign_service/paths.rb @@ -0,0 +1,97 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Ads + module GoogleAds + module V25 + module Services + module KeywordPlanCampaignService + # Path helper methods for the KeywordPlanCampaignService API. + module Paths + ## + # Create a fully-qualified GeoTargetConstant resource string. + # + # The resource will be in the following format: + # + # `geoTargetConstants/{criterion_id}` + # + # @param criterion_id [String] + # + # @return [::String] + def geo_target_constant_path criterion_id: + "geoTargetConstants/#{criterion_id}" + end + + ## + # Create a fully-qualified KeywordPlan resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/keywordPlans/{keyword_plan_id}` + # + # @param customer_id [String] + # @param keyword_plan_id [String] + # + # @return [::String] + def keyword_plan_path customer_id:, keyword_plan_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/keywordPlans/#{keyword_plan_id}" + end + + ## + # Create a fully-qualified KeywordPlanCampaign resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/keywordPlanCampaigns/{keyword_plan_campaign_id}` + # + # @param customer_id [String] + # @param keyword_plan_campaign_id [String] + # + # @return [::String] + def keyword_plan_campaign_path customer_id:, keyword_plan_campaign_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/keywordPlanCampaigns/#{keyword_plan_campaign_id}" + end + + ## + # Create a fully-qualified LanguageConstant resource string. + # + # The resource will be in the following format: + # + # `languageConstants/{criterion_id}` + # + # @param criterion_id [String] + # + # @return [::String] + def language_constant_path criterion_id: + "languageConstants/#{criterion_id}" + end + + extend self + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/keyword_plan_campaign_service_pb.rb b/lib/google/ads/google_ads/v25/services/keyword_plan_campaign_service_pb.rb new file mode 100644 index 000000000..fd028fd65 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/keyword_plan_campaign_service_pb.rb @@ -0,0 +1,34 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/services/keyword_plan_campaign_service.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/resources/keyword_plan_campaign_pb' +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/field_mask_pb' +require 'google/rpc/status_pb' + + +descriptor_data = "\nEgoogle/ads/googleads/v25/services/keyword_plan_campaign_service.proto\x12!google.ads.googleads.v25.services\x1a>google/ads/googleads/v25/resources/keyword_plan_campaign.proto\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\x1a\x17google/rpc/status.proto\"\xc7\x01\n!MutateKeywordPlanCampaignsRequest\x12\x18\n\x0b\x63ustomer_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12X\n\noperations\x18\x02 \x03(\x0b\x32?.google.ads.googleads.v25.services.KeywordPlanCampaignOperationB\x03\xe0\x41\x02\x12\x17\n\x0fpartial_failure\x18\x03 \x01(\x08\x12\x15\n\rvalidate_only\x18\x04 \x01(\x08\"\xb7\x02\n\x1cKeywordPlanCampaignOperation\x12/\n\x0bupdate_mask\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\x12I\n\x06\x63reate\x18\x01 \x01(\x0b\x32\x37.google.ads.googleads.v25.resources.KeywordPlanCampaignH\x00\x12I\n\x06update\x18\x02 \x01(\x0b\x32\x37.google.ads.googleads.v25.resources.KeywordPlanCampaignH\x00\x12\x43\n\x06remove\x18\x03 \x01(\tB1\xfa\x41.\n,googleads.googleapis.com/KeywordPlanCampaignH\x00\x42\x0b\n\toperation\"\xac\x01\n\"MutateKeywordPlanCampaignsResponse\x12\x31\n\x15partial_failure_error\x18\x03 \x01(\x0b\x32\x12.google.rpc.Status\x12S\n\x07results\x18\x02 \x03(\x0b\x32\x42.google.ads.googleads.v25.services.MutateKeywordPlanCampaignResult\"k\n\x1fMutateKeywordPlanCampaignResult\x12H\n\rresource_name\x18\x01 \x01(\tB1\xfa\x41.\n,googleads.googleapis.com/KeywordPlanCampaign2\xef\x02\n\x1aKeywordPlanCampaignService\x12\x89\x02\n\x1aMutateKeywordPlanCampaigns\x12\x44.google.ads.googleads.v25.services.MutateKeywordPlanCampaignsRequest\x1a\x45.google.ads.googleads.v25.services.MutateKeywordPlanCampaignsResponse\"^\xda\x41\x16\x63ustomer_id,operations\x82\xd3\xe4\x93\x02?\":/v25/customers/{customer_id=*}/keywordPlanCampaigns:mutate:\x01*\x1a\x45\xca\x41\x18googleads.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/adwordsB\x8b\x02\n%com.google.ads.googleads.v25.servicesB\x1fKeywordPlanCampaignServiceProtoP\x01ZIgoogle.golang.org/genproto/googleapis/ads/googleads/v25/services;services\xa2\x02\x03GAA\xaa\x02!Google.Ads.GoogleAds.V25.Services\xca\x02!Google\\Ads\\GoogleAds\\V25\\Services\xea\x02%Google::Ads::GoogleAds::V25::Servicesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Services + MutateKeywordPlanCampaignsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.MutateKeywordPlanCampaignsRequest").msgclass + KeywordPlanCampaignOperation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.KeywordPlanCampaignOperation").msgclass + MutateKeywordPlanCampaignsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.MutateKeywordPlanCampaignsResponse").msgclass + MutateKeywordPlanCampaignResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.MutateKeywordPlanCampaignResult").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/keyword_plan_campaign_service_services_pb.rb b/lib/google/ads/google_ads/v25/services/keyword_plan_campaign_service_services_pb.rb new file mode 100644 index 000000000..9e1167604 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/keyword_plan_campaign_service_services_pb.rb @@ -0,0 +1,67 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/ads/googleads/v25/services/keyword_plan_campaign_service.proto for package 'Google.Ads.GoogleAds.V25.Services' +# Original file comments: +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +require 'grpc' +require 'google/ads/google_ads/v25/services/keyword_plan_campaign_service_pb' + +module Google + module Ads + module GoogleAds + module V25 + module Services + module KeywordPlanCampaignService + # Proto file describing the keyword plan campaign service. + # + # Service to manage Keyword Plan campaigns. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.ads.googleads.v25.services.KeywordPlanCampaignService' + + # Creates, updates, or removes Keyword Plan campaigns. Operation statuses are + # returned. + # + # List of thrown errors: + # [AuthenticationError]() + # [AuthorizationError]() + # [DatabaseError]() + # [FieldError]() + # [FieldMaskError]() + # [HeaderError]() + # [InternalError]() + # [KeywordPlanCampaignError]() + # [KeywordPlanError]() + # [ListOperationError]() + # [MutateError]() + # [QuotaError]() + # [RangeError]() + # [RequestError]() + # [ResourceCountLimitExceededError]() + rpc :MutateKeywordPlanCampaigns, ::Google::Ads::GoogleAds::V25::Services::MutateKeywordPlanCampaignsRequest, ::Google::Ads::GoogleAds::V25::Services::MutateKeywordPlanCampaignsResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/keyword_plan_idea_service.rb b/lib/google/ads/google_ads/v25/services/keyword_plan_idea_service.rb new file mode 100644 index 000000000..8215ce00e --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/keyword_plan_idea_service.rb @@ -0,0 +1,50 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/ads/google_ads/version" + +require "google/ads/google_ads/v25/services/keyword_plan_idea_service/credentials" +require "google/ads/google_ads/v25/services/keyword_plan_idea_service/client" + +module Google + module Ads + module GoogleAds + module V25 + module Services + ## + # Service to generate keyword ideas. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/ads/google_ads/v25/services/keyword_plan_idea_service" + # client = ::Google::Ads::GoogleAds::V25::Services::KeywordPlanIdeaService::Client.new + # + module KeywordPlanIdeaService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "keyword_plan_idea_service", "helpers.rb" +require "google/ads/google_ads/v25/services/keyword_plan_idea_service/helpers" if ::File.file? helper_path diff --git a/lib/google/ads/google_ads/v25/services/keyword_plan_idea_service/client.rb b/lib/google/ads/google_ads/v25/services/keyword_plan_idea_service/client.rb new file mode 100644 index 000000000..5a43ede60 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/keyword_plan_idea_service/client.rb @@ -0,0 +1,893 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# require "google/ads/google_ads/error" +require "google/ads/google_ads/v25/services/keyword_plan_idea_service_pb" + +module Google + module Ads + module GoogleAds + module V25 + module Services + module KeywordPlanIdeaService + ## + # Client for the KeywordPlanIdeaService service. + # + # Service to generate keyword ideas. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "googleads.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :keyword_plan_idea_service_stub + + ## + # Configure the KeywordPlanIdeaService Client class. + # + # See {::Google::Ads::GoogleAds::V25::Services::KeywordPlanIdeaService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all KeywordPlanIdeaService clients + # ::Google::Ads::GoogleAds::V25::Services::KeywordPlanIdeaService::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + default_config = Client::Configuration.new + + default_config.timeout = 14_400.0 + default_config.retry_policy = { + initial_delay: 5.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the KeywordPlanIdeaService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Ads::GoogleAds::V25::Services::KeywordPlanIdeaService::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @keyword_plan_idea_service_stub.universe_domain + end + + ## + # Create a new KeywordPlanIdeaService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Ads::GoogleAds::V25::Services::KeywordPlanIdeaService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Ads::GoogleAds::V25::Services::KeywordPlanIdeaService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the KeywordPlanIdeaService client. + # @yieldparam config [Client::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/ads/google_ads/v25/services/keyword_plan_idea_service_services_pb" + + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @keyword_plan_idea_service_stub = ::Gapic::ServiceStub.new( + ::Google::Ads::GoogleAds::V25::Services::KeywordPlanIdeaService::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool, + logger: @config.logger + ) + + @keyword_plan_idea_service_stub.stub_logger&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @keyword_plan_idea_service_stub.logger + end + + # Service calls + + ## + # Returns a list of keyword ideas. + # + # List of thrown errors: + # [AuthenticationError]() + # [AuthorizationError]() + # [CollectionSizeError]() + # [HeaderError]() + # [InternalError]() + # [KeywordPlanIdeaError]() + # [QuotaError]() + # [RequestError]() + # + # @overload generate_keyword_ideas(request, options = nil) + # Pass arguments to `generate_keyword_ideas` via a request object, either of type + # {::Google::Ads::GoogleAds::V25::Services::GenerateKeywordIdeasRequest} or an equivalent Hash. + # + # @param request [::Google::Ads::GoogleAds::V25::Services::GenerateKeywordIdeasRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload generate_keyword_ideas(customer_id: nil, language: nil, geo_target_constants: nil, include_adult_keywords: nil, page_token: nil, page_size: nil, keyword_plan_network: nil, keyword_annotation: nil, aggregate_metrics: nil, historical_metrics_options: nil, keyword_and_url_seed: nil, keyword_seed: nil, url_seed: nil, site_seed: nil) + # Pass arguments to `generate_keyword_ideas` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param customer_id [::String] + # The ID of the customer with the recommendation. + # @param language [::String] + # The resource name of the language to target. + # Each keyword belongs to some set of languages; a keyword is included if + # language is one of its languages. + # If not set, all keywords will be included. + # @param geo_target_constants [::Array<::String>] + # The resource names of the location to target. Maximum is 10. + # An empty list MAY be used to specify all targeting geos. + # @param include_adult_keywords [::Boolean] + # If true, adult keywords will be included in response. + # The default value is false. + # @param page_token [::String] + # Token of the page to retrieve. If not specified, the first + # page of results will be returned. To request next page of results use the + # value obtained from `next_page_token` in the previous response. + # The request fields must match across pages. + # @param page_size [::Integer] + # Number of results to retrieve in a single page. + # A maximum of 10,000 results may be returned, if the page_size + # exceeds this, it is ignored. + # If unspecified, at most 10,000 results will be returned. + # The server may decide to further limit the number of returned resources. + # If the response contains fewer than 10,000 results it may not be assumed + # as last page of results. + # @param keyword_plan_network [::Google::Ads::GoogleAds::V25::Enums::KeywordPlanNetworkEnum::KeywordPlanNetwork] + # Targeting network. + # If not set, Google Search And Partners Network will be used. + # @param keyword_annotation [::Array<::Google::Ads::GoogleAds::V25::Enums::KeywordPlanKeywordAnnotationEnum::KeywordPlanKeywordAnnotation>] + # The keyword annotations to include in response. + # @param aggregate_metrics [::Google::Ads::GoogleAds::V25::Common::KeywordPlanAggregateMetrics, ::Hash] + # The aggregate fields to include in response. + # @param historical_metrics_options [::Google::Ads::GoogleAds::V25::Common::HistoricalMetricsOptions, ::Hash] + # The options for historical metrics data. + # @param keyword_and_url_seed [::Google::Ads::GoogleAds::V25::Services::KeywordAndUrlSeed, ::Hash] + # A Keyword and a specific Url to generate ideas from + # for example, cars, www.example.com/cars. + # + # Note: The following parameters are mutually exclusive: `keyword_and_url_seed`, `keyword_seed`, `url_seed`, `site_seed`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. + # @param keyword_seed [::Google::Ads::GoogleAds::V25::Services::KeywordSeed, ::Hash] + # A Keyword or phrase to generate ideas from, for example, cars. + # + # Note: The following parameters are mutually exclusive: `keyword_seed`, `keyword_and_url_seed`, `url_seed`, `site_seed`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. + # @param url_seed [::Google::Ads::GoogleAds::V25::Services::UrlSeed, ::Hash] + # A specific url to generate ideas from, for example, www.example.com/cars. + # + # Note: The following parameters are mutually exclusive: `url_seed`, `keyword_and_url_seed`, `keyword_seed`, `site_seed`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. + # @param site_seed [::Google::Ads::GoogleAds::V25::Services::SiteSeed, ::Hash] + # The site to generate ideas from, for example, www.example.com. + # + # Note: The following parameters are mutually exclusive: `site_seed`, `keyword_and_url_seed`, `keyword_seed`, `url_seed`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Ads::GoogleAds::V25::Services::GenerateKeywordIdeaResult>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Ads::GoogleAds::V25::Services::GenerateKeywordIdeaResult>] + # + # @raise [Google::Ads::GoogleAds::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/ads/google_ads/v25/services" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Ads::GoogleAds::V25::Services::KeywordPlanIdeaService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Ads::GoogleAds::V25::Services::GenerateKeywordIdeasRequest.new + # + # # Call the generate_keyword_ideas method. + # result = client.generate_keyword_ideas request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Ads::GoogleAds::V25::Services::GenerateKeywordIdeaResult. + # p item + # end + # + def generate_keyword_ideas request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::GoogleAds::V25::Services::GenerateKeywordIdeasRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.generate_keyword_ideas.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Ads::GoogleAds::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.customer_id + header_params["customer_id"] = request.customer_id + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.generate_keyword_ideas.timeout, + metadata: metadata, + retry_policy: @config.rpcs.generate_keyword_ideas.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @keyword_plan_idea_service_stub.call_rpc :generate_keyword_ideas, request, + options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @keyword_plan_idea_service_stub, :generate_keyword_ideas, + request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + # rescue GRPC::BadStatus => grpc_error + # raise Google::Ads::GoogleAds::Error.new grpc_error.message + end + + ## + # Returns a list of keyword historical metrics. + # + # List of thrown errors: + # [AuthenticationError]() + # [AuthorizationError]() + # [CollectionSizeError]() + # [HeaderError]() + # [InternalError]() + # [QuotaError]() + # [RequestError]() + # + # @overload generate_keyword_historical_metrics(request, options = nil) + # Pass arguments to `generate_keyword_historical_metrics` via a request object, either of type + # {::Google::Ads::GoogleAds::V25::Services::GenerateKeywordHistoricalMetricsRequest} or an equivalent Hash. + # + # @param request [::Google::Ads::GoogleAds::V25::Services::GenerateKeywordHistoricalMetricsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload generate_keyword_historical_metrics(customer_id: nil, keywords: nil, language: nil, include_adult_keywords: nil, geo_target_constants: nil, keyword_plan_network: nil, aggregate_metrics: nil, historical_metrics_options: nil) + # Pass arguments to `generate_keyword_historical_metrics` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param customer_id [::String] + # The ID of the customer with the recommendation. + # @param keywords [::Array<::String>] + # A list of keywords to get historical metrics. + # Not all inputs will be returned as a result of near-exact deduplication. + # For example, if stats for "car" and "cars" are requested, only "car" will + # be returned. + # A maximum of 10,000 keywords can be used. + # @param language [::String] + # The resource name of the language to target. + # Each keyword belongs to some set of languages; a keyword is included if + # language is one of its languages. + # If not set, all keywords will be included. + # @param include_adult_keywords [::Boolean] + # If true, adult keywords will be included in response. + # The default value is false. + # @param geo_target_constants [::Array<::String>] + # The resource names of the location to target. Maximum is 10. + # An empty list MAY be used to specify all targeting geos. + # @param keyword_plan_network [::Google::Ads::GoogleAds::V25::Enums::KeywordPlanNetworkEnum::KeywordPlanNetwork] + # Targeting network. + # If not set, Google Search And Partners Network will be used. + # @param aggregate_metrics [::Google::Ads::GoogleAds::V25::Common::KeywordPlanAggregateMetrics, ::Hash] + # The aggregate fields to include in response. + # @param historical_metrics_options [::Google::Ads::GoogleAds::V25::Common::HistoricalMetricsOptions, ::Hash] + # The options for historical metrics data. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Ads::GoogleAds::V25::Services::GenerateKeywordHistoricalMetricsResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Ads::GoogleAds::V25::Services::GenerateKeywordHistoricalMetricsResponse] + # + # @raise [Google::Ads::GoogleAds::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/ads/google_ads/v25/services" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Ads::GoogleAds::V25::Services::KeywordPlanIdeaService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Ads::GoogleAds::V25::Services::GenerateKeywordHistoricalMetricsRequest.new + # + # # Call the generate_keyword_historical_metrics method. + # result = client.generate_keyword_historical_metrics request + # + # # The returned object is of type Google::Ads::GoogleAds::V25::Services::GenerateKeywordHistoricalMetricsResponse. + # p result + # + def generate_keyword_historical_metrics request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::GoogleAds::V25::Services::GenerateKeywordHistoricalMetricsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.generate_keyword_historical_metrics.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Ads::GoogleAds::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.customer_id + header_params["customer_id"] = request.customer_id + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.generate_keyword_historical_metrics.timeout, + metadata: metadata, + retry_policy: @config.rpcs.generate_keyword_historical_metrics.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @keyword_plan_idea_service_stub.call_rpc :generate_keyword_historical_metrics, request, + options: options do |response, operation| + yield response, operation if block_given? + end + # rescue GRPC::BadStatus => grpc_error + # raise Google::Ads::GoogleAds::Error.new grpc_error.message + end + + ## + # Returns a list of suggested AdGroups and suggested modifications + # (text, match type) for the given keywords. + # + # List of thrown errors: + # [AuthenticationError]() + # [AuthorizationError]() + # [CollectionSizeError]() + # [HeaderError]() + # [InternalError]() + # [QuotaError]() + # [RequestError]() + # + # @overload generate_ad_group_themes(request, options = nil) + # Pass arguments to `generate_ad_group_themes` via a request object, either of type + # {::Google::Ads::GoogleAds::V25::Services::GenerateAdGroupThemesRequest} or an equivalent Hash. + # + # @param request [::Google::Ads::GoogleAds::V25::Services::GenerateAdGroupThemesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload generate_ad_group_themes(customer_id: nil, keywords: nil, ad_groups: nil) + # Pass arguments to `generate_ad_group_themes` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param customer_id [::String] + # Required. The ID of the customer. + # @param keywords [::Array<::String>] + # Required. A list of keywords to group into the provided AdGroups. + # @param ad_groups [::Array<::String>] + # Required. A list of resource names of AdGroups to group keywords into. + # Resource name format: `customers/{customer_id}/adGroups/{ad_group_id}` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Ads::GoogleAds::V25::Services::GenerateAdGroupThemesResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Ads::GoogleAds::V25::Services::GenerateAdGroupThemesResponse] + # + # @raise [Google::Ads::GoogleAds::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/ads/google_ads/v25/services" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Ads::GoogleAds::V25::Services::KeywordPlanIdeaService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Ads::GoogleAds::V25::Services::GenerateAdGroupThemesRequest.new + # + # # Call the generate_ad_group_themes method. + # result = client.generate_ad_group_themes request + # + # # The returned object is of type Google::Ads::GoogleAds::V25::Services::GenerateAdGroupThemesResponse. + # p result + # + def generate_ad_group_themes request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::GoogleAds::V25::Services::GenerateAdGroupThemesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.generate_ad_group_themes.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Ads::GoogleAds::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.customer_id + header_params["customer_id"] = request.customer_id + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.generate_ad_group_themes.timeout, + metadata: metadata, + retry_policy: @config.rpcs.generate_ad_group_themes.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @keyword_plan_idea_service_stub.call_rpc :generate_ad_group_themes, request, + options: options do |response, operation| + yield response, operation if block_given? + end + # rescue GRPC::BadStatus => grpc_error + # raise Google::Ads::GoogleAds::Error.new grpc_error.message + end + + ## + # Returns metrics (such as impressions, clicks, total cost) of a keyword + # forecast for the given campaign. + # + # List of thrown errors: + # [AuthenticationError]() + # [AuthorizationError]() + # [CollectionSizeError]() + # [HeaderError]() + # [InternalError]() + # [QuotaError]() + # [RequestError]() + # + # @overload generate_keyword_forecast_metrics(request, options = nil) + # Pass arguments to `generate_keyword_forecast_metrics` via a request object, either of type + # {::Google::Ads::GoogleAds::V25::Services::GenerateKeywordForecastMetricsRequest} or an equivalent Hash. + # + # @param request [::Google::Ads::GoogleAds::V25::Services::GenerateKeywordForecastMetricsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload generate_keyword_forecast_metrics(customer_id: nil, currency_code: nil, forecast_period: nil, campaign: nil) + # Pass arguments to `generate_keyword_forecast_metrics` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param customer_id [::String] + # The ID of the customer. + # @param currency_code [::String] + # The currency used for exchange rate conversion. + # By default, the account currency of the customer is used. + # Set this field only if the currency is different from the account currency. + # The list of valid currency codes can be found at + # https://developers.google.com/google-ads/api/data/codes-formats#currency-codes. + # @param forecast_period [::Google::Ads::GoogleAds::V25::Common::DateRange, ::Hash] + # The date range for the forecast. The start date must be in the future and + # end date must be within 1 year from today. The reference timezone used is + # the one of the Google Ads account belonging to the customer. If not set, a + # default date range from next Sunday to the following Saturday will be used. + # @param campaign [::Google::Ads::GoogleAds::V25::Services::CampaignToForecast, ::Hash] + # Required. The campaign used in the forecast. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Ads::GoogleAds::V25::Services::GenerateKeywordForecastMetricsResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Ads::GoogleAds::V25::Services::GenerateKeywordForecastMetricsResponse] + # + # @raise [Google::Ads::GoogleAds::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/ads/google_ads/v25/services" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Ads::GoogleAds::V25::Services::KeywordPlanIdeaService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Ads::GoogleAds::V25::Services::GenerateKeywordForecastMetricsRequest.new + # + # # Call the generate_keyword_forecast_metrics method. + # result = client.generate_keyword_forecast_metrics request + # + # # The returned object is of type Google::Ads::GoogleAds::V25::Services::GenerateKeywordForecastMetricsResponse. + # p result + # + def generate_keyword_forecast_metrics request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::GoogleAds::V25::Services::GenerateKeywordForecastMetricsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.generate_keyword_forecast_metrics.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Ads::GoogleAds::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.customer_id + header_params["customer_id"] = request.customer_id + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.generate_keyword_forecast_metrics.timeout, + metadata: metadata, + retry_policy: @config.rpcs.generate_keyword_forecast_metrics.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @keyword_plan_idea_service_stub.call_rpc :generate_keyword_forecast_metrics, request, + options: options do |response, operation| + yield response, operation if block_given? + end + # rescue GRPC::BadStatus => grpc_error + # raise Google::Ads::GoogleAds::Error.new grpc_error.message + end + + ## + # Configuration class for the KeywordPlanIdeaService API. + # + # This class represents the configuration for KeywordPlanIdeaService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Ads::GoogleAds::V25::Services::KeywordPlanIdeaService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # generate_keyword_ideas to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Ads::GoogleAds::V25::Services::KeywordPlanIdeaService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.generate_keyword_ideas.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Ads::GoogleAds::V25::Services::KeywordPlanIdeaService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.generate_keyword_ideas.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Ads::GoogleAds::V25::Services::KeywordPlanIdeaService::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "googleads.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, + ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the KeywordPlanIdeaService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `generate_keyword_ideas` + # @return [::Gapic::Config::Method] + # + attr_reader :generate_keyword_ideas + ## + # RPC-specific configuration for `generate_keyword_historical_metrics` + # @return [::Gapic::Config::Method] + # + attr_reader :generate_keyword_historical_metrics + ## + # RPC-specific configuration for `generate_ad_group_themes` + # @return [::Gapic::Config::Method] + # + attr_reader :generate_ad_group_themes + ## + # RPC-specific configuration for `generate_keyword_forecast_metrics` + # @return [::Gapic::Config::Method] + # + attr_reader :generate_keyword_forecast_metrics + + # @private + def initialize parent_rpcs = nil + generate_keyword_ideas_config = parent_rpcs.generate_keyword_ideas if parent_rpcs.respond_to? :generate_keyword_ideas + @generate_keyword_ideas = ::Gapic::Config::Method.new generate_keyword_ideas_config + generate_keyword_historical_metrics_config = parent_rpcs.generate_keyword_historical_metrics if parent_rpcs.respond_to? :generate_keyword_historical_metrics + @generate_keyword_historical_metrics = ::Gapic::Config::Method.new generate_keyword_historical_metrics_config + generate_ad_group_themes_config = parent_rpcs.generate_ad_group_themes if parent_rpcs.respond_to? :generate_ad_group_themes + @generate_ad_group_themes = ::Gapic::Config::Method.new generate_ad_group_themes_config + generate_keyword_forecast_metrics_config = parent_rpcs.generate_keyword_forecast_metrics if parent_rpcs.respond_to? :generate_keyword_forecast_metrics + @generate_keyword_forecast_metrics = ::Gapic::Config::Method.new generate_keyword_forecast_metrics_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/keyword_plan_idea_service/credentials.rb b/lib/google/ads/google_ads/v25/services/keyword_plan_idea_service/credentials.rb new file mode 100644 index 000000000..86be19781 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/keyword_plan_idea_service/credentials.rb @@ -0,0 +1,38 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Ads + module GoogleAds + module V25 + module Services + module KeywordPlanIdeaService + # Credentials for the KeywordPlanIdeaService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/adwords" + ] + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/keyword_plan_idea_service_pb.rb b/lib/google/ads/google_ads/v25/services/keyword_plan_idea_service_pb.rb new file mode 100644 index 000000000..98f5e3f29 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/keyword_plan_idea_service_pb.rb @@ -0,0 +1,55 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/services/keyword_plan_idea_service.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/common/criteria_pb' +require 'google/ads/google_ads/v25/common/dates_pb' +require 'google/ads/google_ads/v25/common/keyword_plan_common_pb' +require 'google/ads/google_ads/v25/enums/keyword_match_type_pb' +require 'google/ads/google_ads/v25/enums/keyword_plan_keyword_annotation_pb' +require 'google/ads/google_ads/v25/enums/keyword_plan_network_pb' +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' + + +descriptor_data = "\nAgoogle/ads/googleads/v25/services/keyword_plan_idea_service.proto\x12!google.ads.googleads.v25.services\x1a.google/ads/googleads/v25/common/criteria.proto\x1a+google/ads/googleads/v25/common/dates.proto\x1a\x39google/ads/googleads/v25/common/keyword_plan_common.proto\x1a\x37google/ads/googleads/v25/enums/keyword_match_type.proto\x1a\x44google/ads/googleads/v25/enums/keyword_plan_keyword_annotation.proto\x1a\x39google/ads/googleads/v25/enums/keyword_plan_network.proto\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\"\xff\x06\n\x1bGenerateKeywordIdeasRequest\x12\x13\n\x0b\x63ustomer_id\x18\x01 \x01(\t\x12\x15\n\x08language\x18\x0e \x01(\tH\x01\x88\x01\x01\x12\x1c\n\x14geo_target_constants\x18\x0f \x03(\t\x12\x1e\n\x16include_adult_keywords\x18\n \x01(\x08\x12\x12\n\npage_token\x18\x0c \x01(\t\x12\x11\n\tpage_size\x18\r \x01(\x05\x12g\n\x14keyword_plan_network\x18\t \x01(\x0e\x32I.google.ads.googleads.v25.enums.KeywordPlanNetworkEnum.KeywordPlanNetwork\x12y\n\x12keyword_annotation\x18\x11 \x03(\x0e\x32].google.ads.googleads.v25.enums.KeywordPlanKeywordAnnotationEnum.KeywordPlanKeywordAnnotation\x12W\n\x11\x61ggregate_metrics\x18\x10 \x01(\x0b\x32<.google.ads.googleads.v25.common.KeywordPlanAggregateMetrics\x12]\n\x1ahistorical_metrics_options\x18\x12 \x01(\x0b\x32\x39.google.ads.googleads.v25.common.HistoricalMetricsOptions\x12T\n\x14keyword_and_url_seed\x18\x02 \x01(\x0b\x32\x34.google.ads.googleads.v25.services.KeywordAndUrlSeedH\x00\x12\x46\n\x0ckeyword_seed\x18\x03 \x01(\x0b\x32..google.ads.googleads.v25.services.KeywordSeedH\x00\x12>\n\x08url_seed\x18\x05 \x01(\x0b\x32*.google.ads.googleads.v25.services.UrlSeedH\x00\x12@\n\tsite_seed\x18\x0b \x01(\x0b\x32+.google.ads.googleads.v25.services.SiteSeedH\x00\x42\x06\n\x04seedB\x0b\n\t_language\"?\n\x11KeywordAndUrlSeed\x12\x10\n\x03url\x18\x03 \x01(\tH\x00\x88\x01\x01\x12\x10\n\x08keywords\x18\x04 \x03(\tB\x06\n\x04_url\"\x1f\n\x0bKeywordSeed\x12\x10\n\x08keywords\x18\x02 \x03(\t\"&\n\x08SiteSeed\x12\x11\n\x04site\x18\x02 \x01(\tH\x00\x88\x01\x01\x42\x07\n\x05_site\"#\n\x07UrlSeed\x12\x10\n\x03url\x18\x02 \x01(\tH\x00\x88\x01\x01\x42\x06\n\x04_url\"\xff\x01\n\x1bGenerateKeywordIdeaResponse\x12M\n\x07results\x18\x01 \x03(\x0b\x32<.google.ads.googleads.v25.services.GenerateKeywordIdeaResult\x12\x64\n\x18\x61ggregate_metric_results\x18\x04 \x01(\x0b\x32\x42.google.ads.googleads.v25.common.KeywordPlanAggregateMetricResults\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x12\n\ntotal_size\x18\x03 \x01(\x03\"\xfe\x01\n\x19GenerateKeywordIdeaResult\x12\x11\n\x04text\x18\x05 \x01(\tH\x00\x88\x01\x01\x12[\n\x14keyword_idea_metrics\x18\x03 \x01(\x0b\x32=.google.ads.googleads.v25.common.KeywordPlanHistoricalMetrics\x12P\n\x13keyword_annotations\x18\x06 \x01(\x0b\x32\x33.google.ads.googleads.v25.common.KeywordAnnotations\x12\x16\n\x0e\x63lose_variants\x18\x07 \x03(\tB\x07\n\x05_text\"\xd3\x03\n\'GenerateKeywordHistoricalMetricsRequest\x12\x13\n\x0b\x63ustomer_id\x18\x01 \x01(\t\x12\x10\n\x08keywords\x18\x02 \x03(\t\x12\x15\n\x08language\x18\x04 \x01(\tH\x00\x88\x01\x01\x12\x1e\n\x16include_adult_keywords\x18\x05 \x01(\x08\x12\x1c\n\x14geo_target_constants\x18\x06 \x03(\t\x12g\n\x14keyword_plan_network\x18\x07 \x01(\x0e\x32I.google.ads.googleads.v25.enums.KeywordPlanNetworkEnum.KeywordPlanNetwork\x12W\n\x11\x61ggregate_metrics\x18\x08 \x01(\x0b\x32<.google.ads.googleads.v25.common.KeywordPlanAggregateMetrics\x12]\n\x1ahistorical_metrics_options\x18\x03 \x01(\x0b\x32\x39.google.ads.googleads.v25.common.HistoricalMetricsOptionsB\x0b\n\t_language\"\xec\x01\n(GenerateKeywordHistoricalMetricsResponse\x12Z\n\x07results\x18\x01 \x03(\x0b\x32I.google.ads.googleads.v25.services.GenerateKeywordHistoricalMetricsResult\x12\x64\n\x18\x61ggregate_metric_results\x18\x02 \x01(\x0b\x32\x42.google.ads.googleads.v25.common.KeywordPlanAggregateMetricResults\"\xb4\x01\n&GenerateKeywordHistoricalMetricsResult\x12\x11\n\x04text\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x16\n\x0e\x63lose_variants\x18\x03 \x03(\t\x12V\n\x0fkeyword_metrics\x18\x02 \x01(\x0b\x32=.google.ads.googleads.v25.common.KeywordPlanHistoricalMetricsB\x07\n\x05_text\"g\n\x1cGenerateAdGroupThemesRequest\x12\x18\n\x0b\x63ustomer_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x15\n\x08keywords\x18\x02 \x03(\tB\x03\xe0\x41\x02\x12\x16\n\tad_groups\x18\x03 \x03(\tB\x03\xe0\x41\x02\"\xd2\x01\n\x1dGenerateAdGroupThemesResponse\x12\x61\n\x1c\x61\x64_group_keyword_suggestions\x18\x01 \x03(\x0b\x32;.google.ads.googleads.v25.services.AdGroupKeywordSuggestion\x12N\n\x12unusable_ad_groups\x18\x02 \x03(\x0b\x32\x32.google.ads.googleads.v25.services.UnusableAdGroup\"\xed\x01\n\x18\x41\x64GroupKeywordSuggestion\x12\x14\n\x0ckeyword_text\x18\x01 \x01(\t\x12\x1e\n\x16suggested_keyword_text\x18\x02 \x01(\t\x12\x63\n\x14suggested_match_type\x18\x03 \x01(\x0e\x32\x45.google.ads.googleads.v25.enums.KeywordMatchTypeEnum.KeywordMatchType\x12\x1a\n\x12suggested_ad_group\x18\x04 \x01(\t\x12\x1a\n\x12suggested_campaign\x18\x05 \x01(\t\"5\n\x0fUnusableAdGroup\x12\x10\n\x08\x61\x64_group\x18\x01 \x01(\t\x12\x10\n\x08\x63\x61mpaign\x18\x02 \x01(\t\"\xfd\x01\n%GenerateKeywordForecastMetricsRequest\x12\x13\n\x0b\x63ustomer_id\x18\x01 \x01(\t\x12\x1a\n\rcurrency_code\x18\x02 \x01(\tH\x00\x88\x01\x01\x12\x43\n\x0f\x66orecast_period\x18\x03 \x01(\x0b\x32*.google.ads.googleads.v25.common.DateRange\x12L\n\x08\x63\x61mpaign\x18\x04 \x01(\x0b\x32\x35.google.ads.googleads.v25.services.CampaignToForecastB\x03\xe0\x41\x02\x42\x10\n\x0e_currency_code\"\xfd\x04\n\x12\x43\x61mpaignToForecast\x12\x1a\n\x12language_constants\x18\x01 \x03(\t\x12\x1c\n\x14geo_target_constants\x18\x08 \x03(\t\x12l\n\x10\x62idding_strategy\x18\x05 \x01(\x0b\x32M.google.ads.googleads.v25.services.CampaignToForecast.CampaignBiddingStrategyB\x03\xe0\x41\x02\x12\x45\n\tad_groups\x18\x07 \x03(\x0b\x32\x32.google.ads.googleads.v25.services.ForecastAdGroup\x1a\xf7\x02\n\x17\x43\x61mpaignBiddingStrategy\x12\x62\n\x1bmanual_cpc_bidding_strategy\x18\x01 \x01(\x0b\x32;.google.ads.googleads.v25.services.ManualCpcBiddingStrategyH\x00\x12l\n maximize_clicks_bidding_strategy\x18\x02 \x01(\x0b\x32@.google.ads.googleads.v25.services.MaximizeClicksBiddingStrategyH\x00\x12v\n%maximize_conversions_bidding_strategy\x18\x03 \x01(\x0b\x32\x45.google.ads.googleads.v25.services.MaximizeConversionsBiddingStrategyH\x00\x42\x12\n\x10\x62idding_strategy\"V\n\x0f\x46orecastAdGroup\x12\x43\n\x08keywords\x18\x04 \x03(\x0b\x32,.google.ads.googleads.v25.common.KeywordInfoB\x03\xe0\x41\x02\"u\n\x18ManualCpcBiddingStrategy\x12 \n\x13\x64\x61ily_budget_micros\x18\x01 \x01(\x03H\x00\x88\x01\x01\x12\x1f\n\x12max_cpc_bid_micros\x18\x02 \x01(\x03\x42\x03\xe0\x41\x02\x42\x16\n\x14_daily_budget_micros\"\x8f\x01\n\x1dMaximizeClicksBiddingStrategy\x12&\n\x19\x64\x61ily_target_spend_micros\x18\x01 \x01(\x03\x42\x03\xe0\x41\x02\x12\'\n\x1amax_cpc_bid_ceiling_micros\x18\x02 \x01(\x03H\x00\x88\x01\x01\x42\x1d\n\x1b_max_cpc_bid_ceiling_micros\"L\n\"MaximizeConversionsBiddingStrategy\x12&\n\x19\x64\x61ily_target_spend_micros\x18\x01 \x01(\x03\x42\x03\xe0\x41\x02\"\xa9\x01\n&GenerateKeywordForecastMetricsResponse\x12\x61\n\x19\x63\x61mpaign_forecast_metrics\x18\x01 \x01(\x0b\x32\x39.google.ads.googleads.v25.services.KeywordForecastMetricsH\x00\x88\x01\x01\x42\x1c\n\x1a_campaign_forecast_metrics\"\xfc\x01\n\x16KeywordForecastMetrics\x12\x1f\n\x12\x61verage_cpc_micros\x18\x03 \x01(\x03H\x00\x88\x01\x01\x12\x13\n\x06\x63licks\x18\x04 \x01(\x01H\x01\x88\x01\x01\x12\x18\n\x0b\x63ost_micros\x18\x05 \x01(\x03H\x02\x88\x01\x01\x12\x18\n\x0b\x63onversions\x18\x06 \x01(\x01H\x03\x88\x01\x01\x12\x1f\n\x12\x61verage_cpa_micros\x18\x08 \x01(\x03H\x04\x88\x01\x01\x42\x15\n\x13_average_cpc_microsB\t\n\x07_clicksB\x0e\n\x0c_cost_microsB\x0e\n\x0c_conversionsB\x15\n\x13_average_cpa_micros2\xce\x08\n\x16KeywordPlanIdeaService\x12\xd6\x01\n\x14GenerateKeywordIdeas\x12>.google.ads.googleads.v25.services.GenerateKeywordIdeasRequest\x1a>.google.ads.googleads.v25.services.GenerateKeywordIdeaResponse\">\x82\xd3\xe4\x93\x02\x38\"3/v25/customers/{customer_id=*}:generateKeywordIdeas:\x01*\x12\x87\x02\n GenerateKeywordHistoricalMetrics\x12J.google.ads.googleads.v25.services.GenerateKeywordHistoricalMetricsRequest\x1aK.google.ads.googleads.v25.services.GenerateKeywordHistoricalMetricsResponse\"J\x82\xd3\xe4\x93\x02\x44\"?/v25/customers/{customer_id=*}:generateKeywordHistoricalMetrics:\x01*\x12\xfc\x01\n\x15GenerateAdGroupThemes\x12?.google.ads.googleads.v25.services.GenerateAdGroupThemesRequest\x1a@.google.ads.googleads.v25.services.GenerateAdGroupThemesResponse\"`\xda\x41\x1e\x63ustomer_id,keywords,ad_groups\x82\xd3\xe4\x93\x02\x39\"4/v25/customers/{customer_id=*}:generateAdGroupThemes:\x01*\x12\x8a\x02\n\x1eGenerateKeywordForecastMetrics\x12H.google.ads.googleads.v25.services.GenerateKeywordForecastMetricsRequest\x1aI.google.ads.googleads.v25.services.GenerateKeywordForecastMetricsResponse\"S\xda\x41\x08\x63\x61mpaign\x82\xd3\xe4\x93\x02\x42\"=/v25/customers/{customer_id=*}:generateKeywordForecastMetrics:\x01*\x1a\x45\xca\x41\x18googleads.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/adwordsB\x87\x02\n%com.google.ads.googleads.v25.servicesB\x1bKeywordPlanIdeaServiceProtoP\x01ZIgoogle.golang.org/genproto/googleapis/ads/googleads/v25/services;services\xa2\x02\x03GAA\xaa\x02!Google.Ads.GoogleAds.V25.Services\xca\x02!Google\\Ads\\GoogleAds\\V25\\Services\xea\x02%Google::Ads::GoogleAds::V25::Servicesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Services + GenerateKeywordIdeasRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.GenerateKeywordIdeasRequest").msgclass + KeywordAndUrlSeed = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.KeywordAndUrlSeed").msgclass + KeywordSeed = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.KeywordSeed").msgclass + SiteSeed = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.SiteSeed").msgclass + UrlSeed = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.UrlSeed").msgclass + GenerateKeywordIdeaResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.GenerateKeywordIdeaResponse").msgclass + GenerateKeywordIdeaResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.GenerateKeywordIdeaResult").msgclass + GenerateKeywordHistoricalMetricsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.GenerateKeywordHistoricalMetricsRequest").msgclass + GenerateKeywordHistoricalMetricsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.GenerateKeywordHistoricalMetricsResponse").msgclass + GenerateKeywordHistoricalMetricsResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.GenerateKeywordHistoricalMetricsResult").msgclass + GenerateAdGroupThemesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.GenerateAdGroupThemesRequest").msgclass + GenerateAdGroupThemesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.GenerateAdGroupThemesResponse").msgclass + AdGroupKeywordSuggestion = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.AdGroupKeywordSuggestion").msgclass + UnusableAdGroup = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.UnusableAdGroup").msgclass + GenerateKeywordForecastMetricsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.GenerateKeywordForecastMetricsRequest").msgclass + CampaignToForecast = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.CampaignToForecast").msgclass + CampaignToForecast::CampaignBiddingStrategy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.CampaignToForecast.CampaignBiddingStrategy").msgclass + ForecastAdGroup = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.ForecastAdGroup").msgclass + ManualCpcBiddingStrategy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.ManualCpcBiddingStrategy").msgclass + MaximizeClicksBiddingStrategy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.MaximizeClicksBiddingStrategy").msgclass + MaximizeConversionsBiddingStrategy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.MaximizeConversionsBiddingStrategy").msgclass + GenerateKeywordForecastMetricsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.GenerateKeywordForecastMetricsResponse").msgclass + KeywordForecastMetrics = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.KeywordForecastMetrics").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/keyword_plan_idea_service_services_pb.rb b/lib/google/ads/google_ads/v25/services/keyword_plan_idea_service_services_pb.rb new file mode 100644 index 000000000..ea707e060 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/keyword_plan_idea_service_services_pb.rb @@ -0,0 +1,94 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/ads/googleads/v25/services/keyword_plan_idea_service.proto for package 'Google.Ads.GoogleAds.V25.Services' +# Original file comments: +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +require 'grpc' +require 'google/ads/google_ads/v25/services/keyword_plan_idea_service_pb' + +module Google + module Ads + module GoogleAds + module V25 + module Services + module KeywordPlanIdeaService + # Proto file describing the keyword plan idea service. + # + # Service to generate keyword ideas. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.ads.googleads.v25.services.KeywordPlanIdeaService' + + # Returns a list of keyword ideas. + # + # List of thrown errors: + # [AuthenticationError]() + # [AuthorizationError]() + # [CollectionSizeError]() + # [HeaderError]() + # [InternalError]() + # [KeywordPlanIdeaError]() + # [QuotaError]() + # [RequestError]() + rpc :GenerateKeywordIdeas, ::Google::Ads::GoogleAds::V25::Services::GenerateKeywordIdeasRequest, ::Google::Ads::GoogleAds::V25::Services::GenerateKeywordIdeaResponse + # Returns a list of keyword historical metrics. + # + # List of thrown errors: + # [AuthenticationError]() + # [AuthorizationError]() + # [CollectionSizeError]() + # [HeaderError]() + # [InternalError]() + # [QuotaError]() + # [RequestError]() + rpc :GenerateKeywordHistoricalMetrics, ::Google::Ads::GoogleAds::V25::Services::GenerateKeywordHistoricalMetricsRequest, ::Google::Ads::GoogleAds::V25::Services::GenerateKeywordHistoricalMetricsResponse + # Returns a list of suggested AdGroups and suggested modifications + # (text, match type) for the given keywords. + # + # List of thrown errors: + # [AuthenticationError]() + # [AuthorizationError]() + # [CollectionSizeError]() + # [HeaderError]() + # [InternalError]() + # [QuotaError]() + # [RequestError]() + rpc :GenerateAdGroupThemes, ::Google::Ads::GoogleAds::V25::Services::GenerateAdGroupThemesRequest, ::Google::Ads::GoogleAds::V25::Services::GenerateAdGroupThemesResponse + # Returns metrics (such as impressions, clicks, total cost) of a keyword + # forecast for the given campaign. + # + # List of thrown errors: + # [AuthenticationError]() + # [AuthorizationError]() + # [CollectionSizeError]() + # [HeaderError]() + # [InternalError]() + # [QuotaError]() + # [RequestError]() + rpc :GenerateKeywordForecastMetrics, ::Google::Ads::GoogleAds::V25::Services::GenerateKeywordForecastMetricsRequest, ::Google::Ads::GoogleAds::V25::Services::GenerateKeywordForecastMetricsResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/keyword_plan_service.rb b/lib/google/ads/google_ads/v25/services/keyword_plan_service.rb new file mode 100644 index 000000000..5af705b68 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/keyword_plan_service.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/ads/google_ads/version" + +require "google/ads/google_ads/v25/services/keyword_plan_service/credentials" +require "google/ads/google_ads/v25/services/keyword_plan_service/paths" +require "google/ads/google_ads/v25/services/keyword_plan_service/client" + +module Google + module Ads + module GoogleAds + module V25 + module Services + ## + # Service to manage keyword plans. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/ads/google_ads/v25/services/keyword_plan_service" + # client = ::Google::Ads::GoogleAds::V25::Services::KeywordPlanService::Client.new + # + module KeywordPlanService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "keyword_plan_service", "helpers.rb" +require "google/ads/google_ads/v25/services/keyword_plan_service/helpers" if ::File.file? helper_path diff --git a/lib/google/ads/google_ads/v25/services/keyword_plan_service/client.rb b/lib/google/ads/google_ads/v25/services/keyword_plan_service/client.rb new file mode 100644 index 000000000..282015039 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/keyword_plan_service/client.rb @@ -0,0 +1,504 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# require "google/ads/google_ads/error" +require "google/ads/google_ads/v25/services/keyword_plan_service_pb" + +module Google + module Ads + module GoogleAds + module V25 + module Services + module KeywordPlanService + ## + # Client for the KeywordPlanService service. + # + # Service to manage keyword plans. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "googleads.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :keyword_plan_service_stub + + ## + # Configure the KeywordPlanService Client class. + # + # See {::Google::Ads::GoogleAds::V25::Services::KeywordPlanService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all KeywordPlanService clients + # ::Google::Ads::GoogleAds::V25::Services::KeywordPlanService::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + default_config = Client::Configuration.new + + default_config.timeout = 14_400.0 + default_config.retry_policy = { + initial_delay: 5.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the KeywordPlanService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Ads::GoogleAds::V25::Services::KeywordPlanService::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @keyword_plan_service_stub.universe_domain + end + + ## + # Create a new KeywordPlanService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Ads::GoogleAds::V25::Services::KeywordPlanService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Ads::GoogleAds::V25::Services::KeywordPlanService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the KeywordPlanService client. + # @yieldparam config [Client::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/ads/google_ads/v25/services/keyword_plan_service_services_pb" + + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @keyword_plan_service_stub = ::Gapic::ServiceStub.new( + ::Google::Ads::GoogleAds::V25::Services::KeywordPlanService::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool, + logger: @config.logger + ) + + @keyword_plan_service_stub.stub_logger&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @keyword_plan_service_stub.logger + end + + # Service calls + + ## + # Creates, updates, or removes keyword plans. Operation statuses are + # returned. + # + # List of thrown errors: + # [AuthenticationError]() + # [AuthorizationError]() + # [DatabaseError]() + # [FieldError]() + # [HeaderError]() + # [InternalError]() + # [KeywordPlanError]() + # [MutateError]() + # [NewResourceCreationError]() + # [QuotaError]() + # [RequestError]() + # [ResourceCountLimitExceededError]() + # [StringLengthError]() + # + # @overload mutate_keyword_plans(request, options = nil) + # Pass arguments to `mutate_keyword_plans` via a request object, either of type + # {::Google::Ads::GoogleAds::V25::Services::MutateKeywordPlansRequest} or an equivalent Hash. + # + # @param request [::Google::Ads::GoogleAds::V25::Services::MutateKeywordPlansRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload mutate_keyword_plans(customer_id: nil, operations: nil, partial_failure: nil, validate_only: nil) + # Pass arguments to `mutate_keyword_plans` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param customer_id [::String] + # Required. The ID of the customer whose keyword plans are being modified. + # @param operations [::Array<::Google::Ads::GoogleAds::V25::Services::KeywordPlanOperation, ::Hash>] + # Required. The list of operations to perform on individual keyword plans. + # @param partial_failure [::Boolean] + # 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. + # @param validate_only [::Boolean] + # If true, the request is validated but not executed. Only errors are + # returned, not results. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Ads::GoogleAds::V25::Services::MutateKeywordPlansResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Ads::GoogleAds::V25::Services::MutateKeywordPlansResponse] + # + # @raise [Google::Ads::GoogleAds::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/ads/google_ads/v25/services" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Ads::GoogleAds::V25::Services::KeywordPlanService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Ads::GoogleAds::V25::Services::MutateKeywordPlansRequest.new + # + # # Call the mutate_keyword_plans method. + # result = client.mutate_keyword_plans request + # + # # The returned object is of type Google::Ads::GoogleAds::V25::Services::MutateKeywordPlansResponse. + # p result + # + def mutate_keyword_plans request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::GoogleAds::V25::Services::MutateKeywordPlansRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.mutate_keyword_plans.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Ads::GoogleAds::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.customer_id + header_params["customer_id"] = request.customer_id + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.mutate_keyword_plans.timeout, + metadata: metadata, + retry_policy: @config.rpcs.mutate_keyword_plans.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @keyword_plan_service_stub.call_rpc :mutate_keyword_plans, request, + options: options do |response, operation| + yield response, operation if block_given? + end + # rescue GRPC::BadStatus => grpc_error + # raise Google::Ads::GoogleAds::Error.new grpc_error.message + end + + ## + # Configuration class for the KeywordPlanService API. + # + # This class represents the configuration for KeywordPlanService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Ads::GoogleAds::V25::Services::KeywordPlanService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # mutate_keyword_plans to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Ads::GoogleAds::V25::Services::KeywordPlanService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.mutate_keyword_plans.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Ads::GoogleAds::V25::Services::KeywordPlanService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.mutate_keyword_plans.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Ads::GoogleAds::V25::Services::KeywordPlanService::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "googleads.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, + ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the KeywordPlanService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `mutate_keyword_plans` + # @return [::Gapic::Config::Method] + # + attr_reader :mutate_keyword_plans + + # @private + def initialize parent_rpcs = nil + mutate_keyword_plans_config = parent_rpcs.mutate_keyword_plans if parent_rpcs.respond_to? :mutate_keyword_plans + @mutate_keyword_plans = ::Gapic::Config::Method.new mutate_keyword_plans_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/keyword_plan_service/credentials.rb b/lib/google/ads/google_ads/v25/services/keyword_plan_service/credentials.rb new file mode 100644 index 000000000..f5fcb1189 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/keyword_plan_service/credentials.rb @@ -0,0 +1,38 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Ads + module GoogleAds + module V25 + module Services + module KeywordPlanService + # Credentials for the KeywordPlanService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/adwords" + ] + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/keyword_plan_service/paths.rb b/lib/google/ads/google_ads/v25/services/keyword_plan_service/paths.rb new file mode 100644 index 000000000..8e869403e --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/keyword_plan_service/paths.rb @@ -0,0 +1,52 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Ads + module GoogleAds + module V25 + module Services + module KeywordPlanService + # Path helper methods for the KeywordPlanService API. + module Paths + ## + # Create a fully-qualified KeywordPlan resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/keywordPlans/{keyword_plan_id}` + # + # @param customer_id [String] + # @param keyword_plan_id [String] + # + # @return [::String] + def keyword_plan_path customer_id:, keyword_plan_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/keywordPlans/#{keyword_plan_id}" + end + + extend self + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/keyword_plan_service_pb.rb b/lib/google/ads/google_ads/v25/services/keyword_plan_service_pb.rb new file mode 100644 index 000000000..ad7851337 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/keyword_plan_service_pb.rb @@ -0,0 +1,34 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/services/keyword_plan_service.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/resources/keyword_plan_pb' +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/field_mask_pb' +require 'google/rpc/status_pb' + + +descriptor_data = "\n grpc_error + # raise Google::Ads::GoogleAds::Error.new grpc_error.message + end + + ## + # Configuration class for the KeywordThemeConstantService API. + # + # This class represents the configuration for KeywordThemeConstantService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Ads::GoogleAds::V25::Services::KeywordThemeConstantService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # suggest_keyword_theme_constants to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Ads::GoogleAds::V25::Services::KeywordThemeConstantService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.suggest_keyword_theme_constants.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Ads::GoogleAds::V25::Services::KeywordThemeConstantService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.suggest_keyword_theme_constants.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Ads::GoogleAds::V25::Services::KeywordThemeConstantService::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "googleads.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, + ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the KeywordThemeConstantService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `suggest_keyword_theme_constants` + # @return [::Gapic::Config::Method] + # + attr_reader :suggest_keyword_theme_constants + + # @private + def initialize parent_rpcs = nil + suggest_keyword_theme_constants_config = parent_rpcs.suggest_keyword_theme_constants if parent_rpcs.respond_to? :suggest_keyword_theme_constants + @suggest_keyword_theme_constants = ::Gapic::Config::Method.new suggest_keyword_theme_constants_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/keyword_theme_constant_service/credentials.rb b/lib/google/ads/google_ads/v25/services/keyword_theme_constant_service/credentials.rb new file mode 100644 index 000000000..99e7b6bf0 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/keyword_theme_constant_service/credentials.rb @@ -0,0 +1,38 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Ads + module GoogleAds + module V25 + module Services + module KeywordThemeConstantService + # Credentials for the KeywordThemeConstantService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/adwords" + ] + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/keyword_theme_constant_service/paths.rb b/lib/google/ads/google_ads/v25/services/keyword_theme_constant_service/paths.rb new file mode 100644 index 000000000..225d638c6 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/keyword_theme_constant_service/paths.rb @@ -0,0 +1,52 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Ads + module GoogleAds + module V25 + module Services + module KeywordThemeConstantService + # Path helper methods for the KeywordThemeConstantService API. + module Paths + ## + # Create a fully-qualified KeywordThemeConstant resource string. + # + # The resource will be in the following format: + # + # `keywordThemeConstants/{express_category_id}~{express_sub_category_id}` + # + # @param express_category_id [String] + # @param express_sub_category_id [String] + # + # @return [::String] + def keyword_theme_constant_path express_category_id:, express_sub_category_id: + raise ::ArgumentError, "express_category_id cannot contain /" if express_category_id.to_s.include? "/" + + "keywordThemeConstants/#{express_category_id}~#{express_sub_category_id}" + end + + extend self + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/keyword_theme_constant_service_pb.rb b/lib/google/ads/google_ads/v25/services/keyword_theme_constant_service_pb.rb new file mode 100644 index 000000000..2b54e1495 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/keyword_theme_constant_service_pb.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/services/keyword_theme_constant_service.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/resources/keyword_theme_constant_pb' +require 'google/api/annotations_pb' +require 'google/api/client_pb' + + +descriptor_data = "\nFgoogle/ads/googleads/v25/services/keyword_theme_constant_service.proto\x12!google.ads.googleads.v25.services\x1a?google/ads/googleads/v25/resources/keyword_theme_constant.proto\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\"f\n#SuggestKeywordThemeConstantsRequest\x12\x12\n\nquery_text\x18\x01 \x01(\t\x12\x14\n\x0c\x63ountry_code\x18\x02 \x01(\t\x12\x15\n\rlanguage_code\x18\x03 \x01(\t\"\x81\x01\n$SuggestKeywordThemeConstantsResponse\x12Y\n\x17keyword_theme_constants\x18\x01 \x03(\x0b\x32\x38.google.ads.googleads.v25.resources.KeywordThemeConstant2\xc5\x02\n\x1bKeywordThemeConstantService\x12\xde\x01\n\x1cSuggestKeywordThemeConstants\x12\x46.google.ads.googleads.v25.services.SuggestKeywordThemeConstantsRequest\x1aG.google.ads.googleads.v25.services.SuggestKeywordThemeConstantsResponse\"-\x82\xd3\xe4\x93\x02\'\"\"/v25/keywordThemeConstants:suggest:\x01*\x1a\x45\xca\x41\x18googleads.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/adwordsB\x8c\x02\n%com.google.ads.googleads.v25.servicesB KeywordThemeConstantServiceProtoP\x01ZIgoogle.golang.org/genproto/googleapis/ads/googleads/v25/services;services\xa2\x02\x03GAA\xaa\x02!Google.Ads.GoogleAds.V25.Services\xca\x02!Google\\Ads\\GoogleAds\\V25\\Services\xea\x02%Google::Ads::GoogleAds::V25::Servicesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Services + SuggestKeywordThemeConstantsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.SuggestKeywordThemeConstantsRequest").msgclass + SuggestKeywordThemeConstantsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.SuggestKeywordThemeConstantsResponse").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/keyword_theme_constant_service_services_pb.rb b/lib/google/ads/google_ads/v25/services/keyword_theme_constant_service_services_pb.rb new file mode 100644 index 000000000..97f387d02 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/keyword_theme_constant_service_services_pb.rb @@ -0,0 +1,57 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/ads/googleads/v25/services/keyword_theme_constant_service.proto for package 'Google.Ads.GoogleAds.V25.Services' +# Original file comments: +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +require 'grpc' +require 'google/ads/google_ads/v25/services/keyword_theme_constant_service_pb' + +module Google + module Ads + module GoogleAds + module V25 + module Services + module KeywordThemeConstantService + # Proto file describing the Smart Campaign keyword theme constant service. + # + # Service to fetch Smart Campaign keyword themes. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.ads.googleads.v25.services.KeywordThemeConstantService' + + # Returns KeywordThemeConstant suggestions by keyword themes. + # + # List of thrown errors: + # [AuthenticationError]() + # [AuthorizationError]() + # [HeaderError]() + # [InternalError]() + # [QuotaError]() + # [RequestError]() + rpc :SuggestKeywordThemeConstants, ::Google::Ads::GoogleAds::V25::Services::SuggestKeywordThemeConstantsRequest, ::Google::Ads::GoogleAds::V25::Services::SuggestKeywordThemeConstantsResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/label_service.rb b/lib/google/ads/google_ads/v25/services/label_service.rb new file mode 100644 index 000000000..78fdd6d38 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/label_service.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/ads/google_ads/version" + +require "google/ads/google_ads/v25/services/label_service/credentials" +require "google/ads/google_ads/v25/services/label_service/paths" +require "google/ads/google_ads/v25/services/label_service/client" + +module Google + module Ads + module GoogleAds + module V25 + module Services + ## + # Service to manage labels. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/ads/google_ads/v25/services/label_service" + # client = ::Google::Ads::GoogleAds::V25::Services::LabelService::Client.new + # + module LabelService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "label_service", "helpers.rb" +require "google/ads/google_ads/v25/services/label_service/helpers" if ::File.file? helper_path diff --git a/lib/google/ads/google_ads/v25/services/label_service/client.rb b/lib/google/ads/google_ads/v25/services/label_service/client.rb new file mode 100644 index 000000000..4ad237939 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/label_service/client.rb @@ -0,0 +1,515 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# require "google/ads/google_ads/error" +require "google/ads/google_ads/v25/services/label_service_pb" + +module Google + module Ads + module GoogleAds + module V25 + module Services + module LabelService + ## + # Client for the LabelService service. + # + # Service to manage labels. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "googleads.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :label_service_stub + + ## + # Configure the LabelService Client class. + # + # See {::Google::Ads::GoogleAds::V25::Services::LabelService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all LabelService clients + # ::Google::Ads::GoogleAds::V25::Services::LabelService::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + default_config = Client::Configuration.new + + default_config.timeout = 14_400.0 + default_config.retry_policy = { + initial_delay: 5.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the LabelService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Ads::GoogleAds::V25::Services::LabelService::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @label_service_stub.universe_domain + end + + ## + # Create a new LabelService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Ads::GoogleAds::V25::Services::LabelService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Ads::GoogleAds::V25::Services::LabelService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the LabelService client. + # @yieldparam config [Client::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/ads/google_ads/v25/services/label_service_services_pb" + + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @label_service_stub = ::Gapic::ServiceStub.new( + ::Google::Ads::GoogleAds::V25::Services::LabelService::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool, + logger: @config.logger + ) + + @label_service_stub.stub_logger&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @label_service_stub.logger + end + + # Service calls + + ## + # Creates, updates, or removes labels. Operation statuses are returned. + # + # List of thrown errors: + # [AuthenticationError]() + # [AuthorizationError]() + # [DatabaseError]() + # [DateError]() + # [DistinctError]() + # [FieldError]() + # [FieldMaskError]() + # [HeaderError]() + # [IdError]() + # [InternalError]() + # [LabelError]() + # [MutateError]() + # [NewResourceCreationError]() + # [NotEmptyError]() + # [NullError]() + # [OperatorError]() + # [QuotaError]() + # [RangeError]() + # [RequestError]() + # [ResourceCountLimitExceededError]() + # [SizeLimitError]() + # [StringFormatError]() + # [StringLengthError]() + # + # @overload mutate_labels(request, options = nil) + # Pass arguments to `mutate_labels` via a request object, either of type + # {::Google::Ads::GoogleAds::V25::Services::MutateLabelsRequest} or an equivalent Hash. + # + # @param request [::Google::Ads::GoogleAds::V25::Services::MutateLabelsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload mutate_labels(customer_id: nil, operations: nil, partial_failure: nil, validate_only: nil, response_content_type: nil) + # Pass arguments to `mutate_labels` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param customer_id [::String] + # Required. ID of the customer whose labels are being modified. + # @param operations [::Array<::Google::Ads::GoogleAds::V25::Services::LabelOperation, ::Hash>] + # Required. The list of operations to perform on labels. + # @param partial_failure [::Boolean] + # 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. + # @param validate_only [::Boolean] + # If true, the request is validated but not executed. Only errors are + # returned, not results. + # @param response_content_type [::Google::Ads::GoogleAds::V25::Enums::ResponseContentTypeEnum::ResponseContentType] + # The response content type setting. Determines whether the mutable resource + # or just the resource name should be returned post mutation. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Ads::GoogleAds::V25::Services::MutateLabelsResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Ads::GoogleAds::V25::Services::MutateLabelsResponse] + # + # @raise [Google::Ads::GoogleAds::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/ads/google_ads/v25/services" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Ads::GoogleAds::V25::Services::LabelService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Ads::GoogleAds::V25::Services::MutateLabelsRequest.new + # + # # Call the mutate_labels method. + # result = client.mutate_labels request + # + # # The returned object is of type Google::Ads::GoogleAds::V25::Services::MutateLabelsResponse. + # p result + # + def mutate_labels request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::GoogleAds::V25::Services::MutateLabelsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.mutate_labels.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Ads::GoogleAds::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.customer_id + header_params["customer_id"] = request.customer_id + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.mutate_labels.timeout, + metadata: metadata, + retry_policy: @config.rpcs.mutate_labels.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @label_service_stub.call_rpc :mutate_labels, request, options: options do |response, operation| + yield response, operation if block_given? + end + # rescue GRPC::BadStatus => grpc_error + # raise Google::Ads::GoogleAds::Error.new grpc_error.message + end + + ## + # Configuration class for the LabelService API. + # + # This class represents the configuration for LabelService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Ads::GoogleAds::V25::Services::LabelService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # mutate_labels to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Ads::GoogleAds::V25::Services::LabelService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.mutate_labels.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Ads::GoogleAds::V25::Services::LabelService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.mutate_labels.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Ads::GoogleAds::V25::Services::LabelService::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "googleads.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, + ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the LabelService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `mutate_labels` + # @return [::Gapic::Config::Method] + # + attr_reader :mutate_labels + + # @private + def initialize parent_rpcs = nil + mutate_labels_config = parent_rpcs.mutate_labels if parent_rpcs.respond_to? :mutate_labels + @mutate_labels = ::Gapic::Config::Method.new mutate_labels_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/label_service/credentials.rb b/lib/google/ads/google_ads/v25/services/label_service/credentials.rb new file mode 100644 index 000000000..c8addaae7 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/label_service/credentials.rb @@ -0,0 +1,38 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Ads + module GoogleAds + module V25 + module Services + module LabelService + # Credentials for the LabelService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/adwords" + ] + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/label_service/paths.rb b/lib/google/ads/google_ads/v25/services/label_service/paths.rb new file mode 100644 index 000000000..c685804fa --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/label_service/paths.rb @@ -0,0 +1,52 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Ads + module GoogleAds + module V25 + module Services + module LabelService + # Path helper methods for the LabelService API. + module Paths + ## + # Create a fully-qualified Label resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/labels/{label_id}` + # + # @param customer_id [String] + # @param label_id [String] + # + # @return [::String] + def label_path customer_id:, label_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/labels/#{label_id}" + end + + extend self + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/label_service_pb.rb b/lib/google/ads/google_ads/v25/services/label_service_pb.rb new file mode 100644 index 000000000..e162a85ef --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/label_service_pb.rb @@ -0,0 +1,35 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/services/label_service.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/enums/response_content_type_pb' +require 'google/ads/google_ads/v25/resources/label_pb' +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/field_mask_pb' +require 'google/rpc/status_pb' + + +descriptor_data = "\n5google/ads/googleads/v25/services/label_service.proto\x12!google.ads.googleads.v25.services\x1a:google/ads/googleads/v25/enums/response_content_type.proto\x1a.google/ads/googleads/v25/resources/label.proto\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\x1a\x17google/rpc/status.proto\"\x97\x02\n\x13MutateLabelsRequest\x12\x18\n\x0b\x63ustomer_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12J\n\noperations\x18\x02 \x03(\x0b\x32\x31.google.ads.googleads.v25.services.LabelOperationB\x03\xe0\x41\x02\x12\x17\n\x0fpartial_failure\x18\x03 \x01(\x08\x12\x15\n\rvalidate_only\x18\x04 \x01(\x08\x12j\n\x15response_content_type\x18\x05 \x01(\x0e\x32K.google.ads.googleads.v25.enums.ResponseContentTypeEnum.ResponseContentType\"\xff\x01\n\x0eLabelOperation\x12/\n\x0bupdate_mask\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\x12;\n\x06\x63reate\x18\x01 \x01(\x0b\x32).google.ads.googleads.v25.resources.LabelH\x00\x12;\n\x06update\x18\x02 \x01(\x0b\x32).google.ads.googleads.v25.resources.LabelH\x00\x12\x35\n\x06remove\x18\x03 \x01(\tB#\xfa\x41 \n\x1egoogleads.googleapis.com/LabelH\x00\x42\x0b\n\toperation\"\x90\x01\n\x14MutateLabelsResponse\x12\x31\n\x15partial_failure_error\x18\x03 \x01(\x0b\x32\x12.google.rpc.Status\x12\x45\n\x07results\x18\x02 \x03(\x0b\x32\x34.google.ads.googleads.v25.services.MutateLabelResult\"\x89\x01\n\x11MutateLabelResult\x12:\n\rresource_name\x18\x01 \x01(\tB#\xfa\x41 \n\x1egoogleads.googleapis.com/Label\x12\x38\n\x05label\x18\x02 \x01(\x0b\x32).google.ads.googleads.v25.resources.Label2\xa9\x02\n\x0cLabelService\x12\xd1\x01\n\x0cMutateLabels\x12\x36.google.ads.googleads.v25.services.MutateLabelsRequest\x1a\x37.google.ads.googleads.v25.services.MutateLabelsResponse\"P\xda\x41\x16\x63ustomer_id,operations\x82\xd3\xe4\x93\x02\x31\",/v25/customers/{customer_id=*}/labels:mutate:\x01*\x1a\x45\xca\x41\x18googleads.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/adwordsB\xfd\x01\n%com.google.ads.googleads.v25.servicesB\x11LabelServiceProtoP\x01ZIgoogle.golang.org/genproto/googleapis/ads/googleads/v25/services;services\xa2\x02\x03GAA\xaa\x02!Google.Ads.GoogleAds.V25.Services\xca\x02!Google\\Ads\\GoogleAds\\V25\\Services\xea\x02%Google::Ads::GoogleAds::V25::Servicesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Services + MutateLabelsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.MutateLabelsRequest").msgclass + LabelOperation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.LabelOperation").msgclass + MutateLabelsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.MutateLabelsResponse").msgclass + MutateLabelResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.MutateLabelResult").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/label_service_services_pb.rb b/lib/google/ads/google_ads/v25/services/label_service_services_pb.rb new file mode 100644 index 000000000..384fb583c --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/label_service_services_pb.rb @@ -0,0 +1,72 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/ads/googleads/v25/services/label_service.proto for package 'Google.Ads.GoogleAds.V25.Services' +# Original file comments: +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +require 'grpc' +require 'google/ads/google_ads/v25/services/label_service_pb' + +module Google + module Ads + module GoogleAds + module V25 + module Services + module LabelService + # Service to manage labels. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.ads.googleads.v25.services.LabelService' + + # Creates, updates, or removes labels. Operation statuses are returned. + # + # List of thrown errors: + # [AuthenticationError]() + # [AuthorizationError]() + # [DatabaseError]() + # [DateError]() + # [DistinctError]() + # [FieldError]() + # [FieldMaskError]() + # [HeaderError]() + # [IdError]() + # [InternalError]() + # [LabelError]() + # [MutateError]() + # [NewResourceCreationError]() + # [NotEmptyError]() + # [NullError]() + # [OperatorError]() + # [QuotaError]() + # [RangeError]() + # [RequestError]() + # [ResourceCountLimitExceededError]() + # [SizeLimitError]() + # [StringFormatError]() + # [StringLengthError]() + rpc :MutateLabels, ::Google::Ads::GoogleAds::V25::Services::MutateLabelsRequest, ::Google::Ads::GoogleAds::V25::Services::MutateLabelsResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/local_services_lead_service.rb b/lib/google/ads/google_ads/v25/services/local_services_lead_service.rb new file mode 100644 index 000000000..fa12ea0fb --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/local_services_lead_service.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/ads/google_ads/version" + +require "google/ads/google_ads/v25/services/local_services_lead_service/credentials" +require "google/ads/google_ads/v25/services/local_services_lead_service/paths" +require "google/ads/google_ads/v25/services/local_services_lead_service/client" + +module Google + module Ads + module GoogleAds + module V25 + module Services + ## + # This service allows management of LocalServicesLead resources. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/ads/google_ads/v25/services/local_services_lead_service" + # client = ::Google::Ads::GoogleAds::V25::Services::LocalServicesLeadService::Client.new + # + module LocalServicesLeadService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "local_services_lead_service", "helpers.rb" +require "google/ads/google_ads/v25/services/local_services_lead_service/helpers" if ::File.file? helper_path diff --git a/lib/google/ads/google_ads/v25/services/local_services_lead_service/client.rb b/lib/google/ads/google_ads/v25/services/local_services_lead_service/client.rb new file mode 100644 index 000000000..5e4cf64fc --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/local_services_lead_service/client.rb @@ -0,0 +1,586 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# require "google/ads/google_ads/error" +require "google/ads/google_ads/v25/services/local_services_lead_service_pb" + +module Google + module Ads + module GoogleAds + module V25 + module Services + module LocalServicesLeadService + ## + # Client for the LocalServicesLeadService service. + # + # This service allows management of LocalServicesLead resources. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "googleads.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :local_services_lead_service_stub + + ## + # Configure the LocalServicesLeadService Client class. + # + # See {::Google::Ads::GoogleAds::V25::Services::LocalServicesLeadService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all LocalServicesLeadService clients + # ::Google::Ads::GoogleAds::V25::Services::LocalServicesLeadService::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + default_config = Client::Configuration.new + + default_config.timeout = 14_400.0 + default_config.retry_policy = { + initial_delay: 5.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the LocalServicesLeadService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Ads::GoogleAds::V25::Services::LocalServicesLeadService::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @local_services_lead_service_stub.universe_domain + end + + ## + # Create a new LocalServicesLeadService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Ads::GoogleAds::V25::Services::LocalServicesLeadService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Ads::GoogleAds::V25::Services::LocalServicesLeadService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the LocalServicesLeadService client. + # @yieldparam config [Client::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/ads/google_ads/v25/services/local_services_lead_service_services_pb" + + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @local_services_lead_service_stub = ::Gapic::ServiceStub.new( + ::Google::Ads::GoogleAds::V25::Services::LocalServicesLeadService::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool, + logger: @config.logger + ) + + @local_services_lead_service_stub.stub_logger&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @local_services_lead_service_stub.logger + end + + # Service calls + + ## + # RPC to append Local Services Lead Conversation resources to Local Services + # Lead resources. + # + # @overload append_lead_conversation(request, options = nil) + # Pass arguments to `append_lead_conversation` via a request object, either of type + # {::Google::Ads::GoogleAds::V25::Services::AppendLeadConversationRequest} or an equivalent Hash. + # + # @param request [::Google::Ads::GoogleAds::V25::Services::AppendLeadConversationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload append_lead_conversation(customer_id: nil, conversations: nil) + # Pass arguments to `append_lead_conversation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param customer_id [::String] + # Required. The Id of the customer which owns the leads onto which the + # conversations will be appended. + # @param conversations [::Array<::Google::Ads::GoogleAds::V25::Services::Conversation, ::Hash>] + # Required. Conversations that are being appended. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Ads::GoogleAds::V25::Services::AppendLeadConversationResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Ads::GoogleAds::V25::Services::AppendLeadConversationResponse] + # + # @raise [Google::Ads::GoogleAds::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/ads/google_ads/v25/services" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Ads::GoogleAds::V25::Services::LocalServicesLeadService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Ads::GoogleAds::V25::Services::AppendLeadConversationRequest.new + # + # # Call the append_lead_conversation method. + # result = client.append_lead_conversation request + # + # # The returned object is of type Google::Ads::GoogleAds::V25::Services::AppendLeadConversationResponse. + # p result + # + def append_lead_conversation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::GoogleAds::V25::Services::AppendLeadConversationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.append_lead_conversation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Ads::GoogleAds::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.customer_id + header_params["customer_id"] = request.customer_id + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.append_lead_conversation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.append_lead_conversation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @local_services_lead_service_stub.call_rpc :append_lead_conversation, request, + options: options do |response, operation| + yield response, operation if block_given? + end + # rescue GRPC::BadStatus => grpc_error + # raise Google::Ads::GoogleAds::Error.new grpc_error.message + end + + ## + # RPC to provide feedback on Local Services Lead resources. + # + # @overload provide_lead_feedback(request, options = nil) + # Pass arguments to `provide_lead_feedback` via a request object, either of type + # {::Google::Ads::GoogleAds::V25::Services::ProvideLeadFeedbackRequest} or an equivalent Hash. + # + # @param request [::Google::Ads::GoogleAds::V25::Services::ProvideLeadFeedbackRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload provide_lead_feedback(resource_name: nil, survey_answer: nil, survey_satisfied: nil, survey_dissatisfied: nil) + # Pass arguments to `provide_lead_feedback` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param resource_name [::String] + # Required. The resource name of the local services lead that for which the + # feedback is being provided. + # @param survey_answer [::Google::Ads::GoogleAds::V25::Enums::LocalServicesLeadSurveyAnswerEnum::SurveyAnswer] + # Required. Survey answer for Local Services Ads Lead. + # @param survey_satisfied [::Google::Ads::GoogleAds::V25::Services::SurveySatisfied, ::Hash] + # Details about various factors for being satisfied with the lead. + # + # Note: The following parameters are mutually exclusive: `survey_satisfied`, `survey_dissatisfied`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. + # @param survey_dissatisfied [::Google::Ads::GoogleAds::V25::Services::SurveyDissatisfied, ::Hash] + # Details about various factors for not being satisfied with the lead. + # + # Note: The following parameters are mutually exclusive: `survey_dissatisfied`, `survey_satisfied`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Ads::GoogleAds::V25::Services::ProvideLeadFeedbackResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Ads::GoogleAds::V25::Services::ProvideLeadFeedbackResponse] + # + # @raise [Google::Ads::GoogleAds::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/ads/google_ads/v25/services" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Ads::GoogleAds::V25::Services::LocalServicesLeadService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Ads::GoogleAds::V25::Services::ProvideLeadFeedbackRequest.new + # + # # Call the provide_lead_feedback method. + # result = client.provide_lead_feedback request + # + # # The returned object is of type Google::Ads::GoogleAds::V25::Services::ProvideLeadFeedbackResponse. + # p result + # + def provide_lead_feedback request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::GoogleAds::V25::Services::ProvideLeadFeedbackRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.provide_lead_feedback.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Ads::GoogleAds::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.resource_name + header_params["resource_name"] = request.resource_name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.provide_lead_feedback.timeout, + metadata: metadata, + retry_policy: @config.rpcs.provide_lead_feedback.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @local_services_lead_service_stub.call_rpc :provide_lead_feedback, request, + options: options do |response, operation| + yield response, operation if block_given? + end + # rescue GRPC::BadStatus => grpc_error + # raise Google::Ads::GoogleAds::Error.new grpc_error.message + end + + ## + # Configuration class for the LocalServicesLeadService API. + # + # This class represents the configuration for LocalServicesLeadService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Ads::GoogleAds::V25::Services::LocalServicesLeadService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # append_lead_conversation to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Ads::GoogleAds::V25::Services::LocalServicesLeadService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.append_lead_conversation.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Ads::GoogleAds::V25::Services::LocalServicesLeadService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.append_lead_conversation.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Ads::GoogleAds::V25::Services::LocalServicesLeadService::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "googleads.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, + ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the LocalServicesLeadService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `append_lead_conversation` + # @return [::Gapic::Config::Method] + # + attr_reader :append_lead_conversation + ## + # RPC-specific configuration for `provide_lead_feedback` + # @return [::Gapic::Config::Method] + # + attr_reader :provide_lead_feedback + + # @private + def initialize parent_rpcs = nil + append_lead_conversation_config = parent_rpcs.append_lead_conversation if parent_rpcs.respond_to? :append_lead_conversation + @append_lead_conversation = ::Gapic::Config::Method.new append_lead_conversation_config + provide_lead_feedback_config = parent_rpcs.provide_lead_feedback if parent_rpcs.respond_to? :provide_lead_feedback + @provide_lead_feedback = ::Gapic::Config::Method.new provide_lead_feedback_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/local_services_lead_service/credentials.rb b/lib/google/ads/google_ads/v25/services/local_services_lead_service/credentials.rb new file mode 100644 index 000000000..d7e9a7b9c --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/local_services_lead_service/credentials.rb @@ -0,0 +1,38 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Ads + module GoogleAds + module V25 + module Services + module LocalServicesLeadService + # Credentials for the LocalServicesLeadService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/adwords" + ] + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/local_services_lead_service/paths.rb b/lib/google/ads/google_ads/v25/services/local_services_lead_service/paths.rb new file mode 100644 index 000000000..0b4b4e915 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/local_services_lead_service/paths.rb @@ -0,0 +1,52 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Ads + module GoogleAds + module V25 + module Services + module LocalServicesLeadService + # Path helper methods for the LocalServicesLeadService API. + module Paths + ## + # Create a fully-qualified LocalServicesLead resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/localServicesLeads/{local_services_lead_id}` + # + # @param customer_id [String] + # @param local_services_lead_id [String] + # + # @return [::String] + def local_services_lead_path customer_id:, local_services_lead_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/localServicesLeads/#{local_services_lead_id}" + end + + extend self + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/local_services_lead_service_pb.rb b/lib/google/ads/google_ads/v25/services/local_services_lead_service_pb.rb new file mode 100644 index 000000000..89ab7852f --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/local_services_lead_service_pb.rb @@ -0,0 +1,40 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/services/local_services_lead_service.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/enums/local_services_lead_credit_issuance_decision_pb' +require 'google/ads/google_ads/v25/enums/local_services_lead_survey_answer_pb' +require 'google/ads/google_ads/v25/enums/local_services_lead_survey_dissatisfied_reason_pb' +require 'google/ads/google_ads/v25/enums/local_services_lead_survey_satisfied_reason_pb' +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/rpc/status_pb' + + +descriptor_data = "\nCgoogle/ads/googleads/v25/services/local_services_lead_service.proto\x12!google.ads.googleads.v25.services\x1aQgoogle/ads/googleads/v25/enums/local_services_lead_credit_issuance_decision.proto\x1a\x46google/ads/googleads/v25/enums/local_services_lead_survey_answer.proto\x1aSgoogle/ads/googleads/v25/enums/local_services_lead_survey_dissatisfied_reason.proto\x1aPgoogle/ads/googleads/v25/enums/local_services_lead_survey_satisfied_reason.proto\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x17google/rpc/status.proto\"\x86\x01\n\x1d\x41ppendLeadConversationRequest\x12\x18\n\x0b\x63ustomer_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12K\n\rconversations\x18\x02 \x03(\x0b\x32/.google.ads.googleads.v25.services.ConversationB\x03\xe0\x41\x02\"p\n\x1e\x41ppendLeadConversationResponse\x12N\n\tresponses\x18\x01 \x03(\x0b\x32\x36.google.ads.googleads.v25.services.ConversationOrErrorB\x03\xe0\x41\x02\"r\n\x0c\x43onversation\x12O\n\x13local_services_lead\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*googleads.googleapis.com/LocalServicesLead\x12\x11\n\x04text\x18\x02 \x01(\tB\x03\xe0\x41\x02\"\x9b\x01\n\x13\x43onversationOrError\x12*\n local_services_lead_conversation\x18\x01 \x01(\tH\x00\x12\x33\n\x15partial_failure_error\x18\x02 \x01(\x0b\x32\x12.google.rpc.StatusH\x00\x42#\n!append_lead_conversation_response\"\xbd\x01\n\x0fSurveySatisfied\x12\x86\x01\n\x17survey_satisfied_reason\x18\x01 \x01(\x0e\x32`.google.ads.googleads.v25.enums.LocalServicesLeadSurveySatisfiedReasonEnum.SurveySatisfiedReasonB\x03\xe0\x41\x02\x12!\n\x14other_reason_comment\x18\x02 \x01(\tB\x03\xe0\x41\x01\"\xc9\x01\n\x12SurveyDissatisfied\x12\x8f\x01\n\x1asurvey_dissatisfied_reason\x18\x01 \x01(\x0e\x32\x66.google.ads.googleads.v25.enums.LocalServicesLeadSurveyDissatisfiedReasonEnum.SurveyDissatisfiedReasonB\x03\xe0\x41\x02\x12!\n\x14other_reason_comment\x18\x02 \x01(\tB\x03\xe0\x41\x01\"\x8b\x03\n\x1aProvideLeadFeedbackRequest\x12I\n\rresource_name\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*googleads.googleapis.com/LocalServicesLead\x12j\n\rsurvey_answer\x18\x02 \x01(\x0e\x32N.google.ads.googleads.v25.enums.LocalServicesLeadSurveyAnswerEnum.SurveyAnswerB\x03\xe0\x41\x02\x12N\n\x10survey_satisfied\x18\x03 \x01(\x0b\x32\x32.google.ads.googleads.v25.services.SurveySatisfiedH\x00\x12T\n\x13survey_dissatisfied\x18\x04 \x01(\x0b\x32\x35.google.ads.googleads.v25.services.SurveyDissatisfiedH\x00\x42\x10\n\x0esurvey_details\"\xa9\x01\n\x1bProvideLeadFeedbackResponse\x12\x89\x01\n\x18\x63redit_issuance_decision\x18\x01 \x01(\x0e\x32\x62.google.ads.googleads.v25.enums.LocalServicesLeadCreditIssuanceDecisionEnum.CreditIssuanceDecisionB\x03\xe0\x41\x02\x32\xda\x04\n\x18LocalServicesLeadService\x12\x89\x02\n\x16\x41ppendLeadConversation\x12@.google.ads.googleads.v25.services.AppendLeadConversationRequest\x1a\x41.google.ads.googleads.v25.services.AppendLeadConversationResponse\"j\xda\x41\x19\x63ustomer_id,conversations\x82\xd3\xe4\x93\x02H\"C/v25/customers/{customer_id=*}/localServices:appendLeadConversation:\x01*\x12\xea\x01\n\x13ProvideLeadFeedback\x12=.google.ads.googleads.v25.services.ProvideLeadFeedbackRequest\x1a>.google.ads.googleads.v25.services.ProvideLeadFeedbackResponse\"T\x82\xd3\xe4\x93\x02N\"I/v25/{resource_name=customers/*/localServicesLeads/*}:provideLeadFeedback:\x01*\x1a\x45\xca\x41\x18googleads.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/adwordsB\x89\x02\n%com.google.ads.googleads.v25.servicesB\x1dLocalServicesLeadServiceProtoP\x01ZIgoogle.golang.org/genproto/googleapis/ads/googleads/v25/services;services\xa2\x02\x03GAA\xaa\x02!Google.Ads.GoogleAds.V25.Services\xca\x02!Google\\Ads\\GoogleAds\\V25\\Services\xea\x02%Google::Ads::GoogleAds::V25::Servicesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Services + AppendLeadConversationRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.AppendLeadConversationRequest").msgclass + AppendLeadConversationResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.AppendLeadConversationResponse").msgclass + Conversation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.Conversation").msgclass + ConversationOrError = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.ConversationOrError").msgclass + SurveySatisfied = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.SurveySatisfied").msgclass + SurveyDissatisfied = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.SurveyDissatisfied").msgclass + ProvideLeadFeedbackRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.ProvideLeadFeedbackRequest").msgclass + ProvideLeadFeedbackResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.ProvideLeadFeedbackResponse").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/local_services_lead_service_services_pb.rb b/lib/google/ads/google_ads/v25/services/local_services_lead_service_services_pb.rb new file mode 100644 index 000000000..155d37b58 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/local_services_lead_service_services_pb.rb @@ -0,0 +1,50 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/ads/googleads/v25/services/local_services_lead_service.proto for package 'Google.Ads.GoogleAds.V25.Services' +# Original file comments: +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +require 'grpc' +require 'google/ads/google_ads/v25/services/local_services_lead_service_pb' + +module Google + module Ads + module GoogleAds + module V25 + module Services + module LocalServicesLeadService + # This service allows management of LocalServicesLead resources. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.ads.googleads.v25.services.LocalServicesLeadService' + + # RPC to append Local Services Lead Conversation resources to Local Services + # Lead resources. + rpc :AppendLeadConversation, ::Google::Ads::GoogleAds::V25::Services::AppendLeadConversationRequest, ::Google::Ads::GoogleAds::V25::Services::AppendLeadConversationResponse + # RPC to provide feedback on Local Services Lead resources. + rpc :ProvideLeadFeedback, ::Google::Ads::GoogleAds::V25::Services::ProvideLeadFeedbackRequest, ::Google::Ads::GoogleAds::V25::Services::ProvideLeadFeedbackResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/multi_party_auth_review_service.rb b/lib/google/ads/google_ads/v25/services/multi_party_auth_review_service.rb new file mode 100644 index 000000000..aec2d2acb --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/multi_party_auth_review_service.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/ads/google_ads/version" + +require "google/ads/google_ads/v25/services/multi_party_auth_review_service/credentials" +require "google/ads/google_ads/v25/services/multi_party_auth_review_service/paths" +require "google/ads/google_ads/v25/services/multi_party_auth_review_service/client" + +module Google + module Ads + module GoogleAds + module V25 + module Services + ## + # Service to manage Multi-Party Authorization requests. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/ads/google_ads/v25/services/multi_party_auth_review_service" + # client = ::Google::Ads::GoogleAds::V25::Services::MultiPartyAuthReviewService::Client.new + # + module MultiPartyAuthReviewService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "multi_party_auth_review_service", "helpers.rb" +require "google/ads/google_ads/v25/services/multi_party_auth_review_service/helpers" if ::File.file? helper_path diff --git a/lib/google/ads/google_ads/v25/services/multi_party_auth_review_service/client.rb b/lib/google/ads/google_ads/v25/services/multi_party_auth_review_service/client.rb new file mode 100644 index 000000000..d14426f32 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/multi_party_auth_review_service/client.rb @@ -0,0 +1,495 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# require "google/ads/google_ads/error" +require "google/ads/google_ads/v25/services/multi_party_auth_review_service_pb" + +module Google + module Ads + module GoogleAds + module V25 + module Services + module MultiPartyAuthReviewService + ## + # Client for the MultiPartyAuthReviewService service. + # + # Service to manage Multi-Party Authorization requests. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "googleads.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :multi_party_auth_review_service_stub + + ## + # Configure the MultiPartyAuthReviewService Client class. + # + # See {::Google::Ads::GoogleAds::V25::Services::MultiPartyAuthReviewService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all MultiPartyAuthReviewService clients + # ::Google::Ads::GoogleAds::V25::Services::MultiPartyAuthReviewService::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + default_config = Client::Configuration.new + + default_config.timeout = 14_400.0 + default_config.retry_policy = { + initial_delay: 5.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the MultiPartyAuthReviewService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Ads::GoogleAds::V25::Services::MultiPartyAuthReviewService::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @multi_party_auth_review_service_stub.universe_domain + end + + ## + # Create a new MultiPartyAuthReviewService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Ads::GoogleAds::V25::Services::MultiPartyAuthReviewService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Ads::GoogleAds::V25::Services::MultiPartyAuthReviewService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the MultiPartyAuthReviewService client. + # @yieldparam config [Client::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/ads/google_ads/v25/services/multi_party_auth_review_service_services_pb" + + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @multi_party_auth_review_service_stub = ::Gapic::ServiceStub.new( + ::Google::Ads::GoogleAds::V25::Services::MultiPartyAuthReviewService::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool, + logger: @config.logger + ) + + @multi_party_auth_review_service_stub.stub_logger&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @multi_party_auth_review_service_stub.logger + end + + # Service calls + + ## + # Resolves the status of a Multi-Party Authorization review. + # + # List of thrown errors: + # [AccessInvitationError]() + # [AuthenticationError]() + # [AuthorizationError]() + # [CustomerUserAccessError]() + # [FieldError]() + # [HeaderError]() + # [InternalError]() + # [MultiPartyAuthReviewError]() + # [MutateError]() + # [QuotaError]() + # [RangeError]() + # [RequestError]() + # + # @overload resolve_multi_party_auth_review(request, options = nil) + # Pass arguments to `resolve_multi_party_auth_review` via a request object, either of type + # {::Google::Ads::GoogleAds::V25::Services::ResolveMultiPartyAuthReviewRequest} or an equivalent Hash. + # + # @param request [::Google::Ads::GoogleAds::V25::Services::ResolveMultiPartyAuthReviewRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload resolve_multi_party_auth_review(customer_id: nil, operations: nil) + # Pass arguments to `resolve_multi_party_auth_review` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param customer_id [::String] + # Required. The ID of the customer. + # @param operations [::Array<::Google::Ads::GoogleAds::V25::Services::ResolveMultiPartyAuthReviewOperation, ::Hash>] + # Required. The operations to perform. Currently only one operation is + # supported. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Ads::GoogleAds::V25::Services::ResolveMultiPartyAuthReviewResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Ads::GoogleAds::V25::Services::ResolveMultiPartyAuthReviewResponse] + # + # @raise [Google::Ads::GoogleAds::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/ads/google_ads/v25/services" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Ads::GoogleAds::V25::Services::MultiPartyAuthReviewService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Ads::GoogleAds::V25::Services::ResolveMultiPartyAuthReviewRequest.new + # + # # Call the resolve_multi_party_auth_review method. + # result = client.resolve_multi_party_auth_review request + # + # # The returned object is of type Google::Ads::GoogleAds::V25::Services::ResolveMultiPartyAuthReviewResponse. + # p result + # + def resolve_multi_party_auth_review request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::GoogleAds::V25::Services::ResolveMultiPartyAuthReviewRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.resolve_multi_party_auth_review.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Ads::GoogleAds::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.customer_id + header_params["customer_id"] = request.customer_id + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.resolve_multi_party_auth_review.timeout, + metadata: metadata, + retry_policy: @config.rpcs.resolve_multi_party_auth_review.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @multi_party_auth_review_service_stub.call_rpc :resolve_multi_party_auth_review, request, + options: options do |response, operation| + yield response, operation if block_given? + end + # rescue GRPC::BadStatus => grpc_error + # raise Google::Ads::GoogleAds::Error.new grpc_error.message + end + + ## + # Configuration class for the MultiPartyAuthReviewService API. + # + # This class represents the configuration for MultiPartyAuthReviewService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Ads::GoogleAds::V25::Services::MultiPartyAuthReviewService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # resolve_multi_party_auth_review to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Ads::GoogleAds::V25::Services::MultiPartyAuthReviewService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.resolve_multi_party_auth_review.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Ads::GoogleAds::V25::Services::MultiPartyAuthReviewService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.resolve_multi_party_auth_review.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Ads::GoogleAds::V25::Services::MultiPartyAuthReviewService::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "googleads.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, + ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the MultiPartyAuthReviewService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `resolve_multi_party_auth_review` + # @return [::Gapic::Config::Method] + # + attr_reader :resolve_multi_party_auth_review + + # @private + def initialize parent_rpcs = nil + resolve_multi_party_auth_review_config = parent_rpcs.resolve_multi_party_auth_review if parent_rpcs.respond_to? :resolve_multi_party_auth_review + @resolve_multi_party_auth_review = ::Gapic::Config::Method.new resolve_multi_party_auth_review_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/multi_party_auth_review_service/credentials.rb b/lib/google/ads/google_ads/v25/services/multi_party_auth_review_service/credentials.rb new file mode 100644 index 000000000..1355fb416 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/multi_party_auth_review_service/credentials.rb @@ -0,0 +1,38 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Ads + module GoogleAds + module V25 + module Services + module MultiPartyAuthReviewService + # Credentials for the MultiPartyAuthReviewService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/adwords" + ] + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/multi_party_auth_review_service/paths.rb b/lib/google/ads/google_ads/v25/services/multi_party_auth_review_service/paths.rb new file mode 100644 index 000000000..92bee4ffd --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/multi_party_auth_review_service/paths.rb @@ -0,0 +1,52 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Ads + module GoogleAds + module V25 + module Services + module MultiPartyAuthReviewService + # Path helper methods for the MultiPartyAuthReviewService API. + module Paths + ## + # Create a fully-qualified MultiPartyAuthReview resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/multiPartyAuthReviews/{customer_invitation_id}` + # + # @param customer_id [String] + # @param customer_invitation_id [String] + # + # @return [::String] + def multi_party_auth_review_path customer_id:, customer_invitation_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/multiPartyAuthReviews/#{customer_invitation_id}" + end + + extend self + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/multi_party_auth_review_service_pb.rb b/lib/google/ads/google_ads/v25/services/multi_party_auth_review_service_pb.rb new file mode 100644 index 000000000..c12c68438 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/multi_party_auth_review_service_pb.rb @@ -0,0 +1,34 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/services/multi_party_auth_review_service.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/enums/multi_party_auth_review_status_pb' +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/rpc/status_pb' + + +descriptor_data = "\nGgoogle/ads/googleads/v25/services/multi_party_auth_review_service.proto\x12!google.ads.googleads.v25.services\x1a\x43google/ads/googleads/v25/enums/multi_party_auth_review_status.proto\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x17google/rpc/status.proto\"\xa0\x01\n\"ResolveMultiPartyAuthReviewRequest\x12\x18\n\x0b\x63ustomer_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12`\n\noperations\x18\x02 \x03(\x0b\x32G.google.ads.googleads.v25.services.ResolveMultiPartyAuthReviewOperationB\x03\xe0\x41\x02\"\x8b\x01\n#ResolveMultiPartyAuthReviewResponse\x12\x64\n\x0fresult_or_error\x18\x01 \x03(\x0b\x32K.google.ads.googleads.v25.services.ResolveMultiPartyAuthReviewResultOrError\"\xf2\x01\n$ResolveMultiPartyAuthReviewOperation\x12V\n\x17multi_party_auth_review\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-googleads.googleapis.com/MultiPartyAuthReview\x12r\n\nnew_status\x18\x02 \x01(\x0e\x32Y.google.ads.googleads.v25.enums.MultiPartyAuthReviewStatusEnum.MultiPartyAuthReviewStatusB\x03\xe0\x41\x02\"\xca\x01\n(ResolveMultiPartyAuthReviewResultOrError\x12V\n\x06result\x18\x01 \x01(\x0b\x32\x44.google.ads.googleads.v25.services.ResolveMultiPartyAuthReviewResultH\x00\x12\x33\n\x15partial_failure_error\x18\x02 \x01(\x0b\x32\x12.google.rpc.StatusH\x00\x42\x11\n\x0fresult_or_error\"\xe5\x01\n!ResolveMultiPartyAuthReviewResult\x12V\n\x17multi_party_auth_review\x18\x01 \x01(\tB5\xe0\x41\x03\xfa\x41/\n-googleads.googleapis.com/MultiPartyAuthReview\x12.\n\x1f\x63ustomer_user_access_invitation\x18\x02 \x01(\tB\x03\xe0\x41\x03H\x00\x12#\n\x14\x63ustomer_user_access\x18\x03 \x01(\tB\x03\xe0\x41\x03H\x00\x42\x13\n\x11resolved_resource2\xf4\x02\n\x1bMultiPartyAuthReviewService\x12\x8d\x02\n\x1bResolveMultiPartyAuthReview\x12\x45.google.ads.googleads.v25.services.ResolveMultiPartyAuthReviewRequest\x1a\x46.google.ads.googleads.v25.services.ResolveMultiPartyAuthReviewResponse\"_\xda\x41\x16\x63ustomer_id,operations\x82\xd3\xe4\x93\x02@\";/v25/customers/{customer_id=*}/multiPartyAuthReview:resolve:\x01*\x1a\x45\xca\x41\x18googleads.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/adwordsB\x8c\x02\n%com.google.ads.googleads.v25.servicesB MultiPartyAuthReviewServiceProtoP\x01ZIgoogle.golang.org/genproto/googleapis/ads/googleads/v25/services;services\xa2\x02\x03GAA\xaa\x02!Google.Ads.GoogleAds.V25.Services\xca\x02!Google\\Ads\\GoogleAds\\V25\\Services\xea\x02%Google::Ads::GoogleAds::V25::Servicesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Services + ResolveMultiPartyAuthReviewRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.ResolveMultiPartyAuthReviewRequest").msgclass + ResolveMultiPartyAuthReviewResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.ResolveMultiPartyAuthReviewResponse").msgclass + ResolveMultiPartyAuthReviewOperation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.ResolveMultiPartyAuthReviewOperation").msgclass + ResolveMultiPartyAuthReviewResultOrError = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.ResolveMultiPartyAuthReviewResultOrError").msgclass + ResolveMultiPartyAuthReviewResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.ResolveMultiPartyAuthReviewResult").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/multi_party_auth_review_service_services_pb.rb b/lib/google/ads/google_ads/v25/services/multi_party_auth_review_service_services_pb.rb new file mode 100644 index 000000000..2eb81c804 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/multi_party_auth_review_service_services_pb.rb @@ -0,0 +1,61 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/ads/googleads/v25/services/multi_party_auth_review_service.proto for package 'Google.Ads.GoogleAds.V25.Services' +# Original file comments: +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +require 'grpc' +require 'google/ads/google_ads/v25/services/multi_party_auth_review_service_pb' + +module Google + module Ads + module GoogleAds + module V25 + module Services + module MultiPartyAuthReviewService + # Service to manage Multi-Party Authorization requests. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.ads.googleads.v25.services.MultiPartyAuthReviewService' + + # Resolves the status of a Multi-Party Authorization review. + # + # List of thrown errors: + # [AccessInvitationError]() + # [AuthenticationError]() + # [AuthorizationError]() + # [CustomerUserAccessError]() + # [FieldError]() + # [HeaderError]() + # [InternalError]() + # [MultiPartyAuthReviewError]() + # [MutateError]() + # [QuotaError]() + # [RangeError]() + # [RequestError]() + rpc :ResolveMultiPartyAuthReview, ::Google::Ads::GoogleAds::V25::Services::ResolveMultiPartyAuthReviewRequest, ::Google::Ads::GoogleAds::V25::Services::ResolveMultiPartyAuthReviewResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/offline_user_data_job_service.rb b/lib/google/ads/google_ads/v25/services/offline_user_data_job_service.rb new file mode 100644 index 000000000..9bb4104de --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/offline_user_data_job_service.rb @@ -0,0 +1,52 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/ads/google_ads/version" + +require "google/ads/google_ads/v25/services/offline_user_data_job_service/credentials" +require "google/ads/google_ads/v25/services/offline_user_data_job_service/paths" +require "google/ads/google_ads/v25/services/offline_user_data_job_service/operations" +require "google/ads/google_ads/v25/services/offline_user_data_job_service/client" + +module Google + module Ads + module GoogleAds + module V25 + module Services + ## + # Service to manage offline user data jobs. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/ads/google_ads/v25/services/offline_user_data_job_service" + # client = ::Google::Ads::GoogleAds::V25::Services::OfflineUserDataJobService::Client.new + # + module OfflineUserDataJobService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "offline_user_data_job_service", "helpers.rb" +require "google/ads/google_ads/v25/services/offline_user_data_job_service/helpers" if ::File.file? helper_path diff --git a/lib/google/ads/google_ads/v25/services/offline_user_data_job_service/client.rb b/lib/google/ads/google_ads/v25/services/offline_user_data_job_service/client.rb new file mode 100644 index 000000000..9100a92b8 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/offline_user_data_job_service/client.rb @@ -0,0 +1,747 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# require "google/ads/google_ads/error" +require "google/ads/google_ads/v25/services/offline_user_data_job_service_pb" + +module Google + module Ads + module GoogleAds + module V25 + module Services + module OfflineUserDataJobService + ## + # Client for the OfflineUserDataJobService service. + # + # Service to manage offline user data jobs. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "googleads.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :offline_user_data_job_service_stub + + ## + # Configure the OfflineUserDataJobService Client class. + # + # See {::Google::Ads::GoogleAds::V25::Services::OfflineUserDataJobService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all OfflineUserDataJobService clients + # ::Google::Ads::GoogleAds::V25::Services::OfflineUserDataJobService::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + default_config = Client::Configuration.new + + default_config.timeout = 14_400.0 + default_config.retry_policy = { + initial_delay: 5.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the OfflineUserDataJobService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Ads::GoogleAds::V25::Services::OfflineUserDataJobService::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @offline_user_data_job_service_stub.universe_domain + end + + ## + # Create a new OfflineUserDataJobService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Ads::GoogleAds::V25::Services::OfflineUserDataJobService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Ads::GoogleAds::V25::Services::OfflineUserDataJobService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the OfflineUserDataJobService client. + # @yieldparam config [Client::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/ads/google_ads/v25/services/offline_user_data_job_service_services_pb" + + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_client = Operations.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @config.endpoint + config.universe_domain = @config.universe_domain + end + + @offline_user_data_job_service_stub = ::Gapic::ServiceStub.new( + ::Google::Ads::GoogleAds::V25::Services::OfflineUserDataJobService::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool, + logger: @config.logger + ) + + @offline_user_data_job_service_stub.stub_logger&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Ads::GoogleAds::V25::Services::OfflineUserDataJobService::Operations] + # + attr_reader :operations_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @offline_user_data_job_service_stub.logger + end + + # Service calls + + ## + # Creates an offline user data job. + # + # List of thrown errors: + # [AuthenticationError]() + # [AuthorizationError]() + # [DatabaseError]() + # [FieldError]() + # [HeaderError]() + # [InternalError]() + # [NotAllowlistedError]() + # [OfflineUserDataJobError]() + # [QuotaError]() + # [RequestError]() + # + # @overload create_offline_user_data_job(request, options = nil) + # Pass arguments to `create_offline_user_data_job` via a request object, either of type + # {::Google::Ads::GoogleAds::V25::Services::CreateOfflineUserDataJobRequest} or an equivalent Hash. + # + # @param request [::Google::Ads::GoogleAds::V25::Services::CreateOfflineUserDataJobRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_offline_user_data_job(customer_id: nil, job: nil, validate_only: nil, enable_match_rate_range_preview: nil) + # Pass arguments to `create_offline_user_data_job` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param customer_id [::String] + # Required. The ID of the customer for which to create an offline user data + # job. + # @param job [::Google::Ads::GoogleAds::V25::Resources::OfflineUserDataJob, ::Hash] + # Required. The offline user data job to be created. + # @param validate_only [::Boolean] + # If true, the request is validated but not executed. Only errors are + # returned, not results. + # @param enable_match_rate_range_preview [::Boolean] + # If true, match rate range for the offline user data job is calculated and + # made available in the resource. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Ads::GoogleAds::V25::Services::CreateOfflineUserDataJobResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Ads::GoogleAds::V25::Services::CreateOfflineUserDataJobResponse] + # + # @raise [Google::Ads::GoogleAds::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/ads/google_ads/v25/services" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Ads::GoogleAds::V25::Services::OfflineUserDataJobService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Ads::GoogleAds::V25::Services::CreateOfflineUserDataJobRequest.new + # + # # Call the create_offline_user_data_job method. + # result = client.create_offline_user_data_job request + # + # # The returned object is of type Google::Ads::GoogleAds::V25::Services::CreateOfflineUserDataJobResponse. + # p result + # + def create_offline_user_data_job request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::GoogleAds::V25::Services::CreateOfflineUserDataJobRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_offline_user_data_job.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Ads::GoogleAds::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.customer_id + header_params["customer_id"] = request.customer_id + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_offline_user_data_job.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_offline_user_data_job.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @offline_user_data_job_service_stub.call_rpc :create_offline_user_data_job, request, + options: options do |response, operation| + yield response, operation if block_given? + end + # rescue GRPC::BadStatus => grpc_error + # raise Google::Ads::GoogleAds::Error.new grpc_error.message + end + + ## + # Adds operations to the offline user data job. + # + # List of thrown errors: + # [AuthenticationError]() + # [AuthorizationError]() + # [DatabaseError]() + # [FieldError]() + # [HeaderError]() + # [InternalError]() + # [MutateError]() + # [OfflineUserDataJobError]() + # [QuotaError]() + # [RequestError]() + # + # @overload add_offline_user_data_job_operations(request, options = nil) + # Pass arguments to `add_offline_user_data_job_operations` via a request object, either of type + # {::Google::Ads::GoogleAds::V25::Services::AddOfflineUserDataJobOperationsRequest} or an equivalent Hash. + # + # @param request [::Google::Ads::GoogleAds::V25::Services::AddOfflineUserDataJobOperationsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload add_offline_user_data_job_operations(resource_name: nil, enable_partial_failure: nil, enable_warnings: nil, operations: nil, validate_only: nil) + # Pass arguments to `add_offline_user_data_job_operations` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param resource_name [::String] + # Required. The resource name of the OfflineUserDataJob. + # @param enable_partial_failure [::Boolean] + # True to enable partial failure for the offline user data job. + # @param enable_warnings [::Boolean] + # True to enable warnings for the offline user data job. When enabled, a + # warning will not block the OfflineUserDataJobOperation, and will also + # return warning messages about malformed field values. + # @param operations [::Array<::Google::Ads::GoogleAds::V25::Services::OfflineUserDataJobOperation, ::Hash>] + # Required. The list of operations to be done. + # @param validate_only [::Boolean] + # If true, the request is validated but not executed. Only errors are + # returned, not results. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Ads::GoogleAds::V25::Services::AddOfflineUserDataJobOperationsResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Ads::GoogleAds::V25::Services::AddOfflineUserDataJobOperationsResponse] + # + # @raise [Google::Ads::GoogleAds::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/ads/google_ads/v25/services" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Ads::GoogleAds::V25::Services::OfflineUserDataJobService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Ads::GoogleAds::V25::Services::AddOfflineUserDataJobOperationsRequest.new + # + # # Call the add_offline_user_data_job_operations method. + # result = client.add_offline_user_data_job_operations request + # + # # The returned object is of type Google::Ads::GoogleAds::V25::Services::AddOfflineUserDataJobOperationsResponse. + # p result + # + def add_offline_user_data_job_operations request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::GoogleAds::V25::Services::AddOfflineUserDataJobOperationsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.add_offline_user_data_job_operations.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Ads::GoogleAds::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.resource_name + header_params["resource_name"] = request.resource_name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.add_offline_user_data_job_operations.timeout, + metadata: metadata, + retry_policy: @config.rpcs.add_offline_user_data_job_operations.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @offline_user_data_job_service_stub.call_rpc :add_offline_user_data_job_operations, request, + options: options do |response, operation| + yield response, operation if block_given? + end + # rescue GRPC::BadStatus => grpc_error + # raise Google::Ads::GoogleAds::Error.new grpc_error.message + end + + ## + # Runs the offline user data job. + # + # When finished, the long running operation will contain the processing + # result or failure information, if any. + # + # List of thrown errors: + # [AuthenticationError]() + # [AuthorizationError]() + # [DatabaseError]() + # [HeaderError]() + # [InternalError]() + # [OfflineUserDataJobError]() + # [QuotaError]() + # [RequestError]() + # + # @overload run_offline_user_data_job(request, options = nil) + # Pass arguments to `run_offline_user_data_job` via a request object, either of type + # {::Google::Ads::GoogleAds::V25::Services::RunOfflineUserDataJobRequest} or an equivalent Hash. + # + # @param request [::Google::Ads::GoogleAds::V25::Services::RunOfflineUserDataJobRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload run_offline_user_data_job(resource_name: nil, validate_only: nil) + # Pass arguments to `run_offline_user_data_job` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param resource_name [::String] + # Required. The resource name of the OfflineUserDataJob to run. + # @param validate_only [::Boolean] + # If true, the request is validated but not executed. Only errors are + # returned, not results. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [Google::Ads::GoogleAds::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/ads/google_ads/v25/services" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Ads::GoogleAds::V25::Services::OfflineUserDataJobService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Ads::GoogleAds::V25::Services::RunOfflineUserDataJobRequest.new + # + # # Call the run_offline_user_data_job method. + # result = client.run_offline_user_data_job request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def run_offline_user_data_job request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::GoogleAds::V25::Services::RunOfflineUserDataJobRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.run_offline_user_data_job.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Ads::GoogleAds::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.resource_name + header_params["resource_name"] = request.resource_name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.run_offline_user_data_job.timeout, + metadata: metadata, + retry_policy: @config.rpcs.run_offline_user_data_job.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @offline_user_data_job_service_stub.call_rpc :run_offline_user_data_job, request, + options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + # rescue GRPC::BadStatus => grpc_error + # raise Google::Ads::GoogleAds::Error.new grpc_error.message + end + + ## + # Configuration class for the OfflineUserDataJobService API. + # + # This class represents the configuration for OfflineUserDataJobService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Ads::GoogleAds::V25::Services::OfflineUserDataJobService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # create_offline_user_data_job to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Ads::GoogleAds::V25::Services::OfflineUserDataJobService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.create_offline_user_data_job.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Ads::GoogleAds::V25::Services::OfflineUserDataJobService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.create_offline_user_data_job.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Ads::GoogleAds::V25::Services::OfflineUserDataJobService::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "googleads.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, + ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the OfflineUserDataJobService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `create_offline_user_data_job` + # @return [::Gapic::Config::Method] + # + attr_reader :create_offline_user_data_job + ## + # RPC-specific configuration for `add_offline_user_data_job_operations` + # @return [::Gapic::Config::Method] + # + attr_reader :add_offline_user_data_job_operations + ## + # RPC-specific configuration for `run_offline_user_data_job` + # @return [::Gapic::Config::Method] + # + attr_reader :run_offline_user_data_job + + # @private + def initialize parent_rpcs = nil + create_offline_user_data_job_config = parent_rpcs.create_offline_user_data_job if parent_rpcs.respond_to? :create_offline_user_data_job + @create_offline_user_data_job = ::Gapic::Config::Method.new create_offline_user_data_job_config + add_offline_user_data_job_operations_config = parent_rpcs.add_offline_user_data_job_operations if parent_rpcs.respond_to? :add_offline_user_data_job_operations + @add_offline_user_data_job_operations = ::Gapic::Config::Method.new add_offline_user_data_job_operations_config + run_offline_user_data_job_config = parent_rpcs.run_offline_user_data_job if parent_rpcs.respond_to? :run_offline_user_data_job + @run_offline_user_data_job = ::Gapic::Config::Method.new run_offline_user_data_job_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/offline_user_data_job_service/credentials.rb b/lib/google/ads/google_ads/v25/services/offline_user_data_job_service/credentials.rb new file mode 100644 index 000000000..036e66967 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/offline_user_data_job_service/credentials.rb @@ -0,0 +1,38 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Ads + module GoogleAds + module V25 + module Services + module OfflineUserDataJobService + # Credentials for the OfflineUserDataJobService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/adwords" + ] + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/offline_user_data_job_service/operations.rb b/lib/google/ads/google_ads/v25/services/offline_user_data_job_service/operations.rb new file mode 100644 index 000000000..c68840b91 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/offline_user_data_job_service/operations.rb @@ -0,0 +1,855 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/operation" +require "google/longrunning/operations_pb" + +module Google + module Ads + module GoogleAds + module V25 + module Services + module OfflineUserDataJobService + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "googleads.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the OfflineUserDataJobService Operations API. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def self.configure + @configure ||= Operations::Configuration.new + yield @configure if block_given? + @configure + end + + ## + # Configure the OfflineUserDataJobService Operations instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Operations.configure}. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @operations_stub.universe_domain + end + + ## + # Create a new Operations client object. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Operations::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/longrunning/operations_services_pb" + + # Create the configuration object + @config = Configuration.new Operations.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + credentials ||= Credentials.default scope: @config.scope + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @operations_stub = ::Gapic::ServiceStub.new( + ::Google::Longrunning::Operations::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool + ) + + # Used by an LRO wrapper for some methods of this service + @operations_client = self + end + + # Service calls + + ## + # Lists operations that match the specified filter in the request. If the + # server doesn't support this method, it returns `UNIMPLEMENTED`. + # + # @overload list_operations(request, options = nil) + # Pass arguments to `list_operations` via a request object, either of type + # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::ListOperationsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_operations(name: nil, filter: nil, page_size: nil, page_token: nil, return_partial_success: nil) + # Pass arguments to `list_operations` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation's parent resource. + # @param filter [::String] + # The standard list filter. + # @param page_size [::Integer] + # The standard list page size. + # @param page_token [::String] + # The standard list page token. + # @param return_partial_success [::Boolean] + # When set to `true`, operations that are reachable are returned as normal, + # and those that are unreachable are returned in the + # [ListOperationsResponse.unreachable] field. + # + # This can only be `true` when reading across collections e.g. when `parent` + # is set to `"projects/example/locations/-"`. + # + # This field is not by default supported and will result in an + # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in + # service or product specific documentation. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Gapic::Operation>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Gapic::Operation>] + # + # @raise [Google::Ads::GoogleAds::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::ListOperationsRequest.new + # + # # Call the list_operations method. + # result = client.list_operations request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Longrunning::Operation. + # p item + # end + # + def list_operations request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_operations.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Ads::GoogleAds::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_operations.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_operations.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :list_operations, request, options: options do |response, operation| + wrap_lro_operation = ->(op_response) { ::Gapic::Operation.new op_response, @operations_client } + response = ::Gapic::PagedEnumerable.new @operations_stub, :list_operations, request, response, + operation, options, format_resource: wrap_lro_operation + yield response, operation if block_given? + throw :response, response + end + # rescue GRPC::BadStatus => grpc_error + # raise Google::Ads::GoogleAds::Error.new grpc_error.message + end + + ## + # 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. + # + # @overload get_operation(request, options = nil) + # Pass arguments to `get_operation` via a request object, either of type + # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::GetOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_operation(name: nil) + # Pass arguments to `get_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [Google::Ads::GoogleAds::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::GetOperationRequest.new + # + # # Call the get_operation method. + # result = client.get_operation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def get_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Ads::GoogleAds::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :get_operation, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + # rescue GRPC::BadStatus => grpc_error + # raise Google::Ads::GoogleAds::Error.new grpc_error.message + end + + ## + # 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`. + # + # @overload delete_operation(request, options = nil) + # Pass arguments to `delete_operation` via a request object, either of type + # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::DeleteOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_operation(name: nil) + # Pass arguments to `delete_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to be deleted. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [Google::Ads::GoogleAds::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::DeleteOperationRequest.new + # + # # Call the delete_operation method. + # result = client.delete_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Ads::GoogleAds::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :delete_operation, request, options: options do |response, operation| + yield response, operation if block_given? + end + # rescue GRPC::BadStatus => grpc_error + # raise Google::Ads::GoogleAds::Error.new grpc_error.message + end + + ## + # 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 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 {::Google::Longrunning::Operation#error Operation.error} value with a + # {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to + # `Code.CANCELLED`. + # + # @overload cancel_operation(request, options = nil) + # Pass arguments to `cancel_operation` via a request object, either of type + # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::CancelOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload cancel_operation(name: nil) + # Pass arguments to `cancel_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to be cancelled. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [Google::Ads::GoogleAds::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::CancelOperationRequest.new + # + # # Call the cancel_operation method. + # result = client.cancel_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def cancel_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.cancel_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Ads::GoogleAds::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.cancel_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :cancel_operation, request, options: options do |response, operation| + yield response, operation if block_given? + end + # rescue GRPC::BadStatus => grpc_error + # raise Google::Ads::GoogleAds::Error.new grpc_error.message + end + + ## + # Waits until the specified long-running operation 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. + # + # @overload wait_operation(request, options = nil) + # Pass arguments to `wait_operation` via a request object, either of type + # {::Google::Longrunning::WaitOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::WaitOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload wait_operation(name: nil, timeout: nil) + # Pass arguments to `wait_operation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of the operation resource to wait on. + # @param timeout [::Google::Protobuf::Duration, ::Hash] + # 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. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [Google::Ads::GoogleAds::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::WaitOperationRequest.new + # + # # Call the wait_operation method. + # result = client.wait_operation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def wait_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::WaitOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.wait_operation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Ads::GoogleAds::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.wait_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :wait_operation, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + # rescue GRPC::BadStatus => grpc_error + # raise Google::Ads::GoogleAds::Error.new grpc_error.message + end + + ## + # Configuration class for the Operations API. + # + # This class represents the configuration for Operations, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Longrunning::Operations::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_operations to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Longrunning::Operations::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Longrunning::Operations::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Longrunning::Operations::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "googleads.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, + ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the Operations API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_operations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_operations + ## + # RPC-specific configuration for `get_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :get_operation + ## + # RPC-specific configuration for `delete_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_operation + ## + # RPC-specific configuration for `cancel_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :cancel_operation + ## + # RPC-specific configuration for `wait_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :wait_operation + + # @private + def initialize parent_rpcs = nil + list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations + @list_operations = ::Gapic::Config::Method.new list_operations_config + get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation + @get_operation = ::Gapic::Config::Method.new get_operation_config + delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation + @delete_operation = ::Gapic::Config::Method.new delete_operation_config + cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation + @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config + wait_operation_config = parent_rpcs.wait_operation if parent_rpcs.respond_to? :wait_operation + @wait_operation = ::Gapic::Config::Method.new wait_operation_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/offline_user_data_job_service/paths.rb b/lib/google/ads/google_ads/v25/services/offline_user_data_job_service/paths.rb new file mode 100644 index 000000000..eb2080823 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/offline_user_data_job_service/paths.rb @@ -0,0 +1,52 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Ads + module GoogleAds + module V25 + module Services + module OfflineUserDataJobService + # Path helper methods for the OfflineUserDataJobService API. + module Paths + ## + # Create a fully-qualified OfflineUserDataJob resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/offlineUserDataJobs/{offline_user_data_update_id}` + # + # @param customer_id [String] + # @param offline_user_data_update_id [String] + # + # @return [::String] + def offline_user_data_job_path customer_id:, offline_user_data_update_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/offlineUserDataJobs/#{offline_user_data_update_id}" + end + + extend self + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/offline_user_data_job_service_pb.rb b/lib/google/ads/google_ads/v25/services/offline_user_data_job_service_pb.rb new file mode 100644 index 000000000..39d13aba0 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/offline_user_data_job_service_pb.rb @@ -0,0 +1,38 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/services/offline_user_data_job_service.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/common/offline_user_data_pb' +require 'google/ads/google_ads/v25/resources/offline_user_data_job_pb' +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/longrunning/operations_pb' +require 'google/protobuf/empty_pb' +require 'google/rpc/status_pb' + + +descriptor_data = "\nEgoogle/ads/googleads/v25/services/offline_user_data_job_service.proto\x12!google.ads.googleads.v25.services\x1a\x37google/ads/googleads/v25/common/offline_user_data.proto\x1a>google/ads/googleads/v25/resources/offline_user_data_job.proto\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a\x17google/rpc/status.proto\"\xc5\x01\n\x1f\x43reateOfflineUserDataJobRequest\x12\x18\n\x0b\x63ustomer_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12H\n\x03job\x18\x02 \x01(\x0b\x32\x36.google.ads.googleads.v25.resources.OfflineUserDataJobB\x03\xe0\x41\x02\x12\x15\n\rvalidate_only\x18\x03 \x01(\x08\x12\'\n\x1f\x65nable_match_rate_range_preview\x18\x05 \x01(\x08\"k\n CreateOfflineUserDataJobResponse\x12G\n\rresource_name\x18\x01 \x01(\tB0\xfa\x41-\n+googleads.googleapis.com/OfflineUserDataJob\"\x81\x01\n\x1cRunOfflineUserDataJobRequest\x12J\n\rresource_name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+googleads.googleapis.com/OfflineUserDataJob\x12\x15\n\rvalidate_only\x18\x02 \x01(\x08\"\xd6\x02\n&AddOfflineUserDataJobOperationsRequest\x12J\n\rresource_name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+googleads.googleapis.com/OfflineUserDataJob\x12#\n\x16\x65nable_partial_failure\x18\x04 \x01(\x08H\x00\x88\x01\x01\x12\x1c\n\x0f\x65nable_warnings\x18\x06 \x01(\x08H\x01\x88\x01\x01\x12W\n\noperations\x18\x03 \x03(\x0b\x32>.google.ads.googleads.v25.services.OfflineUserDataJobOperationB\x03\xe0\x41\x02\x12\x15\n\rvalidate_only\x18\x05 \x01(\x08\x42\x19\n\x17_enable_partial_failureB\x12\n\x10_enable_warnings\"\xba\x01\n\x1bOfflineUserDataJobOperation\x12;\n\x06\x63reate\x18\x01 \x01(\x0b\x32).google.ads.googleads.v25.common.UserDataH\x00\x12;\n\x06remove\x18\x02 \x01(\x0b\x32).google.ads.googleads.v25.common.UserDataH\x00\x12\x14\n\nremove_all\x18\x03 \x01(\x08H\x00\x42\x0b\n\toperation\"\x81\x01\n\'AddOfflineUserDataJobOperationsResponse\x12\x31\n\x15partial_failure_error\x18\x01 \x01(\x0b\x32\x12.google.rpc.Status\x12#\n\x07warning\x18\x02 \x01(\x0b\x32\x12.google.rpc.Status2\xb2\x07\n\x19OfflineUserDataJobService\x12\xfb\x01\n\x18\x43reateOfflineUserDataJob\x12\x42.google.ads.googleads.v25.services.CreateOfflineUserDataJobRequest\x1a\x43.google.ads.googleads.v25.services.CreateOfflineUserDataJobResponse\"V\xda\x41\x0f\x63ustomer_id,job\x82\xd3\xe4\x93\x02>\"9/v25/customers/{customer_id=*}/offlineUserDataJobs:create:\x01*\x12\xa4\x02\n\x1f\x41\x64\x64OfflineUserDataJobOperations\x12I.google.ads.googleads.v25.services.AddOfflineUserDataJobOperationsRequest\x1aJ.google.ads.googleads.v25.services.AddOfflineUserDataJobOperationsResponse\"j\xda\x41\x18resource_name,operations\x82\xd3\xe4\x93\x02I\"D/v25/{resource_name=customers/*/offlineUserDataJobs/*}:addOperations:\x01*\x12\xa8\x02\n\x15RunOfflineUserDataJob\x12?.google.ads.googleads.v25.services.RunOfflineUserDataJobRequest\x1a\x1d.google.longrunning.Operation\"\xae\x01\xca\x41V\n\x15google.protobuf.Empty\x12=google.ads.googleads.v25.resources.OfflineUserDataJobMetadata\xda\x41\rresource_name\x82\xd3\xe4\x93\x02?\":/v25/{resource_name=customers/*/offlineUserDataJobs/*}:run:\x01*\x1a\x45\xca\x41\x18googleads.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/adwordsB\x8a\x02\n%com.google.ads.googleads.v25.servicesB\x1eOfflineUserDataJobServiceProtoP\x01ZIgoogle.golang.org/genproto/googleapis/ads/googleads/v25/services;services\xa2\x02\x03GAA\xaa\x02!Google.Ads.GoogleAds.V25.Services\xca\x02!Google\\Ads\\GoogleAds\\V25\\Services\xea\x02%Google::Ads::GoogleAds::V25::Servicesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Services + CreateOfflineUserDataJobRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.CreateOfflineUserDataJobRequest").msgclass + CreateOfflineUserDataJobResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.CreateOfflineUserDataJobResponse").msgclass + RunOfflineUserDataJobRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.RunOfflineUserDataJobRequest").msgclass + AddOfflineUserDataJobOperationsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.AddOfflineUserDataJobOperationsRequest").msgclass + OfflineUserDataJobOperation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.OfflineUserDataJobOperation").msgclass + AddOfflineUserDataJobOperationsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.AddOfflineUserDataJobOperationsResponse").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/offline_user_data_job_service_services_pb.rb b/lib/google/ads/google_ads/v25/services/offline_user_data_job_service_services_pb.rb new file mode 100644 index 000000000..1304e38fd --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/offline_user_data_job_service_services_pb.rb @@ -0,0 +1,90 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/ads/googleads/v25/services/offline_user_data_job_service.proto for package 'Google.Ads.GoogleAds.V25.Services' +# Original file comments: +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +require 'grpc' +require 'google/ads/google_ads/v25/services/offline_user_data_job_service_pb' + +module Google + module Ads + module GoogleAds + module V25 + module Services + module OfflineUserDataJobService + # Proto file describing the OfflineUserDataJobService. + # + # Service to manage offline user data jobs. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.ads.googleads.v25.services.OfflineUserDataJobService' + + # Creates an offline user data job. + # + # List of thrown errors: + # [AuthenticationError]() + # [AuthorizationError]() + # [DatabaseError]() + # [FieldError]() + # [HeaderError]() + # [InternalError]() + # [NotAllowlistedError]() + # [OfflineUserDataJobError]() + # [QuotaError]() + # [RequestError]() + rpc :CreateOfflineUserDataJob, ::Google::Ads::GoogleAds::V25::Services::CreateOfflineUserDataJobRequest, ::Google::Ads::GoogleAds::V25::Services::CreateOfflineUserDataJobResponse + # Adds operations to the offline user data job. + # + # List of thrown errors: + # [AuthenticationError]() + # [AuthorizationError]() + # [DatabaseError]() + # [FieldError]() + # [HeaderError]() + # [InternalError]() + # [MutateError]() + # [OfflineUserDataJobError]() + # [QuotaError]() + # [RequestError]() + rpc :AddOfflineUserDataJobOperations, ::Google::Ads::GoogleAds::V25::Services::AddOfflineUserDataJobOperationsRequest, ::Google::Ads::GoogleAds::V25::Services::AddOfflineUserDataJobOperationsResponse + # Runs the offline user data job. + # + # When finished, the long running operation will contain the processing + # result or failure information, if any. + # + # List of thrown errors: + # [AuthenticationError]() + # [AuthorizationError]() + # [DatabaseError]() + # [HeaderError]() + # [InternalError]() + # [OfflineUserDataJobError]() + # [QuotaError]() + # [RequestError]() + rpc :RunOfflineUserDataJob, ::Google::Ads::GoogleAds::V25::Services::RunOfflineUserDataJobRequest, ::Google::Longrunning::Operation + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/payments_account_service.rb b/lib/google/ads/google_ads/v25/services/payments_account_service.rb new file mode 100644 index 000000000..665298aaf --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/payments_account_service.rb @@ -0,0 +1,52 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/ads/google_ads/version" + +require "google/ads/google_ads/v25/services/payments_account_service/credentials" +require "google/ads/google_ads/v25/services/payments_account_service/paths" +require "google/ads/google_ads/v25/services/payments_account_service/client" + +module Google + module Ads + module GoogleAds + module V25 + module Services + ## + # Service to provide payments accounts that can be used to set up consolidated + # billing. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/ads/google_ads/v25/services/payments_account_service" + # client = ::Google::Ads::GoogleAds::V25::Services::PaymentsAccountService::Client.new + # + module PaymentsAccountService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "payments_account_service", "helpers.rb" +require "google/ads/google_ads/v25/services/payments_account_service/helpers" if ::File.file? helper_path diff --git a/lib/google/ads/google_ads/v25/services/payments_account_service/client.rb b/lib/google/ads/google_ads/v25/services/payments_account_service/client.rb new file mode 100644 index 000000000..801b991c6 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/payments_account_service/client.rb @@ -0,0 +1,491 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# require "google/ads/google_ads/error" +require "google/ads/google_ads/v25/services/payments_account_service_pb" + +module Google + module Ads + module GoogleAds + module V25 + module Services + module PaymentsAccountService + ## + # Client for the PaymentsAccountService service. + # + # Service to provide payments accounts that can be used to set up consolidated + # billing. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "googleads.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :payments_account_service_stub + + ## + # Configure the PaymentsAccountService Client class. + # + # See {::Google::Ads::GoogleAds::V25::Services::PaymentsAccountService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all PaymentsAccountService clients + # ::Google::Ads::GoogleAds::V25::Services::PaymentsAccountService::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + default_config = Client::Configuration.new + + default_config.timeout = 14_400.0 + default_config.retry_policy = { + initial_delay: 5.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the PaymentsAccountService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Ads::GoogleAds::V25::Services::PaymentsAccountService::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @payments_account_service_stub.universe_domain + end + + ## + # Create a new PaymentsAccountService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Ads::GoogleAds::V25::Services::PaymentsAccountService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Ads::GoogleAds::V25::Services::PaymentsAccountService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the PaymentsAccountService client. + # @yieldparam config [Client::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/ads/google_ads/v25/services/payments_account_service_services_pb" + + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @payments_account_service_stub = ::Gapic::ServiceStub.new( + ::Google::Ads::GoogleAds::V25::Services::PaymentsAccountService::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool, + logger: @config.logger + ) + + @payments_account_service_stub.stub_logger&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @payments_account_service_stub.logger + end + + # Service calls + + ## + # Returns all payments accounts associated with all managers + # between the login customer ID and specified serving customer in the + # hierarchy, inclusive. + # + # List of thrown errors: + # [AuthenticationError]() + # [AuthorizationError]() + # [HeaderError]() + # [InternalError]() + # [PaymentsAccountError]() + # [QuotaError]() + # [RequestError]() + # + # @overload list_payments_accounts(request, options = nil) + # Pass arguments to `list_payments_accounts` via a request object, either of type + # {::Google::Ads::GoogleAds::V25::Services::ListPaymentsAccountsRequest} or an equivalent Hash. + # + # @param request [::Google::Ads::GoogleAds::V25::Services::ListPaymentsAccountsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_payments_accounts(customer_id: nil) + # Pass arguments to `list_payments_accounts` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param customer_id [::String] + # Required. The ID of the customer to apply the PaymentsAccount list + # operation to. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Ads::GoogleAds::V25::Services::ListPaymentsAccountsResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Ads::GoogleAds::V25::Services::ListPaymentsAccountsResponse] + # + # @raise [Google::Ads::GoogleAds::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/ads/google_ads/v25/services" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Ads::GoogleAds::V25::Services::PaymentsAccountService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Ads::GoogleAds::V25::Services::ListPaymentsAccountsRequest.new + # + # # Call the list_payments_accounts method. + # result = client.list_payments_accounts request + # + # # The returned object is of type Google::Ads::GoogleAds::V25::Services::ListPaymentsAccountsResponse. + # p result + # + def list_payments_accounts request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::GoogleAds::V25::Services::ListPaymentsAccountsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_payments_accounts.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Ads::GoogleAds::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.customer_id + header_params["customer_id"] = request.customer_id + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_payments_accounts.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_payments_accounts.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @payments_account_service_stub.call_rpc :list_payments_accounts, request, + options: options do |response, operation| + yield response, operation if block_given? + end + # rescue GRPC::BadStatus => grpc_error + # raise Google::Ads::GoogleAds::Error.new grpc_error.message + end + + ## + # Configuration class for the PaymentsAccountService API. + # + # This class represents the configuration for PaymentsAccountService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Ads::GoogleAds::V25::Services::PaymentsAccountService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_payments_accounts to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Ads::GoogleAds::V25::Services::PaymentsAccountService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_payments_accounts.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Ads::GoogleAds::V25::Services::PaymentsAccountService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_payments_accounts.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Ads::GoogleAds::V25::Services::PaymentsAccountService::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "googleads.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, + ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the PaymentsAccountService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_payments_accounts` + # @return [::Gapic::Config::Method] + # + attr_reader :list_payments_accounts + + # @private + def initialize parent_rpcs = nil + list_payments_accounts_config = parent_rpcs.list_payments_accounts if parent_rpcs.respond_to? :list_payments_accounts + @list_payments_accounts = ::Gapic::Config::Method.new list_payments_accounts_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/payments_account_service/credentials.rb b/lib/google/ads/google_ads/v25/services/payments_account_service/credentials.rb new file mode 100644 index 000000000..495aff0a9 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/payments_account_service/credentials.rb @@ -0,0 +1,38 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Ads + module GoogleAds + module V25 + module Services + module PaymentsAccountService + # Credentials for the PaymentsAccountService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/adwords" + ] + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/payments_account_service/paths.rb b/lib/google/ads/google_ads/v25/services/payments_account_service/paths.rb new file mode 100644 index 000000000..a343bd85d --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/payments_account_service/paths.rb @@ -0,0 +1,66 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Ads + module GoogleAds + module V25 + module Services + module PaymentsAccountService + # Path helper methods for the PaymentsAccountService API. + module Paths + ## + # Create a fully-qualified Customer resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}` + # + # @param customer_id [String] + # + # @return [::String] + def customer_path customer_id: + "customers/#{customer_id}" + end + + ## + # Create a fully-qualified PaymentsAccount resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/paymentsAccounts/{payments_account_id}` + # + # @param customer_id [String] + # @param payments_account_id [String] + # + # @return [::String] + def payments_account_path customer_id:, payments_account_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/paymentsAccounts/#{payments_account_id}" + end + + extend self + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/payments_account_service_pb.rb b/lib/google/ads/google_ads/v25/services/payments_account_service_pb.rb new file mode 100644 index 000000000..98dd7e963 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/payments_account_service_pb.rb @@ -0,0 +1,29 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/services/payments_account_service.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/resources/payments_account_pb' +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' + + +descriptor_data = "\n@google/ads/googleads/v25/services/payments_account_service.proto\x12!google.ads.googleads.v25.services\x1a\x39google/ads/googleads/v25/resources/payments_account.proto\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\"7\n\x1bListPaymentsAccountsRequest\x12\x18\n\x0b\x63ustomer_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\"n\n\x1cListPaymentsAccountsResponse\x12N\n\x11payments_accounts\x18\x01 \x03(\x0b\x32\x33.google.ads.googleads.v25.resources.PaymentsAccount2\xc0\x02\n\x16PaymentsAccountService\x12\xde\x01\n\x14ListPaymentsAccounts\x12>.google.ads.googleads.v25.services.ListPaymentsAccountsRequest\x1a?.google.ads.googleads.v25.services.ListPaymentsAccountsResponse\"E\xda\x41\x0b\x63ustomer_id\x82\xd3\xe4\x93\x02\x31\x12//v25/customers/{customer_id=*}/paymentsAccounts\x1a\x45\xca\x41\x18googleads.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/adwordsB\x87\x02\n%com.google.ads.googleads.v25.servicesB\x1bPaymentsAccountServiceProtoP\x01ZIgoogle.golang.org/genproto/googleapis/ads/googleads/v25/services;services\xa2\x02\x03GAA\xaa\x02!Google.Ads.GoogleAds.V25.Services\xca\x02!Google\\Ads\\GoogleAds\\V25\\Services\xea\x02%Google::Ads::GoogleAds::V25::Servicesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Services + ListPaymentsAccountsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.ListPaymentsAccountsRequest").msgclass + ListPaymentsAccountsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.ListPaymentsAccountsResponse").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/payments_account_service_services_pb.rb b/lib/google/ads/google_ads/v25/services/payments_account_service_services_pb.rb new file mode 100644 index 000000000..9a06a48ef --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/payments_account_service_services_pb.rb @@ -0,0 +1,61 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/ads/googleads/v25/services/payments_account_service.proto for package 'Google.Ads.GoogleAds.V25.Services' +# Original file comments: +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +require 'grpc' +require 'google/ads/google_ads/v25/services/payments_account_service_pb' + +module Google + module Ads + module GoogleAds + module V25 + module Services + module PaymentsAccountService + # Proto file describing the payments account service. + # + # Service to provide payments accounts that can be used to set up consolidated + # billing. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.ads.googleads.v25.services.PaymentsAccountService' + + # Returns all payments accounts associated with all managers + # between the login customer ID and specified serving customer in the + # hierarchy, inclusive. + # + # List of thrown errors: + # [AuthenticationError]() + # [AuthorizationError]() + # [HeaderError]() + # [InternalError]() + # [PaymentsAccountError]() + # [QuotaError]() + # [RequestError]() + rpc :ListPaymentsAccounts, ::Google::Ads::GoogleAds::V25::Services::ListPaymentsAccountsRequest, ::Google::Ads::GoogleAds::V25::Services::ListPaymentsAccountsResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/product_link_invitation_service.rb b/lib/google/ads/google_ads/v25/services/product_link_invitation_service.rb new file mode 100644 index 000000000..79fa41546 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/product_link_invitation_service.rb @@ -0,0 +1,52 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/ads/google_ads/version" + +require "google/ads/google_ads/v25/services/product_link_invitation_service/credentials" +require "google/ads/google_ads/v25/services/product_link_invitation_service/paths" +require "google/ads/google_ads/v25/services/product_link_invitation_service/client" + +module Google + module Ads + module GoogleAds + module V25 + module Services + ## + # This service allows management of product link invitations from Google Ads + # accounts to other accounts. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/ads/google_ads/v25/services/product_link_invitation_service" + # client = ::Google::Ads::GoogleAds::V25::Services::ProductLinkInvitationService::Client.new + # + module ProductLinkInvitationService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "product_link_invitation_service", "helpers.rb" +require "google/ads/google_ads/v25/services/product_link_invitation_service/helpers" if ::File.file? helper_path diff --git a/lib/google/ads/google_ads/v25/services/product_link_invitation_service/client.rb b/lib/google/ads/google_ads/v25/services/product_link_invitation_service/client.rb new file mode 100644 index 000000000..0759b8c21 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/product_link_invitation_service/client.rb @@ -0,0 +1,677 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# require "google/ads/google_ads/error" +require "google/ads/google_ads/v25/services/product_link_invitation_service_pb" + +module Google + module Ads + module GoogleAds + module V25 + module Services + module ProductLinkInvitationService + ## + # Client for the ProductLinkInvitationService service. + # + # This service allows management of product link invitations from Google Ads + # accounts to other accounts. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "googleads.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :product_link_invitation_service_stub + + ## + # Configure the ProductLinkInvitationService Client class. + # + # See {::Google::Ads::GoogleAds::V25::Services::ProductLinkInvitationService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all ProductLinkInvitationService clients + # ::Google::Ads::GoogleAds::V25::Services::ProductLinkInvitationService::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + default_config = Client::Configuration.new + + default_config.timeout = 14_400.0 + default_config.retry_policy = { + initial_delay: 5.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the ProductLinkInvitationService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Ads::GoogleAds::V25::Services::ProductLinkInvitationService::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @product_link_invitation_service_stub.universe_domain + end + + ## + # Create a new ProductLinkInvitationService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Ads::GoogleAds::V25::Services::ProductLinkInvitationService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Ads::GoogleAds::V25::Services::ProductLinkInvitationService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the ProductLinkInvitationService client. + # @yieldparam config [Client::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/ads/google_ads/v25/services/product_link_invitation_service_services_pb" + + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @product_link_invitation_service_stub = ::Gapic::ServiceStub.new( + ::Google::Ads::GoogleAds::V25::Services::ProductLinkInvitationService::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool, + logger: @config.logger + ) + + @product_link_invitation_service_stub.stub_logger&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @product_link_invitation_service_stub.logger + end + + # Service calls + + ## + # Creates a product link invitation. + # + # @overload create_product_link_invitation(request, options = nil) + # Pass arguments to `create_product_link_invitation` via a request object, either of type + # {::Google::Ads::GoogleAds::V25::Services::CreateProductLinkInvitationRequest} or an equivalent Hash. + # + # @param request [::Google::Ads::GoogleAds::V25::Services::CreateProductLinkInvitationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_product_link_invitation(customer_id: nil, product_link_invitation: nil) + # Pass arguments to `create_product_link_invitation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param customer_id [::String] + # Required. The ID of the customer being modified. + # @param product_link_invitation [::Google::Ads::GoogleAds::V25::Resources::ProductLinkInvitation, ::Hash] + # Required. The product link invitation to be created. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Ads::GoogleAds::V25::Services::CreateProductLinkInvitationResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Ads::GoogleAds::V25::Services::CreateProductLinkInvitationResponse] + # + # @raise [Google::Ads::GoogleAds::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/ads/google_ads/v25/services" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Ads::GoogleAds::V25::Services::ProductLinkInvitationService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Ads::GoogleAds::V25::Services::CreateProductLinkInvitationRequest.new + # + # # Call the create_product_link_invitation method. + # result = client.create_product_link_invitation request + # + # # The returned object is of type Google::Ads::GoogleAds::V25::Services::CreateProductLinkInvitationResponse. + # p result + # + def create_product_link_invitation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::GoogleAds::V25::Services::CreateProductLinkInvitationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_product_link_invitation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Ads::GoogleAds::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.customer_id + header_params["customer_id"] = request.customer_id + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_product_link_invitation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_product_link_invitation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @product_link_invitation_service_stub.call_rpc :create_product_link_invitation, request, + options: options do |response, operation| + yield response, operation if block_given? + end + # rescue GRPC::BadStatus => grpc_error + # raise Google::Ads::GoogleAds::Error.new grpc_error.message + end + + ## + # Update a product link invitation. + # + # @overload update_product_link_invitation(request, options = nil) + # Pass arguments to `update_product_link_invitation` via a request object, either of type + # {::Google::Ads::GoogleAds::V25::Services::UpdateProductLinkInvitationRequest} or an equivalent Hash. + # + # @param request [::Google::Ads::GoogleAds::V25::Services::UpdateProductLinkInvitationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_product_link_invitation(customer_id: nil, product_link_invitation_status: nil, resource_name: nil) + # Pass arguments to `update_product_link_invitation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param customer_id [::String] + # Required. The ID of the customer being modified. + # @param product_link_invitation_status [::Google::Ads::GoogleAds::V25::Enums::ProductLinkInvitationStatusEnum::ProductLinkInvitationStatus] + # Required. The product link invitation to be created. + # @param resource_name [::String] + # Required. Resource name of the product link invitation. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Ads::GoogleAds::V25::Services::UpdateProductLinkInvitationResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Ads::GoogleAds::V25::Services::UpdateProductLinkInvitationResponse] + # + # @raise [Google::Ads::GoogleAds::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/ads/google_ads/v25/services" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Ads::GoogleAds::V25::Services::ProductLinkInvitationService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Ads::GoogleAds::V25::Services::UpdateProductLinkInvitationRequest.new + # + # # Call the update_product_link_invitation method. + # result = client.update_product_link_invitation request + # + # # The returned object is of type Google::Ads::GoogleAds::V25::Services::UpdateProductLinkInvitationResponse. + # p result + # + def update_product_link_invitation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::GoogleAds::V25::Services::UpdateProductLinkInvitationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_product_link_invitation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Ads::GoogleAds::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.customer_id + header_params["customer_id"] = request.customer_id + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_product_link_invitation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_product_link_invitation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @product_link_invitation_service_stub.call_rpc :update_product_link_invitation, request, + options: options do |response, operation| + yield response, operation if block_given? + end + # rescue GRPC::BadStatus => grpc_error + # raise Google::Ads::GoogleAds::Error.new grpc_error.message + end + + ## + # Remove a product link invitation. + # + # @overload remove_product_link_invitation(request, options = nil) + # Pass arguments to `remove_product_link_invitation` via a request object, either of type + # {::Google::Ads::GoogleAds::V25::Services::RemoveProductLinkInvitationRequest} or an equivalent Hash. + # + # @param request [::Google::Ads::GoogleAds::V25::Services::RemoveProductLinkInvitationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload remove_product_link_invitation(customer_id: nil, resource_name: nil) + # Pass arguments to `remove_product_link_invitation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param customer_id [::String] + # Required. The ID of the product link invitation being removed. + # @param resource_name [::String] + # Required. The resource name of the product link invitation being removed is + # expected, in this format: + # + # `customers/{customer_id}/productLinkInvitations/{product_link_invitation_id} + # ` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Ads::GoogleAds::V25::Services::RemoveProductLinkInvitationResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Ads::GoogleAds::V25::Services::RemoveProductLinkInvitationResponse] + # + # @raise [Google::Ads::GoogleAds::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/ads/google_ads/v25/services" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Ads::GoogleAds::V25::Services::ProductLinkInvitationService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Ads::GoogleAds::V25::Services::RemoveProductLinkInvitationRequest.new + # + # # Call the remove_product_link_invitation method. + # result = client.remove_product_link_invitation request + # + # # The returned object is of type Google::Ads::GoogleAds::V25::Services::RemoveProductLinkInvitationResponse. + # p result + # + def remove_product_link_invitation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::GoogleAds::V25::Services::RemoveProductLinkInvitationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.remove_product_link_invitation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Ads::GoogleAds::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.customer_id + header_params["customer_id"] = request.customer_id + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.remove_product_link_invitation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.remove_product_link_invitation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @product_link_invitation_service_stub.call_rpc :remove_product_link_invitation, request, + options: options do |response, operation| + yield response, operation if block_given? + end + # rescue GRPC::BadStatus => grpc_error + # raise Google::Ads::GoogleAds::Error.new grpc_error.message + end + + ## + # Configuration class for the ProductLinkInvitationService API. + # + # This class represents the configuration for ProductLinkInvitationService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Ads::GoogleAds::V25::Services::ProductLinkInvitationService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # create_product_link_invitation to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Ads::GoogleAds::V25::Services::ProductLinkInvitationService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.create_product_link_invitation.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Ads::GoogleAds::V25::Services::ProductLinkInvitationService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.create_product_link_invitation.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Ads::GoogleAds::V25::Services::ProductLinkInvitationService::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "googleads.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, + ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the ProductLinkInvitationService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `create_product_link_invitation` + # @return [::Gapic::Config::Method] + # + attr_reader :create_product_link_invitation + ## + # RPC-specific configuration for `update_product_link_invitation` + # @return [::Gapic::Config::Method] + # + attr_reader :update_product_link_invitation + ## + # RPC-specific configuration for `remove_product_link_invitation` + # @return [::Gapic::Config::Method] + # + attr_reader :remove_product_link_invitation + + # @private + def initialize parent_rpcs = nil + create_product_link_invitation_config = parent_rpcs.create_product_link_invitation if parent_rpcs.respond_to? :create_product_link_invitation + @create_product_link_invitation = ::Gapic::Config::Method.new create_product_link_invitation_config + update_product_link_invitation_config = parent_rpcs.update_product_link_invitation if parent_rpcs.respond_to? :update_product_link_invitation + @update_product_link_invitation = ::Gapic::Config::Method.new update_product_link_invitation_config + remove_product_link_invitation_config = parent_rpcs.remove_product_link_invitation if parent_rpcs.respond_to? :remove_product_link_invitation + @remove_product_link_invitation = ::Gapic::Config::Method.new remove_product_link_invitation_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/product_link_invitation_service/credentials.rb b/lib/google/ads/google_ads/v25/services/product_link_invitation_service/credentials.rb new file mode 100644 index 000000000..a2ff40561 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/product_link_invitation_service/credentials.rb @@ -0,0 +1,38 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Ads + module GoogleAds + module V25 + module Services + module ProductLinkInvitationService + # Credentials for the ProductLinkInvitationService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/adwords" + ] + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/product_link_invitation_service/paths.rb b/lib/google/ads/google_ads/v25/services/product_link_invitation_service/paths.rb new file mode 100644 index 000000000..2de7dabfc --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/product_link_invitation_service/paths.rb @@ -0,0 +1,66 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Ads + module GoogleAds + module V25 + module Services + module ProductLinkInvitationService + # Path helper methods for the ProductLinkInvitationService API. + module Paths + ## + # Create a fully-qualified Customer resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}` + # + # @param customer_id [String] + # + # @return [::String] + def customer_path customer_id: + "customers/#{customer_id}" + end + + ## + # Create a fully-qualified ProductLinkInvitation resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/productLinkInvitations/{customer_invitation_id}` + # + # @param customer_id [String] + # @param customer_invitation_id [String] + # + # @return [::String] + def product_link_invitation_path customer_id:, customer_invitation_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/productLinkInvitations/#{customer_invitation_id}" + end + + extend self + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/product_link_invitation_service_pb.rb b/lib/google/ads/google_ads/v25/services/product_link_invitation_service_pb.rb new file mode 100644 index 000000000..e687c763d --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/product_link_invitation_service_pb.rb @@ -0,0 +1,35 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/services/product_link_invitation_service.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/enums/product_link_invitation_status_pb' +require 'google/ads/google_ads/v25/resources/product_link_invitation_pb' +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' + + +descriptor_data = "\nGgoogle/ads/googleads/v25/services/product_link_invitation_service.proto\x12!google.ads.googleads.v25.services\x1a\x43google/ads/googleads/v25/enums/product_link_invitation_status.proto\x1a@google/ads/googleads/v25/resources/product_link_invitation.proto\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\x9f\x01\n\"CreateProductLinkInvitationRequest\x12\x18\n\x0b\x63ustomer_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12_\n\x17product_link_invitation\x18\x02 \x01(\x0b\x32\x39.google.ads.googleads.v25.resources.ProductLinkInvitationB\x03\xe0\x41\x02\"q\n#CreateProductLinkInvitationResponse\x12J\n\rresource_name\x18\x01 \x01(\tB3\xfa\x41\x30\n.googleads.googleapis.com/ProductLinkInvitation\"\x98\x02\n\"UpdateProductLinkInvitationRequest\x12\x18\n\x0b\x63ustomer_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x88\x01\n\x1eproduct_link_invitation_status\x18\x02 \x01(\x0e\x32[.google.ads.googleads.v25.enums.ProductLinkInvitationStatusEnum.ProductLinkInvitationStatusB\x03\xe0\x41\x02\x12M\n\rresource_name\x18\x03 \x01(\tB6\xe0\x41\x02\xfa\x41\x30\n.googleads.googleapis.com/ProductLinkInvitation\"q\n#UpdateProductLinkInvitationResponse\x12J\n\rresource_name\x18\x01 \x01(\tB3\xfa\x41\x30\n.googleads.googleapis.com/ProductLinkInvitation\"\x8d\x01\n\"RemoveProductLinkInvitationRequest\x12\x18\n\x0b\x63ustomer_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12M\n\rresource_name\x18\x02 \x01(\tB6\xe0\x41\x02\xfa\x41\x30\n.googleads.googleapis.com/ProductLinkInvitation\"q\n#RemoveProductLinkInvitationResponse\x12J\n\rresource_name\x18\x01 \x01(\tB3\xfa\x41\x30\n.googleads.googleapis.com/ProductLinkInvitation2\xcb\x07\n\x1cProductLinkInvitationService\x12\x9b\x02\n\x1b\x43reateProductLinkInvitation\x12\x45.google.ads.googleads.v25.services.CreateProductLinkInvitationRequest\x1a\x46.google.ads.googleads.v25.services.CreateProductLinkInvitationResponse\"m\xda\x41#customer_id,product_link_invitation\x82\xd3\xe4\x93\x02\x41\" grpc_error + # raise Google::Ads::GoogleAds::Error.new grpc_error.message + end + + ## + # Removes a product link. + # + # List of thrown errors: + # [AuthenticationError]() + # [AuthorizationError]() + # [FieldMaskError]() + # [HeaderError]() + # [InternalError]() + # [MutateError]() + # [QuotaError]() + # [RequestError]() + # + # @overload remove_product_link(request, options = nil) + # Pass arguments to `remove_product_link` via a request object, either of type + # {::Google::Ads::GoogleAds::V25::Services::RemoveProductLinkRequest} or an equivalent Hash. + # + # @param request [::Google::Ads::GoogleAds::V25::Services::RemoveProductLinkRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload remove_product_link(customer_id: nil, resource_name: nil, validate_only: nil) + # Pass arguments to `remove_product_link` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param customer_id [::String] + # Required. The ID of the customer being modified. + # @param resource_name [::String] + # Required. Remove operation: A resource name for the product link to remove + # is expected, in this format: + # + # `customers/{customer_id}/productLinks/{product_link_id} ` + # @param validate_only [::Boolean] + # If true, the request is validated but not executed. Only errors are + # returned, not results. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Ads::GoogleAds::V25::Services::RemoveProductLinkResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Ads::GoogleAds::V25::Services::RemoveProductLinkResponse] + # + # @raise [Google::Ads::GoogleAds::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/ads/google_ads/v25/services" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Ads::GoogleAds::V25::Services::ProductLinkService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Ads::GoogleAds::V25::Services::RemoveProductLinkRequest.new + # + # # Call the remove_product_link method. + # result = client.remove_product_link request + # + # # The returned object is of type Google::Ads::GoogleAds::V25::Services::RemoveProductLinkResponse. + # p result + # + def remove_product_link request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::GoogleAds::V25::Services::RemoveProductLinkRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.remove_product_link.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Ads::GoogleAds::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.customer_id + header_params["customer_id"] = request.customer_id + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.remove_product_link.timeout, + metadata: metadata, + retry_policy: @config.rpcs.remove_product_link.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @product_link_service_stub.call_rpc :remove_product_link, request, + options: options do |response, operation| + yield response, operation if block_given? + end + # rescue GRPC::BadStatus => grpc_error + # raise Google::Ads::GoogleAds::Error.new grpc_error.message + end + + ## + # Configuration class for the ProductLinkService API. + # + # This class represents the configuration for ProductLinkService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Ads::GoogleAds::V25::Services::ProductLinkService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # create_product_link to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Ads::GoogleAds::V25::Services::ProductLinkService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.create_product_link.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Ads::GoogleAds::V25::Services::ProductLinkService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.create_product_link.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Ads::GoogleAds::V25::Services::ProductLinkService::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "googleads.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, + ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the ProductLinkService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `create_product_link` + # @return [::Gapic::Config::Method] + # + attr_reader :create_product_link + ## + # RPC-specific configuration for `remove_product_link` + # @return [::Gapic::Config::Method] + # + attr_reader :remove_product_link + + # @private + def initialize parent_rpcs = nil + create_product_link_config = parent_rpcs.create_product_link if parent_rpcs.respond_to? :create_product_link + @create_product_link = ::Gapic::Config::Method.new create_product_link_config + remove_product_link_config = parent_rpcs.remove_product_link if parent_rpcs.respond_to? :remove_product_link + @remove_product_link = ::Gapic::Config::Method.new remove_product_link_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/product_link_service/credentials.rb b/lib/google/ads/google_ads/v25/services/product_link_service/credentials.rb new file mode 100644 index 000000000..bafe1e11c --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/product_link_service/credentials.rb @@ -0,0 +1,38 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Ads + module GoogleAds + module V25 + module Services + module ProductLinkService + # Credentials for the ProductLinkService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/adwords" + ] + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/product_link_service/paths.rb b/lib/google/ads/google_ads/v25/services/product_link_service/paths.rb new file mode 100644 index 000000000..130e2e108 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/product_link_service/paths.rb @@ -0,0 +1,66 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Ads + module GoogleAds + module V25 + module Services + module ProductLinkService + # Path helper methods for the ProductLinkService API. + module Paths + ## + # Create a fully-qualified Customer resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}` + # + # @param customer_id [String] + # + # @return [::String] + def customer_path customer_id: + "customers/#{customer_id}" + end + + ## + # Create a fully-qualified ProductLink resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/productLinks/{product_link_id}` + # + # @param customer_id [String] + # @param product_link_id [String] + # + # @return [::String] + def product_link_path customer_id:, product_link_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/productLinks/#{product_link_id}" + end + + extend self + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/product_link_service_pb.rb b/lib/google/ads/google_ads/v25/services/product_link_service_pb.rb new file mode 100644 index 000000000..0ee2d17b9 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/product_link_service_pb.rb @@ -0,0 +1,32 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/services/product_link_service.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/resources/product_link_pb' +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' + + +descriptor_data = "\n grpc_error + # raise Google::Ads::GoogleAds::Error.new grpc_error.message + end + + ## + # Returns the list of plannable locations (for example, countries). + # + # List of thrown errors: + # [AuthenticationError]() + # [AuthorizationError]() + # [HeaderError]() + # [InternalError]() + # [QuotaError]() + # [RequestError]() + # + # @overload list_plannable_locations(request, options = nil) + # Pass arguments to `list_plannable_locations` via a request object, either of type + # {::Google::Ads::GoogleAds::V25::Services::ListPlannableLocationsRequest} or an equivalent Hash. + # + # @param request [::Google::Ads::GoogleAds::V25::Services::ListPlannableLocationsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_plannable_locations(reach_application_info: nil) + # Pass arguments to `list_plannable_locations` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param reach_application_info [::Google::Ads::GoogleAds::V25::Common::AdditionalApplicationInfo, ::Hash] + # Optional. Additional information on the application issuing the request. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Ads::GoogleAds::V25::Services::ListPlannableLocationsResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Ads::GoogleAds::V25::Services::ListPlannableLocationsResponse] + # + # @raise [Google::Ads::GoogleAds::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/ads/google_ads/v25/services" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Ads::GoogleAds::V25::Services::ReachPlanService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Ads::GoogleAds::V25::Services::ListPlannableLocationsRequest.new + # + # # Call the list_plannable_locations method. + # result = client.list_plannable_locations request + # + # # The returned object is of type Google::Ads::GoogleAds::V25::Services::ListPlannableLocationsResponse. + # p result + # + def list_plannable_locations request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::GoogleAds::V25::Services::ListPlannableLocationsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_plannable_locations.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Ads::GoogleAds::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_plannable_locations.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_plannable_locations.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @reach_plan_service_stub.call_rpc :list_plannable_locations, request, + options: options do |response, operation| + yield response, operation if block_given? + end + # rescue GRPC::BadStatus => grpc_error + # raise Google::Ads::GoogleAds::Error.new grpc_error.message + end + + ## + # Returns the list of per-location plannable YouTube ad formats with allowed + # targeting. + # + # List of thrown errors: + # [AuthenticationError]() + # [AuthorizationError]() + # [HeaderError]() + # [InternalError]() + # [QuotaError]() + # [RequestError]() + # + # @overload list_plannable_products(request, options = nil) + # Pass arguments to `list_plannable_products` via a request object, either of type + # {::Google::Ads::GoogleAds::V25::Services::ListPlannableProductsRequest} or an equivalent Hash. + # + # @param request [::Google::Ads::GoogleAds::V25::Services::ListPlannableProductsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_plannable_products(plannable_location_id: nil, reach_application_info: nil) + # Pass arguments to `list_plannable_products` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param plannable_location_id [::String] + # Required. The ID of the selected location for planning. To list the + # available plannable location IDs use + # {::Google::Ads::GoogleAds::V25::Services::ReachPlanService::Client#list_plannable_locations ReachPlanService.ListPlannableLocations}. + # @param reach_application_info [::Google::Ads::GoogleAds::V25::Common::AdditionalApplicationInfo, ::Hash] + # Optional. Additional information on the application issuing the request. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Ads::GoogleAds::V25::Services::ListPlannableProductsResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Ads::GoogleAds::V25::Services::ListPlannableProductsResponse] + # + # @raise [Google::Ads::GoogleAds::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/ads/google_ads/v25/services" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Ads::GoogleAds::V25::Services::ReachPlanService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Ads::GoogleAds::V25::Services::ListPlannableProductsRequest.new + # + # # Call the list_plannable_products method. + # result = client.list_plannable_products request + # + # # The returned object is of type Google::Ads::GoogleAds::V25::Services::ListPlannableProductsResponse. + # p result + # + def list_plannable_products request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::GoogleAds::V25::Services::ListPlannableProductsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_plannable_products.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Ads::GoogleAds::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_plannable_products.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_plannable_products.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @reach_plan_service_stub.call_rpc :list_plannable_products, request, + options: options do |response, operation| + yield response, operation if block_given? + end + # rescue GRPC::BadStatus => grpc_error + # raise Google::Ads::GoogleAds::Error.new grpc_error.message + end + + ## + # Generates a reach forecast for a given targeting / product mix. + # + # List of thrown errors: + # [AuthenticationError]() + # [AuthorizationError]() + # [FieldError]() + # [HeaderError]() + # [InternalError]() + # [QuotaError]() + # [RangeError]() + # [ReachPlanError]() + # [RequestError]() + # + # @overload generate_reach_forecast(request, options = nil) + # Pass arguments to `generate_reach_forecast` via a request object, either of type + # {::Google::Ads::GoogleAds::V25::Services::GenerateReachForecastRequest} or an equivalent Hash. + # + # @param request [::Google::Ads::GoogleAds::V25::Services::GenerateReachForecastRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload generate_reach_forecast(customer_id: nil, currency_code: nil, campaign_duration: nil, cookie_frequency_cap_setting: nil, min_effective_frequency: nil, effective_frequency_limit: nil, targeting: nil, planned_products: nil, forecast_metric_options: nil, customer_reach_group: nil, reach_application_info: nil) + # Pass arguments to `generate_reach_forecast` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param customer_id [::String] + # Required. The ID of the customer. + # @param currency_code [::String] + # The currency code. + # Three-character ISO 4217 currency code. + # @param campaign_duration [::Google::Ads::GoogleAds::V25::Services::CampaignDuration, ::Hash] + # Required. Campaign duration. + # @param cookie_frequency_cap_setting [::Google::Ads::GoogleAds::V25::Services::FrequencyCap, ::Hash] + # Chosen cookie frequency cap to be applied to each planned product. + # This is equivalent to the frequency cap exposed in Google Ads when creating + # a campaign, it represents the maximum number of times an ad can be shown to + # the same user during a specified time interval. + # If not specified, a default of 0 (no cap) is applied. + # + # This field replaces the deprecated `cookie_frequency_cap` field. + # @param min_effective_frequency [::Integer] + # Chosen minimum effective frequency (the number of times a person was + # exposed to the ad) for the reported reach metrics [1-10]. + # This won't affect the targeting, but just the reporting. + # If not specified, a default of 1 is applied. + # + # This field cannot be combined with the effective_frequency_limit field. + # @param effective_frequency_limit [::Google::Ads::GoogleAds::V25::Services::EffectiveFrequencyLimit, ::Hash] + # The highest minimum effective frequency (the number of times a person was + # exposed to the ad) value [1-10] to include in + # Forecast.effective_frequency_breakdowns. + # If not specified, Forecast.effective_frequency_breakdowns will not be + # provided. + # + # The effective frequency value provided here will also be used as the + # minimum effective frequency for the reported reach metrics. + # + # This field cannot be combined with the min_effective_frequency field. + # @param targeting [::Google::Ads::GoogleAds::V25::Services::Targeting, ::Hash] + # The targeting to be applied to all products selected in the product mix. + # + # This is planned targeting: execution details might vary based on the + # advertising product, consult an implementation specialist. + # + # See specific metrics for details on how targeting affects them. + # @param planned_products [::Array<::Google::Ads::GoogleAds::V25::Services::PlannedProduct, ::Hash>] + # Required. The products to be forecast. + # The max number of allowed planned products is 15. + # @param forecast_metric_options [::Google::Ads::GoogleAds::V25::Services::ForecastMetricOptions, ::Hash] + # Controls the forecast metrics returned in the response. + # @param customer_reach_group [::String] + # The name of the customer being planned for. This is a user-defined value. + # @param reach_application_info [::Google::Ads::GoogleAds::V25::Common::AdditionalApplicationInfo, ::Hash] + # Optional. Additional information on the application issuing the request. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Ads::GoogleAds::V25::Services::GenerateReachForecastResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Ads::GoogleAds::V25::Services::GenerateReachForecastResponse] + # + # @raise [Google::Ads::GoogleAds::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/ads/google_ads/v25/services" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Ads::GoogleAds::V25::Services::ReachPlanService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Ads::GoogleAds::V25::Services::GenerateReachForecastRequest.new + # + # # Call the generate_reach_forecast method. + # result = client.generate_reach_forecast request + # + # # The returned object is of type Google::Ads::GoogleAds::V25::Services::GenerateReachForecastResponse. + # p result + # + def generate_reach_forecast request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::GoogleAds::V25::Services::GenerateReachForecastRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.generate_reach_forecast.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Ads::GoogleAds::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.customer_id + header_params["customer_id"] = request.customer_id + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.generate_reach_forecast.timeout, + metadata: metadata, + retry_policy: @config.rpcs.generate_reach_forecast.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @reach_plan_service_stub.call_rpc :generate_reach_forecast, request, + options: options do |response, operation| + yield response, operation if block_given? + end + # rescue GRPC::BadStatus => grpc_error + # raise Google::Ads::GoogleAds::Error.new grpc_error.message + end + + ## + # Returns the list of plannable user lists with their plannable status. + # User lists may not be plannable for a number of reasons, including: + # - They are less than 10 days old. + # - They have a membership lifespan that is less than 30 days + # - They have less than 10,000 or more than 700,000 users. + # + # List of thrown errors: + # [AuthenticationError]() + # [AuthorizationError]() + # [FieldError]() + # [HeaderError]() + # [InternalError]() + # [QuotaError]() + # [RangeError]() + # [ReachPlanError]() + # [RequestError]() + # + # @overload list_plannable_user_lists(request, options = nil) + # Pass arguments to `list_plannable_user_lists` via a request object, either of type + # {::Google::Ads::GoogleAds::V25::Services::ListPlannableUserListsRequest} or an equivalent Hash. + # + # @param request [::Google::Ads::GoogleAds::V25::Services::ListPlannableUserListsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_plannable_user_lists(customer_id: nil, customer_reach_group: nil, reach_application_info: nil) + # Pass arguments to `list_plannable_user_lists` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param customer_id [::String] + # Required. The ID of the customer. + # @param customer_reach_group [::String] + # The name of the customer being planned for. This is a user-defined value. + # @param reach_application_info [::Google::Ads::GoogleAds::V25::Common::AdditionalApplicationInfo, ::Hash] + # Optional. Additional information on the application issuing the request. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Ads::GoogleAds::V25::Services::ListPlannableUserListsResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Ads::GoogleAds::V25::Services::ListPlannableUserListsResponse] + # + # @raise [Google::Ads::GoogleAds::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/ads/google_ads/v25/services" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Ads::GoogleAds::V25::Services::ReachPlanService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Ads::GoogleAds::V25::Services::ListPlannableUserListsRequest.new + # + # # Call the list_plannable_user_lists method. + # result = client.list_plannable_user_lists request + # + # # The returned object is of type Google::Ads::GoogleAds::V25::Services::ListPlannableUserListsResponse. + # p result + # + def list_plannable_user_lists request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::GoogleAds::V25::Services::ListPlannableUserListsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_plannable_user_lists.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Ads::GoogleAds::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_plannable_user_lists.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_plannable_user_lists.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @reach_plan_service_stub.call_rpc :list_plannable_user_lists, request, + options: options do |response, operation| + yield response, operation if block_given? + end + # rescue GRPC::BadStatus => grpc_error + # raise Google::Ads::GoogleAds::Error.new grpc_error.message + end + + ## + # Returns the list of plannable user interests. + # A plannable user interest is one that can be targeted in a reach forecast + # using + # {::Google::Ads::GoogleAds::V25::Services::ReachPlanService::Client#generate_reach_forecast ReachPlanService.GenerateReachForecast}. + # + # List of thrown errors: + # [AuthenticationError]() + # [AuthorizationError]() + # [FieldError]() + # [HeaderError]() + # [InternalError]() + # [ListOperationError]() + # [QuotaError]() + # [RequestError]() + # [StringLengthError]() + # + # @overload list_plannable_user_interests(request, options = nil) + # Pass arguments to `list_plannable_user_interests` via a request object, either of type + # {::Google::Ads::GoogleAds::V25::Services::ListPlannableUserInterestsRequest} or an equivalent Hash. + # + # @param request [::Google::Ads::GoogleAds::V25::Services::ListPlannableUserInterestsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_plannable_user_interests(customer_id: nil, user_interest_taxonomy_types: nil, name_query: nil, path_query: nil, reach_application_info: nil) + # Pass arguments to `list_plannable_user_interests` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param customer_id [::String] + # Required. The ID of the customer. + # @param user_interest_taxonomy_types [::Array<::Google::Ads::GoogleAds::V25::Enums::UserInterestTaxonomyTypeEnum::UserInterestTaxonomyType>] + # Optional. A filter by user interest type. If set, only user interests with + # a type listed in the filter will be returned. If not set, user interests of + # all supported types will be returned. Supported user interest types are + # AFFINITY and IN_MARKET. Each type must be specified at most once. + # @param name_query [::String] + # A filter by user interest name. If set, only user interests with a name + # containing the literal string (case insensitive) in the filter will be + # returned. Maximum length is 200 characters. + # @param path_query [::String] + # A filter by user interest path. If set, only user interests with a path + # containing the literal string (case insensitive) in the filter will be + # returned. Maximum length is 200 characters. + # @param reach_application_info [::Google::Ads::GoogleAds::V25::Common::AdditionalApplicationInfo, ::Hash] + # Optional. Additional information on the application issuing the request. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Ads::GoogleAds::V25::Services::ListPlannableUserInterestsResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Ads::GoogleAds::V25::Services::ListPlannableUserInterestsResponse] + # + # @raise [Google::Ads::GoogleAds::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/ads/google_ads/v25/services" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Ads::GoogleAds::V25::Services::ReachPlanService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Ads::GoogleAds::V25::Services::ListPlannableUserInterestsRequest.new + # + # # Call the list_plannable_user_interests method. + # result = client.list_plannable_user_interests request + # + # # The returned object is of type Google::Ads::GoogleAds::V25::Services::ListPlannableUserInterestsResponse. + # p result + # + def list_plannable_user_interests request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::GoogleAds::V25::Services::ListPlannableUserInterestsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_plannable_user_interests.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Ads::GoogleAds::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_plannable_user_interests.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_plannable_user_interests.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @reach_plan_service_stub.call_rpc :list_plannable_user_interests, request, + options: options do |response, operation| + yield response, operation if block_given? + end + # rescue GRPC::BadStatus => grpc_error + # raise Google::Ads::GoogleAds::Error.new grpc_error.message + end + + ## + # Configuration class for the ReachPlanService API. + # + # This class represents the configuration for ReachPlanService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Ads::GoogleAds::V25::Services::ReachPlanService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # generate_conversion_rates to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Ads::GoogleAds::V25::Services::ReachPlanService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.generate_conversion_rates.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Ads::GoogleAds::V25::Services::ReachPlanService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.generate_conversion_rates.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Ads::GoogleAds::V25::Services::ReachPlanService::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "googleads.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, + ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the ReachPlanService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `generate_conversion_rates` + # @return [::Gapic::Config::Method] + # + attr_reader :generate_conversion_rates + ## + # RPC-specific configuration for `list_plannable_locations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_plannable_locations + ## + # RPC-specific configuration for `list_plannable_products` + # @return [::Gapic::Config::Method] + # + attr_reader :list_plannable_products + ## + # RPC-specific configuration for `generate_reach_forecast` + # @return [::Gapic::Config::Method] + # + attr_reader :generate_reach_forecast + ## + # RPC-specific configuration for `list_plannable_user_lists` + # @return [::Gapic::Config::Method] + # + attr_reader :list_plannable_user_lists + ## + # RPC-specific configuration for `list_plannable_user_interests` + # @return [::Gapic::Config::Method] + # + attr_reader :list_plannable_user_interests + + # @private + def initialize parent_rpcs = nil + generate_conversion_rates_config = parent_rpcs.generate_conversion_rates if parent_rpcs.respond_to? :generate_conversion_rates + @generate_conversion_rates = ::Gapic::Config::Method.new generate_conversion_rates_config + list_plannable_locations_config = parent_rpcs.list_plannable_locations if parent_rpcs.respond_to? :list_plannable_locations + @list_plannable_locations = ::Gapic::Config::Method.new list_plannable_locations_config + list_plannable_products_config = parent_rpcs.list_plannable_products if parent_rpcs.respond_to? :list_plannable_products + @list_plannable_products = ::Gapic::Config::Method.new list_plannable_products_config + generate_reach_forecast_config = parent_rpcs.generate_reach_forecast if parent_rpcs.respond_to? :generate_reach_forecast + @generate_reach_forecast = ::Gapic::Config::Method.new generate_reach_forecast_config + list_plannable_user_lists_config = parent_rpcs.list_plannable_user_lists if parent_rpcs.respond_to? :list_plannable_user_lists + @list_plannable_user_lists = ::Gapic::Config::Method.new list_plannable_user_lists_config + list_plannable_user_interests_config = parent_rpcs.list_plannable_user_interests if parent_rpcs.respond_to? :list_plannable_user_interests + @list_plannable_user_interests = ::Gapic::Config::Method.new list_plannable_user_interests_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/reach_plan_service/credentials.rb b/lib/google/ads/google_ads/v25/services/reach_plan_service/credentials.rb new file mode 100644 index 000000000..3034f5eca --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/reach_plan_service/credentials.rb @@ -0,0 +1,38 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Ads + module GoogleAds + module V25 + module Services + module ReachPlanService + # Credentials for the ReachPlanService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/adwords" + ] + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/reach_plan_service_pb.rb b/lib/google/ads/google_ads/v25/services/reach_plan_service_pb.rb new file mode 100644 index 000000000..1354dc34b --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/reach_plan_service_pb.rb @@ -0,0 +1,83 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/services/reach_plan_service.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/common/additional_application_info_pb' +require 'google/ads/google_ads/v25/common/criteria_pb' +require 'google/ads/google_ads/v25/common/dates_pb' +require 'google/ads/google_ads/v25/enums/frequency_cap_time_unit_pb' +require 'google/ads/google_ads/v25/enums/reach_plan_age_range_pb' +require 'google/ads/google_ads/v25/enums/reach_plan_buying_method_pb' +require 'google/ads/google_ads/v25/enums/reach_plan_conversion_rate_model_pb' +require 'google/ads/google_ads/v25/enums/reach_plan_cost_model_pb' +require 'google/ads/google_ads/v25/enums/reach_plan_marketing_objective_pb' +require 'google/ads/google_ads/v25/enums/reach_plan_network_pb' +require 'google/ads/google_ads/v25/enums/reach_plan_plannable_user_list_status_pb' +require 'google/ads/google_ads/v25/enums/reach_plan_surface_pb' +require 'google/ads/google_ads/v25/enums/target_frequency_time_unit_pb' +require 'google/ads/google_ads/v25/enums/user_interest_taxonomy_type_pb' +require 'google/ads/google_ads/v25/enums/user_list_crm_data_source_type_pb' +require 'google/ads/google_ads/v25/enums/user_list_type_pb' +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' + + +descriptor_data = "\n:google/ads/googleads/v25/services/reach_plan_service.proto\x12!google.ads.googleads.v25.services\x1a\x41google/ads/googleads/v25/common/additional_application_info.proto\x1a.google/ads/googleads/v25/common/criteria.proto\x1a+google/ads/googleads/v25/common/dates.proto\x1a\n\ndate_range\x18\x03 \x01(\x0b\x32*.google.ads.googleads.v25.common.DateRangeB\x13\n\x11_duration_in_days\"\x9b\x02\n\x0ePlannedProduct\x12(\n\x16plannable_product_code\x18\x03 \x01(\tB\x03\xe0\x41\x02H\x00\x88\x01\x01\x12\x1f\n\rbudget_micros\x18\x04 \x01(\x03\x42\x03\xe0\x41\x02H\x01\x88\x01\x01\x12\x1c\n\x0f\x63onversion_rate\x18\x06 \x01(\x01H\x02\x88\x01\x01\x12_\n\x1a\x61\x64vanced_product_targeting\x18\x05 \x01(\x0b\x32;.google.ads.googleads.v25.services.AdvancedProductTargetingB\x19\n\x17_plannable_product_codeB\x10\n\x0e_budget_microsB\x12\n\x10_conversion_rate\"\xc3\x01\n\x1dGenerateReachForecastResponse\x12^\n\x1aon_target_audience_metrics\x18\x01 \x01(\x0b\x32:.google.ads.googleads.v25.services.OnTargetAudienceMetrics\x12\x42\n\x0breach_curve\x18\x02 \x01(\x0b\x32-.google.ads.googleads.v25.services.ReachCurve\"W\n\nReachCurve\x12I\n\x0freach_forecasts\x18\x01 \x03(\x0b\x32\x30.google.ads.googleads.v25.services.ReachForecast\"\xcc\x01\n\rReachForecast\x12\x13\n\x0b\x63ost_micros\x18\x05 \x01(\x03\x12=\n\x08\x66orecast\x18\x02 \x01(\x0b\x32+.google.ads.googleads.v25.services.Forecast\x12g\n\x1fplanned_product_reach_forecasts\x18\x04 \x03(\x0b\x32>.google.ads.googleads.v25.services.PlannedProductReachForecast\"\x80\x06\n\x08\x46orecast\x12\x1c\n\x0fon_target_reach\x18\x05 \x01(\x03H\x00\x88\x01\x01\x12\x18\n\x0btotal_reach\x18\x06 \x01(\x03H\x01\x88\x01\x01\x12\"\n\x15on_target_impressions\x18\x07 \x01(\x03H\x02\x88\x01\x01\x12\x1e\n\x11total_impressions\x18\x08 \x01(\x03H\x03\x88\x01\x01\x12!\n\x14viewable_impressions\x18\t \x01(\x03H\x04\x88\x01\x01\x12\x66\n\x1e\x65\x66\x66\x65\x63tive_frequency_breakdowns\x18\n \x03(\x0b\x32>.google.ads.googleads.v25.services.EffectiveFrequencyBreakdown\x12#\n\x16on_target_coview_reach\x18\x0b \x01(\x03H\x05\x88\x01\x01\x12\x1f\n\x12total_coview_reach\x18\x0c \x01(\x03H\x06\x88\x01\x01\x12)\n\x1con_target_coview_impressions\x18\r \x01(\x03H\x07\x88\x01\x01\x12%\n\x18total_coview_impressions\x18\x0e \x01(\x03H\x08\x88\x01\x01\x12\x18\n\x0b\x63onversions\x18\x10 \x01(\x01H\t\x88\x01\x01\x12\x1b\n\x0etrueview_views\x18\x11 \x01(\x03H\n\x88\x01\x01\x12\x13\n\x06\x63licks\x18\x12 \x01(\x03H\x0b\x88\x01\x01\x42\x12\n\x10_on_target_reachB\x0e\n\x0c_total_reachB\x18\n\x16_on_target_impressionsB\x14\n\x12_total_impressionsB\x17\n\x15_viewable_impressionsB\x19\n\x17_on_target_coview_reachB\x15\n\x13_total_coview_reachB\x1f\n\x1d_on_target_coview_impressionsB\x1b\n\x19_total_coview_impressionsB\x0e\n\x0c_conversionsB\x11\n\x0f_trueview_viewsB\t\n\x07_clicks\"\xaf\x01\n\x1bPlannedProductReachForecast\x12\x1e\n\x16plannable_product_code\x18\x01 \x01(\t\x12\x13\n\x0b\x63ost_micros\x18\x02 \x01(\x03\x12[\n\x18planned_product_forecast\x18\x03 \x01(\x0b\x32\x39.google.ads.googleads.v25.services.PlannedProductForecast\"\xf4\x04\n\x16PlannedProductForecast\x12\x17\n\x0fon_target_reach\x18\x01 \x01(\x03\x12\x13\n\x0btotal_reach\x18\x02 \x01(\x03\x12\x1d\n\x15on_target_impressions\x18\x03 \x01(\x03\x12\x19\n\x11total_impressions\x18\x04 \x01(\x03\x12!\n\x14viewable_impressions\x18\x05 \x01(\x03H\x00\x88\x01\x01\x12#\n\x16on_target_coview_reach\x18\x06 \x01(\x03H\x01\x88\x01\x01\x12\x1f\n\x12total_coview_reach\x18\x07 \x01(\x03H\x02\x88\x01\x01\x12)\n\x1con_target_coview_impressions\x18\x08 \x01(\x03H\x03\x88\x01\x01\x12%\n\x18total_coview_impressions\x18\t \x01(\x03H\x04\x88\x01\x01\x12\x1e\n\x11\x61verage_frequency\x18\n \x01(\x01H\x05\x88\x01\x01\x12\x18\n\x0b\x63onversions\x18\x0c \x01(\x01H\x06\x88\x01\x01\x12\x1b\n\x0etrueview_views\x18\r \x01(\x03H\x07\x88\x01\x01\x12\x13\n\x06\x63licks\x18\x0e \x01(\x03H\x08\x88\x01\x01\x42\x17\n\x15_viewable_impressionsB\x19\n\x17_on_target_coview_reachB\x15\n\x13_total_coview_reachB\x1f\n\x1d_on_target_coview_impressionsB\x1b\n\x19_total_coview_impressionsB\x14\n\x12_average_frequencyB\x0e\n\x0c_conversionsB\x11\n\x0f_trueview_viewsB\t\n\x07_clicks\"\x93\x01\n\x17OnTargetAudienceMetrics\x12\"\n\x15youtube_audience_size\x18\x03 \x01(\x03H\x00\x88\x01\x01\x12!\n\x14\x63\x65nsus_audience_size\x18\x04 \x01(\x03H\x01\x88\x01\x01\x42\x18\n\x16_youtube_audience_sizeB\x17\n\x15_census_audience_size\"\xfc\x01\n\x1b\x45\x66\x66\x65\x63tiveFrequencyBreakdown\x12\x1b\n\x13\x65\x66\x66\x65\x63tive_frequency\x18\x01 \x01(\x05\x12\x17\n\x0fon_target_reach\x18\x02 \x01(\x03\x12\x13\n\x0btotal_reach\x18\x03 \x01(\x03\x12#\n\x16\x65\x66\x66\x65\x63tive_coview_reach\x18\x04 \x01(\x03H\x00\x88\x01\x01\x12-\n on_target_effective_coview_reach\x18\x05 \x01(\x03H\x01\x88\x01\x01\x42\x19\n\x17_effective_coview_reachB#\n!_on_target_effective_coview_reach\"/\n\x15\x46orecastMetricOptions\x12\x16\n\x0einclude_coview\x18\x01 \x01(\x08\"\xa0\x01\n\x11\x41udienceTargeting\x12H\n\ruser_interest\x18\x01 \x03(\x0b\x32\x31.google.ads.googleads.v25.common.UserInterestInfo\x12\x41\n\nuser_lists\x18\x02 \x03(\x0b\x32-.google.ads.googleads.v25.common.UserListInfo\"\xc5\x02\n\x18\x41\x64vancedProductTargeting\x12W\n\x1asurface_targeting_settings\x18\x02 \x01(\x0b\x32\x33.google.ads.googleads.v25.services.SurfaceTargeting\x12]\n\x19target_frequency_settings\x18\x03 \x01(\x0b\x32:.google.ads.googleads.v25.services.TargetFrequencySettings\x12[\n\x17youtube_select_settings\x18\x01 \x01(\x0b\x32\x38.google.ads.googleads.v25.services.YouTubeSelectSettingsH\x00\x42\x14\n\x12\x61\x64vanced_targeting\"*\n\x15YouTubeSelectSettings\x12\x11\n\tlineup_id\x18\x01 \x01(\x03\"=\n\x13YouTubeSelectLineUp\x12\x11\n\tlineup_id\x18\x01 \x01(\x03\x12\x13\n\x0blineup_name\x18\x02 \x01(\t\"\xd5\x01\n\x1cYouTubeSelectLineUpTargeting\x12V\n\x16youtube_select_lineups\x18\x01 \x03(\x0b\x32\x36.google.ads.googleads.v25.services.YouTubeSelectLineUp\x12]\n\x1d\x64\x65\x66\x61ult_youtube_select_lineup\x18\x02 \x01(\x0b\x32\x36.google.ads.googleads.v25.services.YouTubeSelectLineUp\"\xcd\x01\n\x1cSurfaceTargetingCombinations\x12N\n\x11\x64\x65\x66\x61ult_targeting\x18\x01 \x01(\x0b\x32\x33.google.ads.googleads.v25.services.SurfaceTargeting\x12]\n available_targeting_combinations\x18\x02 \x03(\x0b\x32\x33.google.ads.googleads.v25.services.SurfaceTargeting\"k\n\x10SurfaceTargeting\x12W\n\x08surfaces\x18\x01 \x03(\x0e\x32\x45.google.ads.googleads.v25.enums.ReachPlanSurfaceEnum.ReachPlanSurface\"\xa5\x01\n\x17TargetFrequencySettings\x12k\n\ttime_unit\x18\x01 \x01(\x0e\x32S.google.ads.googleads.v25.enums.TargetFrequencyTimeUnitEnum.TargetFrequencyTimeUnitB\x03\xe0\x41\x02\x12\x1d\n\x10target_frequency\x18\x02 \x01(\x05\x42\x03\xe0\x41\x02\x32\xa2\x0b\n\x10ReachPlanService\x12\xd7\x01\n\x17GenerateConversionRates\x12\x41.google.ads.googleads.v25.services.GenerateConversionRatesRequest\x1a\x42.google.ads.googleads.v25.services.GenerateConversionRatesResponse\"5\xda\x41\x0b\x63ustomer_id\x82\xd3\xe4\x93\x02!\"\x1c/v25:generateConversionRates:\x01*\x12\xc5\x01\n\x16ListPlannableLocations\x12@.google.ads.googleads.v25.services.ListPlannableLocationsRequest\x1a\x41.google.ads.googleads.v25.services.ListPlannableLocationsResponse\"&\x82\xd3\xe4\x93\x02 \"\x1b/v25:listPlannableLocations:\x01*\x12\xd9\x01\n\x15ListPlannableProducts\x12?.google.ads.googleads.v25.services.ListPlannableProductsRequest\x1a@.google.ads.googleads.v25.services.ListPlannableProductsResponse\"=\xda\x41\x15plannable_location_id\x82\xd3\xe4\x93\x02\x1f\"\x1a/v25:listPlannableProducts:\x01*\x12\x8c\x02\n\x15GenerateReachForecast\x12?.google.ads.googleads.v25.services.GenerateReachForecastRequest\x1a@.google.ads.googleads.v25.services.GenerateReachForecastResponse\"p\xda\x41.customer_id,campaign_duration,planned_products\x82\xd3\xe4\x93\x02\x39\"4/v25/customers/{customer_id=*}:generateReachForecast:\x01*\x12\xd3\x01\n\x16ListPlannableUserLists\x12@.google.ads.googleads.v25.services.ListPlannableUserListsRequest\x1a\x41.google.ads.googleads.v25.services.ListPlannableUserListsResponse\"4\xda\x41\x0b\x63ustomer_id\x82\xd3\xe4\x93\x02 \"\x1b/v25:listPlannableUserLists:\x01*\x12\xe3\x01\n\x1aListPlannableUserInterests\x12\x44.google.ads.googleads.v25.services.ListPlannableUserInterestsRequest\x1a\x45.google.ads.googleads.v25.services.ListPlannableUserInterestsResponse\"8\xda\x41\x0b\x63ustomer_id\x82\xd3\xe4\x93\x02$\"\x1f/v25:listPlannableUserInterests:\x01*\x1a\x45\xca\x41\x18googleads.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/adwordsB\x81\x02\n%com.google.ads.googleads.v25.servicesB\x15ReachPlanServiceProtoP\x01ZIgoogle.golang.org/genproto/googleapis/ads/googleads/v25/services;services\xa2\x02\x03GAA\xaa\x02!Google.Ads.GoogleAds.V25.Services\xca\x02!Google\\Ads\\GoogleAds\\V25\\Services\xea\x02%Google::Ads::GoogleAds::V25::Servicesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Services + GenerateConversionRatesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.GenerateConversionRatesRequest").msgclass + GenerateConversionRatesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.GenerateConversionRatesResponse").msgclass + ConversionRateSuggestion = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.ConversionRateSuggestion").msgclass + ListPlannableLocationsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.ListPlannableLocationsRequest").msgclass + ListPlannableLocationsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.ListPlannableLocationsResponse").msgclass + PlannableLocation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.PlannableLocation").msgclass + ListPlannableProductsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.ListPlannableProductsRequest").msgclass + ListPlannableProductsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.ListPlannableProductsResponse").msgclass + ProductMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.ProductMetadata").msgclass + ProductCoreAttributes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.ProductCoreAttributes").msgclass + ListPlannableUserListsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.ListPlannableUserListsRequest").msgclass + ListPlannableUserListsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.ListPlannableUserListsResponse").msgclass + PlannableUserList = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.PlannableUserList").msgclass + PlannableUserListMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.PlannableUserListMetadata").msgclass + PlannableTargeting = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.PlannableTargeting").msgclass + ListPlannableUserInterestsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.ListPlannableUserInterestsRequest").msgclass + ListPlannableUserInterestsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.ListPlannableUserInterestsResponse").msgclass + PlannableUserInterest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.PlannableUserInterest").msgclass + GenerateReachForecastRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.GenerateReachForecastRequest").msgclass + EffectiveFrequencyLimit = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.EffectiveFrequencyLimit").msgclass + FrequencyCap = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.FrequencyCap").msgclass + Targeting = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.Targeting").msgclass + CampaignDuration = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.CampaignDuration").msgclass + PlannedProduct = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.PlannedProduct").msgclass + GenerateReachForecastResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.GenerateReachForecastResponse").msgclass + ReachCurve = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.ReachCurve").msgclass + ReachForecast = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.ReachForecast").msgclass + Forecast = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.Forecast").msgclass + PlannedProductReachForecast = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.PlannedProductReachForecast").msgclass + PlannedProductForecast = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.PlannedProductForecast").msgclass + OnTargetAudienceMetrics = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.OnTargetAudienceMetrics").msgclass + EffectiveFrequencyBreakdown = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.EffectiveFrequencyBreakdown").msgclass + ForecastMetricOptions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.ForecastMetricOptions").msgclass + AudienceTargeting = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.AudienceTargeting").msgclass + AdvancedProductTargeting = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.AdvancedProductTargeting").msgclass + YouTubeSelectSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.YouTubeSelectSettings").msgclass + YouTubeSelectLineUp = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.YouTubeSelectLineUp").msgclass + YouTubeSelectLineUpTargeting = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.YouTubeSelectLineUpTargeting").msgclass + SurfaceTargetingCombinations = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.SurfaceTargetingCombinations").msgclass + SurfaceTargeting = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.SurfaceTargeting").msgclass + TargetFrequencySettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.TargetFrequencySettings").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/reach_plan_service_services_pb.rb b/lib/google/ads/google_ads/v25/services/reach_plan_service_services_pb.rb new file mode 100644 index 000000000..4e7f6b4ca --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/reach_plan_service_services_pb.rb @@ -0,0 +1,129 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/ads/googleads/v25/services/reach_plan_service.proto for package 'Google.Ads.GoogleAds.V25.Services' +# Original file comments: +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +require 'grpc' +require 'google/ads/google_ads/v25/services/reach_plan_service_pb' + +module Google + module Ads + module GoogleAds + module V25 + module Services + module ReachPlanService + # Proto file describing the reach plan service. + # + # Reach Plan Service gives users information about audience size that can + # be reached through advertisement on YouTube. In particular, + # GenerateReachForecast provides estimated number of people of specified + # demographics that can be reached by an ad in a given market by a campaign of + # certain duration with a defined budget. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.ads.googleads.v25.services.ReachPlanService' + + # Returns a collection of conversion rate suggestions for supported plannable + # products. + # + # List of thrown errors: + # [AuthenticationError]() + # [AuthorizationError]() + # [HeaderError]() + # [InternalError]() + # [QuotaError]() + # [RequestError]() + rpc :GenerateConversionRates, ::Google::Ads::GoogleAds::V25::Services::GenerateConversionRatesRequest, ::Google::Ads::GoogleAds::V25::Services::GenerateConversionRatesResponse + # Returns the list of plannable locations (for example, countries). + # + # List of thrown errors: + # [AuthenticationError]() + # [AuthorizationError]() + # [HeaderError]() + # [InternalError]() + # [QuotaError]() + # [RequestError]() + rpc :ListPlannableLocations, ::Google::Ads::GoogleAds::V25::Services::ListPlannableLocationsRequest, ::Google::Ads::GoogleAds::V25::Services::ListPlannableLocationsResponse + # Returns the list of per-location plannable YouTube ad formats with allowed + # targeting. + # + # List of thrown errors: + # [AuthenticationError]() + # [AuthorizationError]() + # [HeaderError]() + # [InternalError]() + # [QuotaError]() + # [RequestError]() + rpc :ListPlannableProducts, ::Google::Ads::GoogleAds::V25::Services::ListPlannableProductsRequest, ::Google::Ads::GoogleAds::V25::Services::ListPlannableProductsResponse + # Generates a reach forecast for a given targeting / product mix. + # + # List of thrown errors: + # [AuthenticationError]() + # [AuthorizationError]() + # [FieldError]() + # [HeaderError]() + # [InternalError]() + # [QuotaError]() + # [RangeError]() + # [ReachPlanError]() + # [RequestError]() + rpc :GenerateReachForecast, ::Google::Ads::GoogleAds::V25::Services::GenerateReachForecastRequest, ::Google::Ads::GoogleAds::V25::Services::GenerateReachForecastResponse + # Returns the list of plannable user lists with their plannable status. + # User lists may not be plannable for a number of reasons, including: + # - They are less than 10 days old. + # - They have a membership lifespan that is less than 30 days + # - They have less than 10,000 or more than 700,000 users. + # + # List of thrown errors: + # [AuthenticationError]() + # [AuthorizationError]() + # [FieldError]() + # [HeaderError]() + # [InternalError]() + # [QuotaError]() + # [RangeError]() + # [ReachPlanError]() + # [RequestError]() + rpc :ListPlannableUserLists, ::Google::Ads::GoogleAds::V25::Services::ListPlannableUserListsRequest, ::Google::Ads::GoogleAds::V25::Services::ListPlannableUserListsResponse + # Returns the list of plannable user interests. + # A plannable user interest is one that can be targeted in a reach forecast + # using + # [ReachPlanService.GenerateReachForecast][google.ads.googleads.v25.services.ReachPlanService.GenerateReachForecast]. + # + # List of thrown errors: + # [AuthenticationError]() + # [AuthorizationError]() + # [FieldError]() + # [HeaderError]() + # [InternalError]() + # [ListOperationError]() + # [QuotaError]() + # [RequestError]() + # [StringLengthError]() + rpc :ListPlannableUserInterests, ::Google::Ads::GoogleAds::V25::Services::ListPlannableUserInterestsRequest, ::Google::Ads::GoogleAds::V25::Services::ListPlannableUserInterestsResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/recommendation_service.rb b/lib/google/ads/google_ads/v25/services/recommendation_service.rb new file mode 100644 index 000000000..274523089 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/recommendation_service.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/ads/google_ads/version" + +require "google/ads/google_ads/v25/services/recommendation_service/credentials" +require "google/ads/google_ads/v25/services/recommendation_service/paths" +require "google/ads/google_ads/v25/services/recommendation_service/client" + +module Google + module Ads + module GoogleAds + module V25 + module Services + ## + # Service to manage recommendations. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/ads/google_ads/v25/services/recommendation_service" + # client = ::Google::Ads::GoogleAds::V25::Services::RecommendationService::Client.new + # + module RecommendationService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "recommendation_service", "helpers.rb" +require "google/ads/google_ads/v25/services/recommendation_service/helpers" if ::File.file? helper_path diff --git a/lib/google/ads/google_ads/v25/services/recommendation_service/client.rb b/lib/google/ads/google_ads/v25/services/recommendation_service/client.rb new file mode 100644 index 000000000..5806c839f --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/recommendation_service/client.rb @@ -0,0 +1,818 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# require "google/ads/google_ads/error" +require "google/ads/google_ads/v25/services/recommendation_service_pb" + +module Google + module Ads + module GoogleAds + module V25 + module Services + module RecommendationService + ## + # Client for the RecommendationService service. + # + # Service to manage recommendations. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "googleads.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :recommendation_service_stub + + ## + # Configure the RecommendationService Client class. + # + # See {::Google::Ads::GoogleAds::V25::Services::RecommendationService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all RecommendationService clients + # ::Google::Ads::GoogleAds::V25::Services::RecommendationService::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + default_config = Client::Configuration.new + + default_config.timeout = 14_400.0 + default_config.retry_policy = { + initial_delay: 5.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the RecommendationService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Ads::GoogleAds::V25::Services::RecommendationService::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @recommendation_service_stub.universe_domain + end + + ## + # Create a new RecommendationService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Ads::GoogleAds::V25::Services::RecommendationService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Ads::GoogleAds::V25::Services::RecommendationService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the RecommendationService client. + # @yieldparam config [Client::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/ads/google_ads/v25/services/recommendation_service_services_pb" + + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @recommendation_service_stub = ::Gapic::ServiceStub.new( + ::Google::Ads::GoogleAds::V25::Services::RecommendationService::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool, + logger: @config.logger + ) + + @recommendation_service_stub.stub_logger&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @recommendation_service_stub.logger + end + + # Service calls + + ## + # Applies given recommendations with corresponding apply parameters. + # + # List of thrown errors: + # [AuthenticationError]() + # [AuthorizationError]() + # [DatabaseError]() + # [FieldError]() + # [HeaderError]() + # [InternalError]() + # [MutateError]() + # [QuotaError]() + # [RecommendationError]() + # [RequestError]() + # [UrlFieldError]() + # + # @overload apply_recommendation(request, options = nil) + # Pass arguments to `apply_recommendation` via a request object, either of type + # {::Google::Ads::GoogleAds::V25::Services::ApplyRecommendationRequest} or an equivalent Hash. + # + # @param request [::Google::Ads::GoogleAds::V25::Services::ApplyRecommendationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload apply_recommendation(customer_id: nil, operations: nil, partial_failure: nil) + # Pass arguments to `apply_recommendation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param customer_id [::String] + # Required. The ID of the customer with the recommendation. + # @param operations [::Array<::Google::Ads::GoogleAds::V25::Services::ApplyRecommendationOperation, ::Hash>] + # Required. 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. + # @param partial_failure [::Boolean] + # 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. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Ads::GoogleAds::V25::Services::ApplyRecommendationResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Ads::GoogleAds::V25::Services::ApplyRecommendationResponse] + # + # @raise [Google::Ads::GoogleAds::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/ads/google_ads/v25/services" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Ads::GoogleAds::V25::Services::RecommendationService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Ads::GoogleAds::V25::Services::ApplyRecommendationRequest.new + # + # # Call the apply_recommendation method. + # result = client.apply_recommendation request + # + # # The returned object is of type Google::Ads::GoogleAds::V25::Services::ApplyRecommendationResponse. + # p result + # + def apply_recommendation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::GoogleAds::V25::Services::ApplyRecommendationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.apply_recommendation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Ads::GoogleAds::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.customer_id + header_params["customer_id"] = request.customer_id + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.apply_recommendation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.apply_recommendation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @recommendation_service_stub.call_rpc :apply_recommendation, request, + options: options do |response, operation| + yield response, operation if block_given? + end + # rescue GRPC::BadStatus => grpc_error + # raise Google::Ads::GoogleAds::Error.new grpc_error.message + end + + ## + # Dismisses given recommendations. + # + # List of thrown errors: + # [AuthenticationError]() + # [AuthorizationError]() + # [HeaderError]() + # [InternalError]() + # [QuotaError]() + # [RecommendationError]() + # [RequestError]() + # + # @overload dismiss_recommendation(request, options = nil) + # Pass arguments to `dismiss_recommendation` via a request object, either of type + # {::Google::Ads::GoogleAds::V25::Services::DismissRecommendationRequest} or an equivalent Hash. + # + # @param request [::Google::Ads::GoogleAds::V25::Services::DismissRecommendationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload dismiss_recommendation(customer_id: nil, operations: nil, partial_failure: nil) + # Pass arguments to `dismiss_recommendation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param customer_id [::String] + # Required. The ID of the customer with the recommendation. + # @param operations [::Array<::Google::Ads::GoogleAds::V25::Services::DismissRecommendationRequest::DismissRecommendationOperation, ::Hash>] + # Required. 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. + # @param partial_failure [::Boolean] + # 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. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Ads::GoogleAds::V25::Services::DismissRecommendationResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Ads::GoogleAds::V25::Services::DismissRecommendationResponse] + # + # @raise [Google::Ads::GoogleAds::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/ads/google_ads/v25/services" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Ads::GoogleAds::V25::Services::RecommendationService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Ads::GoogleAds::V25::Services::DismissRecommendationRequest.new + # + # # Call the dismiss_recommendation method. + # result = client.dismiss_recommendation request + # + # # The returned object is of type Google::Ads::GoogleAds::V25::Services::DismissRecommendationResponse. + # p result + # + def dismiss_recommendation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::GoogleAds::V25::Services::DismissRecommendationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.dismiss_recommendation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Ads::GoogleAds::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.customer_id + header_params["customer_id"] = request.customer_id + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.dismiss_recommendation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.dismiss_recommendation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @recommendation_service_stub.call_rpc :dismiss_recommendation, request, + options: options do |response, operation| + yield response, operation if block_given? + end + # rescue GRPC::BadStatus => grpc_error + # raise Google::Ads::GoogleAds::Error.new grpc_error.message + end + + ## + # Generates Recommendations based off the requested recommendation_types. + # + # List of thrown errors: + # [AuthenticationError]() + # [AuthorizationError]() + # [HeaderError]() + # [InternalError]() + # [QuotaError]() + # [RecommendationError]() + # [RequestError]() + # + # @overload generate_recommendations(request, options = nil) + # Pass arguments to `generate_recommendations` via a request object, either of type + # {::Google::Ads::GoogleAds::V25::Services::GenerateRecommendationsRequest} or an equivalent Hash. + # + # @param request [::Google::Ads::GoogleAds::V25::Services::GenerateRecommendationsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload generate_recommendations(customer_id: nil, recommendation_types: nil, advertising_channel_type: nil, campaign_sitelink_count: nil, conversion_tracking_status: nil, bidding_info: nil, ad_group_info: nil, seed_info: nil, budget_info: nil, campaign_image_asset_count: nil, campaign_call_asset_count: nil, country_codes: nil, language_codes: nil, positive_locations_ids: nil, negative_locations_ids: nil, asset_group_info: nil, target_partner_search_network: nil, target_content_network: nil, merchant_center_account_id: nil, is_new_customer: nil) + # Pass arguments to `generate_recommendations` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param customer_id [::String] + # Required. The ID of the customer generating recommendations. + # @param recommendation_types [::Array<::Google::Ads::GoogleAds::V25::Enums::RecommendationTypeEnum::RecommendationType>] + # Required. List of eligible recommendation_types to generate. If the + # uploaded criteria isn't sufficient to make a recommendation, or the + # campaign is already in the recommended state, no recommendation will be + # returned for that type. Generally, a recommendation is returned if all + # required fields for that recommendation_type are uploaded, but there are + # cases where this is still not sufficient. + # + # The following recommendation_types are supported for recommendation + # generation: + # CAMPAIGN_BUDGET, KEYWORD, MAXIMIZE_CLICKS_OPT_IN, + # MAXIMIZE_CONVERSIONS_OPT_IN, MAXIMIZE_CONVERSION_VALUE_OPT_IN, + # SET_TARGET_CPA, SET_TARGET_ROAS, SITELINK_ASSET, TARGET_CPA_OPT_IN, + # TARGET_ROAS_OPT_IN + # @param advertising_channel_type [::Google::Ads::GoogleAds::V25::Enums::AdvertisingChannelTypeEnum::AdvertisingChannelType] + # Required. Advertising channel type of the campaign. + # The following advertising_channel_types are supported for recommendation + # generation: + # PERFORMANCE_MAX and SEARCH + # @param campaign_sitelink_count [::Integer] + # Optional. Number of sitelinks on the campaign. + # This field is necessary for the following recommendation_types: + # SITELINK_ASSET + # @param conversion_tracking_status [::Google::Ads::GoogleAds::V25::Enums::ConversionTrackingStatusEnum::ConversionTrackingStatus] + # Optional. Current conversion tracking status. + # This field is necessary for the following recommendation_types: + # MAXIMIZE_CLICKS_OPT_IN, MAXIMIZE_CONVERSIONS_OPT_IN, + # MAXIMIZE_CONVERSION_VALUE_OPT_IN, SET_TARGET_CPA, SET_TARGET_ROAS, + # TARGET_CPA_OPT_IN, TARGET_ROAS_OPT_IN + # @param bidding_info [::Google::Ads::GoogleAds::V25::Services::GenerateRecommendationsRequest::BiddingInfo, ::Hash] + # Optional. Current bidding information of the campaign. + # This field is necessary for the following recommendation_types: + # CAMPAIGN_BUDGET, MAXIMIZE_CLICKS_OPT_IN, MAXIMIZE_CONVERSIONS_OPT_IN, + # MAXIMIZE_CONVERSION_VALUE_OPT_IN, SET_TARGET_CPA, SET_TARGET_ROAS, + # TARGET_CPA_OPT_IN, TARGET_ROAS_OPT_IN + # @param ad_group_info [::Array<::Google::Ads::GoogleAds::V25::Services::GenerateRecommendationsRequest::AdGroupInfo, ::Hash>] + # Optional. Current AdGroup Information. + # Supports information from a single AdGroup. + # This field is optional for the following recommendation_types: + # KEYWORD + # This field is required for the following recommendation_types: + # CAMPAIGN_BUDGET if AdvertisingChannelType is SEARCH + # @param seed_info [::Google::Ads::GoogleAds::V25::Services::GenerateRecommendationsRequest::SeedInfo, ::Hash] + # Optional. Seed information for Keywords. + # This field is necessary for the following recommendation_types: + # KEYWORD + # @param budget_info [::Google::Ads::GoogleAds::V25::Services::GenerateRecommendationsRequest::BudgetInfo, ::Hash] + # Optional. Current budget information. + # This field is optional for the following recommendation_types: + # CAMPAIGN_BUDGET + # @param campaign_image_asset_count [::Integer] + # Optional. Current campaign image asset count. + # This field is optional for the following recommendation_types: + # CAMPAIGN_BUDGET + # @param campaign_call_asset_count [::Integer] + # Optional. Current campaign call asset count. + # This field is optional for the following recommendation_types: + # CAMPAIGN_BUDGET + # @param country_codes [::Array<::String>] + # Optional. Current campaign country codes. + # This field is required for the following recommendation_types: + # CAMPAIGN_BUDGET if AdvertisingChannelType is SEARCH + # @param language_codes [::Array<::String>] + # Optional. Current campaign language codes. + # This field is required for the following recommendation_types: + # CAMPAIGN_BUDGET if AdvertisingChannelType is SEARCH + # @param positive_locations_ids [::Array<::Integer>] + # Optional. Current campaign positive location ids. + # One of this field OR negative_location_ids is required for the following + # recommendation_types: CAMPAIGN_BUDGET if AdvertisingChannelType is SEARCH + # @param negative_locations_ids [::Array<::Integer>] + # Optional. Current campaign negative location ids. + # One of this field OR positive_location_ids is required for the following + # recommendation_types: CAMPAIGN_BUDGET if AdvertisingChannelType is SEARCH + # @param asset_group_info [::Array<::Google::Ads::GoogleAds::V25::Services::GenerateRecommendationsRequest::AssetGroupInfo, ::Hash>] + # Optional. Current AssetGroup Information. + # This field is required for the following recommendation_types: + # CAMPAIGN_BUDGET + # @param target_partner_search_network [::Boolean] + # Optional. If true, the campaign is opted into serving ads on the Google + # Partner Network. This field is optional for the following + # recommendation_types: CAMPAIGN_BUDGET + # @param target_content_network [::Boolean] + # Optional. If true, the campaign is opted into serving ads on specified + # placements in the Google Display Network. This field is optional for the + # following recommendation_types: CAMPAIGN_BUDGET + # @param merchant_center_account_id [::Integer] + # Optional. Merchant Center account ID. + # This field should only be set when advertising_channel_type is + # PERFORMANCE_MAX. Setting this field causes RecommendationService + # to generate recommendations for Performance Max for retail + # instead of standard Performance Max. + # This field is optional for the following recommendation_types: + # CAMPAIGN_BUDGET + # @param is_new_customer [::Boolean] + # Optional. Whether or not this customer should be treated as a "new" + # customer (that is, a customer who has not yet created a campaign). + # + # Setting this to `true` will cause the backend to generate recommendations + # using a dedicated recommendation model for onboarding new customers, as + # opposed to the default model for existing customers. This is only + # recommended for customers with 0 campaigns. + # + # This field is optional for the following recommendation_types: + # CAMPAIGN_BUDGET + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Ads::GoogleAds::V25::Services::GenerateRecommendationsResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Ads::GoogleAds::V25::Services::GenerateRecommendationsResponse] + # + # @raise [Google::Ads::GoogleAds::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/ads/google_ads/v25/services" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Ads::GoogleAds::V25::Services::RecommendationService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Ads::GoogleAds::V25::Services::GenerateRecommendationsRequest.new + # + # # Call the generate_recommendations method. + # result = client.generate_recommendations request + # + # # The returned object is of type Google::Ads::GoogleAds::V25::Services::GenerateRecommendationsResponse. + # p result + # + def generate_recommendations request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::GoogleAds::V25::Services::GenerateRecommendationsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.generate_recommendations.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Ads::GoogleAds::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.customer_id + header_params["customer_id"] = request.customer_id + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.generate_recommendations.timeout, + metadata: metadata, + retry_policy: @config.rpcs.generate_recommendations.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @recommendation_service_stub.call_rpc :generate_recommendations, request, + options: options do |response, operation| + yield response, operation if block_given? + end + # rescue GRPC::BadStatus => grpc_error + # raise Google::Ads::GoogleAds::Error.new grpc_error.message + end + + ## + # Configuration class for the RecommendationService API. + # + # This class represents the configuration for RecommendationService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Ads::GoogleAds::V25::Services::RecommendationService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # apply_recommendation to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Ads::GoogleAds::V25::Services::RecommendationService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.apply_recommendation.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Ads::GoogleAds::V25::Services::RecommendationService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.apply_recommendation.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Ads::GoogleAds::V25::Services::RecommendationService::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "googleads.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, + ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the RecommendationService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `apply_recommendation` + # @return [::Gapic::Config::Method] + # + attr_reader :apply_recommendation + ## + # RPC-specific configuration for `dismiss_recommendation` + # @return [::Gapic::Config::Method] + # + attr_reader :dismiss_recommendation + ## + # RPC-specific configuration for `generate_recommendations` + # @return [::Gapic::Config::Method] + # + attr_reader :generate_recommendations + + # @private + def initialize parent_rpcs = nil + apply_recommendation_config = parent_rpcs.apply_recommendation if parent_rpcs.respond_to? :apply_recommendation + @apply_recommendation = ::Gapic::Config::Method.new apply_recommendation_config + dismiss_recommendation_config = parent_rpcs.dismiss_recommendation if parent_rpcs.respond_to? :dismiss_recommendation + @dismiss_recommendation = ::Gapic::Config::Method.new dismiss_recommendation_config + generate_recommendations_config = parent_rpcs.generate_recommendations if parent_rpcs.respond_to? :generate_recommendations + @generate_recommendations = ::Gapic::Config::Method.new generate_recommendations_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/recommendation_service/credentials.rb b/lib/google/ads/google_ads/v25/services/recommendation_service/credentials.rb new file mode 100644 index 000000000..656d27eb8 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/recommendation_service/credentials.rb @@ -0,0 +1,38 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Ads + module GoogleAds + module V25 + module Services + module RecommendationService + # Credentials for the RecommendationService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/adwords" + ] + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/recommendation_service/paths.rb b/lib/google/ads/google_ads/v25/services/recommendation_service/paths.rb new file mode 100644 index 000000000..8baf02a96 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/recommendation_service/paths.rb @@ -0,0 +1,154 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Ads + module GoogleAds + module V25 + module Services + module RecommendationService + # Path helper methods for the RecommendationService API. + module Paths + ## + # Create a fully-qualified Ad resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/ads/{ad_id}` + # + # @param customer_id [String] + # @param ad_id [String] + # + # @return [::String] + def ad_path customer_id:, ad_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/ads/#{ad_id}" + end + + ## + # Create a fully-qualified AdGroup resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/adGroups/{ad_group_id}` + # + # @param customer_id [String] + # @param ad_group_id [String] + # + # @return [::String] + def ad_group_path customer_id:, ad_group_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/adGroups/#{ad_group_id}" + end + + ## + # Create a fully-qualified Asset resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/assets/{asset_id}` + # + # @param customer_id [String] + # @param asset_id [String] + # + # @return [::String] + def asset_path customer_id:, asset_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/assets/#{asset_id}" + end + + ## + # Create a fully-qualified Campaign resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/campaigns/{campaign_id}` + # + # @param customer_id [String] + # @param campaign_id [String] + # + # @return [::String] + def campaign_path customer_id:, campaign_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/campaigns/#{campaign_id}" + end + + ## + # Create a fully-qualified CampaignBudget resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/campaignBudgets/{campaign_budget_id}` + # + # @param customer_id [String] + # @param campaign_budget_id [String] + # + # @return [::String] + def campaign_budget_path customer_id:, campaign_budget_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/campaignBudgets/#{campaign_budget_id}" + end + + ## + # Create a fully-qualified ConversionAction resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/conversionActions/{conversion_action_id}` + # + # @param customer_id [String] + # @param conversion_action_id [String] + # + # @return [::String] + def conversion_action_path customer_id:, conversion_action_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/conversionActions/#{conversion_action_id}" + end + + ## + # Create a fully-qualified Recommendation resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/recommendations/{recommendation_id}` + # + # @param customer_id [String] + # @param recommendation_id [String] + # + # @return [::String] + def recommendation_path customer_id:, recommendation_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/recommendations/#{recommendation_id}" + end + + extend self + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/recommendation_service_pb.rb b/lib/google/ads/google_ads/v25/services/recommendation_service_pb.rb new file mode 100644 index 000000000..190340e50 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/recommendation_service_pb.rb @@ -0,0 +1,80 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/services/recommendation_service.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/common/criteria_pb' +require 'google/ads/google_ads/v25/common/extensions_pb' +require 'google/ads/google_ads/v25/enums/ad_group_type_pb' +require 'google/ads/google_ads/v25/enums/advertising_channel_type_pb' +require 'google/ads/google_ads/v25/enums/bidding_strategy_type_pb' +require 'google/ads/google_ads/v25/enums/conversion_tracking_status_enum_pb' +require 'google/ads/google_ads/v25/enums/keyword_match_type_pb' +require 'google/ads/google_ads/v25/enums/recommendation_type_pb' +require 'google/ads/google_ads/v25/enums/target_impression_share_location_pb' +require 'google/ads/google_ads/v25/resources/ad_pb' +require 'google/ads/google_ads/v25/resources/asset_pb' +require 'google/ads/google_ads/v25/resources/recommendation_pb' +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/rpc/status_pb' + + +descriptor_data = "\n>google/ads/googleads/v25/services/recommendation_service.proto\x12!google.ads.googleads.v25.services\x1a.google/ads/googleads/v25/common/criteria.proto\x1a\x30google/ads/googleads/v25/common/extensions.proto\x1a\x32google/ads/googleads/v25/enums/ad_group_type.proto\x1a=google/ads/googleads/v25/enums/advertising_channel_type.proto\x1a:google/ads/googleads/v25/enums/bidding_strategy_type.proto\x1a\x44google/ads/googleads/v25/enums/conversion_tracking_status_enum.proto\x1a\x37google/ads/googleads/v25/enums/keyword_match_type.proto\x1a\x38google/ads/googleads/v25/enums/recommendation_type.proto\x1a\x45google/ads/googleads/v25/enums/target_impression_share_location.proto\x1a+google/ads/googleads/v25/resources/ad.proto\x1a.google/ads/googleads/v25/resources/asset.proto\x1a\x37google/ads/googleads/v25/resources/recommendation.proto\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x17google/rpc/status.proto\"\xa9\x01\n\x1a\x41pplyRecommendationRequest\x12\x18\n\x0b\x63ustomer_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12X\n\noperations\x18\x02 \x03(\x0b\x32?.google.ads.googleads.v25.services.ApplyRecommendationOperationB\x03\xe0\x41\x02\x12\x17\n\x0fpartial_failure\x18\x03 \x01(\x08\"\xf3/\n\x1c\x41pplyRecommendationOperation\x12\x43\n\rresource_name\x18\x01 \x01(\tB,\xfa\x41)\n\'googleads.googleapis.com/Recommendation\x12s\n\x0f\x63\x61mpaign_budget\x18\x02 \x01(\x0b\x32X.google.ads.googleads.v25.services.ApplyRecommendationOperation.CampaignBudgetParametersH\x00\x12\x63\n\x07text_ad\x18\x03 \x01(\x0b\x32P.google.ads.googleads.v25.services.ApplyRecommendationOperation.TextAdParametersH\x00\x12\x64\n\x07keyword\x18\x04 \x01(\x0b\x32Q.google.ads.googleads.v25.services.ApplyRecommendationOperation.KeywordParametersH\x00\x12u\n\x11target_cpa_opt_in\x18\x05 \x01(\x0b\x32X.google.ads.googleads.v25.services.ApplyRecommendationOperation.TargetCpaOptInParametersH\x00\x12w\n\x12target_roas_opt_in\x18\n \x01(\x0b\x32Y.google.ads.googleads.v25.services.ApplyRecommendationOperation.TargetRoasOptInParametersH\x00\x12w\n\x11\x63\x61llout_extension\x18\x06 \x01(\x0b\x32Z.google.ads.googleads.v25.services.ApplyRecommendationOperation.CalloutExtensionParametersH\x00\x12q\n\x0e\x63\x61ll_extension\x18\x07 \x01(\x0b\x32W.google.ads.googleads.v25.services.ApplyRecommendationOperation.CallExtensionParametersH\x00\x12y\n\x12sitelink_extension\x18\x08 \x01(\x0b\x32[.google.ads.googleads.v25.services.ApplyRecommendationOperation.SitelinkExtensionParametersH\x00\x12x\n\x12move_unused_budget\x18\t \x01(\x0b\x32Z.google.ads.googleads.v25.services.ApplyRecommendationOperation.MoveUnusedBudgetParametersH\x00\x12|\n\x14responsive_search_ad\x18\x0b \x01(\x0b\x32\\.google.ads.googleads.v25.services.ApplyRecommendationOperation.ResponsiveSearchAdParametersH\x00\x12\x81\x01\n\x17use_broad_match_keyword\x18\x0c \x01(\x0b\x32^.google.ads.googleads.v25.services.ApplyRecommendationOperation.UseBroadMatchKeywordParametersH\x00\x12\x87\x01\n\x1aresponsive_search_ad_asset\x18\r \x01(\x0b\x32\x61.google.ads.googleads.v25.services.ApplyRecommendationOperation.ResponsiveSearchAdAssetParametersH\x00\x12\xa1\x01\n(responsive_search_ad_improve_ad_strength\x18\x0e \x01(\x0b\x32m.google.ads.googleads.v25.services.ApplyRecommendationOperation.ResponsiveSearchAdImproveAdStrengthParametersH\x00\x12\x89\x01\n\x1craise_target_cpa_bid_too_low\x18\x0f \x01(\x0b\x32\x61.google.ads.googleads.v25.services.ApplyRecommendationOperation.RaiseTargetCpaBidTooLowParametersH\x00\x12\x89\x01\n\x1b\x66orecasting_set_target_roas\x18\x10 \x01(\x0b\x32\x62.google.ads.googleads.v25.services.ApplyRecommendationOperation.ForecastingSetTargetRoasParametersH\x00\x12o\n\rcallout_asset\x18\x11 \x01(\x0b\x32V.google.ads.googleads.v25.services.ApplyRecommendationOperation.CalloutAssetParametersH\x00\x12i\n\ncall_asset\x18\x12 \x01(\x0b\x32S.google.ads.googleads.v25.services.ApplyRecommendationOperation.CallAssetParametersH\x00\x12q\n\x0esitelink_asset\x18\x13 \x01(\x0b\x32W.google.ads.googleads.v25.services.ApplyRecommendationOperation.SitelinkAssetParametersH\x00\x12t\n\x10raise_target_cpa\x18\x14 \x01(\x0b\x32X.google.ads.googleads.v25.services.ApplyRecommendationOperation.RaiseTargetCpaParametersH\x00\x12v\n\x11lower_target_roas\x18\x15 \x01(\x0b\x32Y.google.ads.googleads.v25.services.ApplyRecommendationOperation.LowerTargetRoasParametersH\x00\x12\x87\x01\n\x1a\x66orecasting_set_target_cpa\x18\x16 \x01(\x0b\x32\x61.google.ads.googleads.v25.services.ApplyRecommendationOperation.ForecastingSetTargetCpaParametersH\x00\x12{\n\x0eset_target_cpa\x18\x17 \x01(\x0b\x32\x61.google.ads.googleads.v25.services.ApplyRecommendationOperation.ForecastingSetTargetCpaParametersH\x00\x12}\n\x0fset_target_roas\x18\x18 \x01(\x0b\x32\x62.google.ads.googleads.v25.services.ApplyRecommendationOperation.ForecastingSetTargetRoasParametersH\x00\x12r\n\x0flead_form_asset\x18\x19 \x01(\x0b\x32W.google.ads.googleads.v25.services.ApplyRecommendationOperation.LeadFormAssetParametersH\x00\x1a^\n\x18\x43\x61mpaignBudgetParameters\x12%\n\x18new_budget_amount_micros\x18\x02 \x01(\x03H\x00\x88\x01\x01\x42\x1b\n\x19_new_budget_amount_micros\x1a\x9c\x01\n\"ForecastingSetTargetRoasParameters\x12\x18\n\x0btarget_roas\x18\x01 \x01(\x01H\x00\x88\x01\x01\x12*\n\x1d\x63\x61mpaign_budget_amount_micros\x18\x02 \x01(\x03H\x01\x88\x01\x01\x42\x0e\n\x0c_target_roasB \n\x1e_campaign_budget_amount_micros\x1a\x46\n\x10TextAdParameters\x12\x32\n\x02\x61\x64\x18\x01 \x01(\x0b\x32&.google.ads.googleads.v25.resources.Ad\x1a\xc2\x01\n\x11KeywordParameters\x12\x15\n\x08\x61\x64_group\x18\x04 \x01(\tH\x00\x88\x01\x01\x12Y\n\nmatch_type\x18\x02 \x01(\x0e\x32\x45.google.ads.googleads.v25.enums.KeywordMatchTypeEnum.KeywordMatchType\x12\x1b\n\x0e\x63pc_bid_micros\x18\x05 \x01(\x03H\x01\x88\x01\x01\x42\x0b\n\t_ad_groupB\x11\n\x0f_cpc_bid_micros\x1a\xa6\x01\n\x18TargetCpaOptInParameters\x12\x1e\n\x11target_cpa_micros\x18\x03 \x01(\x03H\x00\x88\x01\x01\x12.\n!new_campaign_budget_amount_micros\x18\x04 \x01(\x03H\x01\x88\x01\x01\x42\x14\n\x12_target_cpa_microsB$\n\"_new_campaign_budget_amount_micros\x1a\x9b\x01\n\x19TargetRoasOptInParameters\x12\x18\n\x0btarget_roas\x18\x01 \x01(\x01H\x00\x88\x01\x01\x12.\n!new_campaign_budget_amount_micros\x18\x02 \x01(\x03H\x01\x88\x01\x01\x42\x0e\n\x0c_target_roasB$\n\"_new_campaign_budget_amount_micros\x1aj\n\x1a\x43\x61lloutExtensionParameters\x12L\n\x12\x63\x61llout_extensions\x18\x01 \x03(\x0b\x32\x30.google.ads.googleads.v25.common.CalloutFeedItem\x1a\x61\n\x17\x43\x61llExtensionParameters\x12\x46\n\x0f\x63\x61ll_extensions\x18\x01 \x03(\x0b\x32-.google.ads.googleads.v25.common.CallFeedItem\x1am\n\x1bSitelinkExtensionParameters\x12N\n\x13sitelink_extensions\x18\x01 \x03(\x0b\x32\x31.google.ads.googleads.v25.common.SitelinkFeedItem\x1a\x98\x01\n\x16\x43\x61lloutAssetParameters\x12~\n\x19\x61\x64_asset_apply_parameters\x18\x01 \x01(\x0b\x32V.google.ads.googleads.v25.services.ApplyRecommendationOperation.AdAssetApplyParametersB\x03\xe0\x41\x02\x1a\x95\x01\n\x13\x43\x61llAssetParameters\x12~\n\x19\x61\x64_asset_apply_parameters\x18\x01 \x01(\x0b\x32V.google.ads.googleads.v25.services.ApplyRecommendationOperation.AdAssetApplyParametersB\x03\xe0\x41\x02\x1a\x99\x01\n\x17SitelinkAssetParameters\x12~\n\x19\x61\x64_asset_apply_parameters\x18\x01 \x01(\x0b\x32V.google.ads.googleads.v25.services.ApplyRecommendationOperation.AdAssetApplyParametersB\x03\xe0\x41\x02\x1a>\n\x18RaiseTargetCpaParameters\x12\"\n\x15target_cpa_multiplier\x18\x01 \x01(\x01\x42\x03\xe0\x41\x02\x1a@\n\x19LowerTargetRoasParameters\x12#\n\x16target_roas_multiplier\x18\x01 \x01(\x01\x42\x03\xe0\x41\x02\x1a\xaf\x02\n\x16\x41\x64\x41ssetApplyParameters\x12=\n\nnew_assets\x18\x01 \x03(\x0b\x32).google.ads.googleads.v25.resources.Asset\x12\x17\n\x0f\x65xisting_assets\x18\x02 \x03(\t\x12u\n\x05scope\x18\x03 \x01(\x0e\x32\x61.google.ads.googleads.v25.services.ApplyRecommendationOperation.AdAssetApplyParameters.ApplyScopeB\x03\xe0\x41\x02\"F\n\nApplyScope\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x0b\n\x07UNKNOWN\x10\x01\x12\x0c\n\x08\x43USTOMER\x10\x02\x12\x0c\n\x08\x43\x41MPAIGN\x10\x03\x1aZ\n\x1aMoveUnusedBudgetParameters\x12\"\n\x15\x62udget_micros_to_move\x18\x02 \x01(\x03H\x00\x88\x01\x01\x42\x18\n\x16_budget_micros_to_move\x1a_\n!ResponsiveSearchAdAssetParameters\x12:\n\nupdated_ad\x18\x01 \x01(\x0b\x32&.google.ads.googleads.v25.resources.Ad\x1ak\n-ResponsiveSearchAdImproveAdStrengthParameters\x12:\n\nupdated_ad\x18\x01 \x01(\x0b\x32&.google.ads.googleads.v25.resources.Ad\x1aW\n\x1cResponsiveSearchAdParameters\x12\x37\n\x02\x61\x64\x18\x01 \x01(\x0b\x32&.google.ads.googleads.v25.resources.AdB\x03\xe0\x41\x02\x1a\x43\n!RaiseTargetCpaBidTooLowParameters\x12\x1e\n\x11target_multiplier\x18\x01 \x01(\x01\x42\x03\xe0\x41\x02\x1a\x64\n\x1eUseBroadMatchKeywordParameters\x12%\n\x18new_budget_amount_micros\x18\x01 \x01(\x03H\x00\x88\x01\x01\x42\x1b\n\x19_new_budget_amount_micros\x1a\xa7\x01\n!ForecastingSetTargetCpaParameters\x12\x1e\n\x11target_cpa_micros\x18\x01 \x01(\x03H\x00\x88\x01\x01\x12*\n\x1d\x63\x61mpaign_budget_amount_micros\x18\x02 \x01(\x03H\x01\x88\x01\x01\x42\x14\n\x12_target_cpa_microsB \n\x1e_campaign_budget_amount_micros\x1a\xfd\x01\n\x17LeadFormAssetParameters\x12~\n\x19\x61\x64_asset_apply_parameters\x18\x01 \x01(\x0b\x32V.google.ads.googleads.v25.services.ApplyRecommendationOperation.AdAssetApplyParametersB\x03\xe0\x41\x02\x12\x35\n(set_submit_lead_form_asset_campaign_goal\x18\x02 \x01(\x08H\x00\x88\x01\x01\x42+\n)_set_submit_lead_form_asset_campaign_goalB\x12\n\x10\x61pply_parameters\"\x9f\x01\n\x1b\x41pplyRecommendationResponse\x12M\n\x07results\x18\x01 \x03(\x0b\x32<.google.ads.googleads.v25.services.ApplyRecommendationResult\x12\x31\n\x15partial_failure_error\x18\x02 \x01(\x0b\x32\x12.google.rpc.Status\"`\n\x19\x41pplyRecommendationResult\x12\x43\n\rresource_name\x18\x01 \x01(\tB,\xfa\x41)\n\'googleads.googleapis.com/Recommendation\"\x83\x02\n\x1c\x44ismissRecommendationRequest\x12\x18\n\x0b\x63ustomer_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12w\n\noperations\x18\x03 \x03(\x0b\x32^.google.ads.googleads.v25.services.DismissRecommendationRequest.DismissRecommendationOperationB\x03\xe0\x41\x02\x12\x17\n\x0fpartial_failure\x18\x02 \x01(\x08\x1a\x37\n\x1e\x44ismissRecommendationOperation\x12\x15\n\rresource_name\x18\x01 \x01(\t\"\xf7\x01\n\x1d\x44ismissRecommendationResponse\x12m\n\x07results\x18\x01 \x03(\x0b\x32\\.google.ads.googleads.v25.services.DismissRecommendationResponse.DismissRecommendationResult\x12\x31\n\x15partial_failure_error\x18\x02 \x01(\x0b\x32\x12.google.rpc.Status\x1a\x34\n\x1b\x44ismissRecommendationResult\x12\x15\n\rresource_name\x18\x01 \x01(\t\"\x8d\x16\n\x1eGenerateRecommendationsRequest\x12\x18\n\x0b\x63ustomer_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12l\n\x14recommendation_types\x18\x02 \x03(\x0e\x32I.google.ads.googleads.v25.enums.RecommendationTypeEnum.RecommendationTypeB\x03\xe0\x41\x02\x12x\n\x18\x61\x64vertising_channel_type\x18\x03 \x01(\x0e\x32Q.google.ads.googleads.v25.enums.AdvertisingChannelTypeEnum.AdvertisingChannelTypeB\x03\xe0\x41\x02\x12)\n\x17\x63\x61mpaign_sitelink_count\x18\x04 \x01(\x05\x42\x03\xe0\x41\x01H\x00\x88\x01\x01\x12\x83\x01\n\x1a\x63onversion_tracking_status\x18\x05 \x01(\x0e\x32U.google.ads.googleads.v25.enums.ConversionTrackingStatusEnum.ConversionTrackingStatusB\x03\xe0\x41\x01H\x01\x88\x01\x01\x12m\n\x0c\x62idding_info\x18\x06 \x01(\x0b\x32M.google.ads.googleads.v25.services.GenerateRecommendationsRequest.BiddingInfoB\x03\xe0\x41\x01H\x02\x88\x01\x01\x12i\n\rad_group_info\x18\x07 \x03(\x0b\x32M.google.ads.googleads.v25.services.GenerateRecommendationsRequest.AdGroupInfoB\x03\xe0\x41\x01\x12g\n\tseed_info\x18\x08 \x01(\x0b\x32J.google.ads.googleads.v25.services.GenerateRecommendationsRequest.SeedInfoB\x03\xe0\x41\x01H\x03\x88\x01\x01\x12k\n\x0b\x62udget_info\x18\t \x01(\x0b\x32L.google.ads.googleads.v25.services.GenerateRecommendationsRequest.BudgetInfoB\x03\xe0\x41\x01H\x04\x88\x01\x01\x12,\n\x1a\x63\x61mpaign_image_asset_count\x18\n \x01(\x05\x42\x03\xe0\x41\x01H\x05\x88\x01\x01\x12+\n\x19\x63\x61mpaign_call_asset_count\x18\x0b \x01(\x05\x42\x03\xe0\x41\x01H\x06\x88\x01\x01\x12\x1a\n\rcountry_codes\x18\r \x03(\tB\x03\xe0\x41\x01\x12\x1b\n\x0elanguage_codes\x18\x0e \x03(\tB\x03\xe0\x41\x01\x12#\n\x16positive_locations_ids\x18\x0f \x03(\x03\x42\x03\xe0\x41\x01\x12#\n\x16negative_locations_ids\x18\x10 \x03(\x03\x42\x03\xe0\x41\x01\x12o\n\x10\x61sset_group_info\x18\x11 \x03(\x0b\x32P.google.ads.googleads.v25.services.GenerateRecommendationsRequest.AssetGroupInfoB\x03\xe0\x41\x01\x12/\n\x1dtarget_partner_search_network\x18\x12 \x01(\x08\x42\x03\xe0\x41\x01H\x07\x88\x01\x01\x12(\n\x16target_content_network\x18\x13 \x01(\x08\x42\x03\xe0\x41\x01H\x08\x88\x01\x01\x12,\n\x1amerchant_center_account_id\x18\x14 \x01(\x03\x42\x03\xe0\x41\x01H\t\x88\x01\x01\x12!\n\x0fis_new_customer\x18\x15 \x01(\x08\x42\x03\xe0\x41\x01H\n\x88\x01\x01\x1a\xf7\x02\n\x0b\x42iddingInfo\x12o\n\x15\x62idding_strategy_type\x18\x01 \x01(\x0e\x32K.google.ads.googleads.v25.enums.BiddingStrategyTypeEnum.BiddingStrategyTypeH\x01\x88\x01\x01\x12\x1b\n\x11target_cpa_micros\x18\x02 \x01(\x03H\x00\x12\x15\n\x0btarget_roas\x18\x03 \x01(\x01H\x00\x12\x88\x01\n\x1ctarget_impression_share_info\x18\x04 \x01(\x0b\x32[.google.ads.googleads.v25.services.GenerateRecommendationsRequest.TargetImpressionShareInfoB\x03\xe0\x41\x01H\x00\x42\x1e\n\x1c\x62idding_strategy_target_infoB\x18\n\x16_bidding_strategy_type\x1a\xc2\x01\n\x0b\x41\x64GroupInfo\x12\\\n\rad_group_type\x18\x01 \x01(\x0e\x32;.google.ads.googleads.v25.enums.AdGroupTypeEnum.AdGroupTypeB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12\x43\n\x08keywords\x18\x02 \x03(\x0b\x32,.google.ads.googleads.v25.common.KeywordInfoB\x03\xe0\x41\x01\x42\x10\n\x0e_ad_group_type\x1aJ\n\x08SeedInfo\x12\x15\n\x08url_seed\x18\x02 \x01(\tH\x00\x88\x01\x01\x12\x1a\n\rkeyword_seeds\x18\x03 \x03(\tB\x03\xe0\x41\x01\x42\x0b\n\t_url_seed\x1a\x41\n\nBudgetInfo\x12 \n\x0e\x63urrent_budget\x18\x01 \x01(\x03\x42\x03\xe0\x41\x02H\x00\x88\x01\x01\x42\x11\n\x0f_current_budget\x1al\n\x0e\x41ssetGroupInfo\x12\x1b\n\tfinal_url\x18\x01 \x01(\tB\x03\xe0\x41\x02H\x00\x88\x01\x01\x12\x15\n\x08headline\x18\x02 \x03(\tB\x03\xe0\x41\x01\x12\x18\n\x0b\x64\x65scription\x18\x03 \x03(\tB\x03\xe0\x41\x01\x42\x0c\n\n_final_url\x1a\xb9\x02\n\x19TargetImpressionShareInfo\x12{\n\x08location\x18\x01 \x01(\x0e\x32_.google.ads.googleads.v25.enums.TargetImpressionShareLocationEnum.TargetImpressionShareLocationB\x03\xe0\x41\x02H\x00\x88\x01\x01\x12\x30\n\x1etarget_impression_share_micros\x18\x02 \x01(\x03\x42\x03\xe0\x41\x02H\x01\x88\x01\x01\x12%\n\x13max_cpc_bid_ceiling\x18\x03 \x01(\x03\x42\x03\xe0\x41\x01H\x02\x88\x01\x01\x42\x0b\n\t_locationB!\n\x1f_target_impression_share_microsB\x16\n\x14_max_cpc_bid_ceilingB\x1a\n\x18_campaign_sitelink_countB\x1d\n\x1b_conversion_tracking_statusB\x0f\n\r_bidding_infoB\x0c\n\n_seed_infoB\x0e\n\x0c_budget_infoB\x1d\n\x1b_campaign_image_asset_countB\x1c\n\x1a_campaign_call_asset_countB \n\x1e_target_partner_search_networkB\x19\n\x17_target_content_networkB\x1d\n\x1b_merchant_center_account_idB\x12\n\x10_is_new_customer\"n\n\x1fGenerateRecommendationsResponse\x12K\n\x0frecommendations\x18\x01 \x03(\x0b\x32\x32.google.ads.googleads.v25.resources.Recommendation2\xeb\x06\n\x15RecommendationService\x12\xee\x01\n\x13\x41pplyRecommendation\x12=.google.ads.googleads.v25.services.ApplyRecommendationRequest\x1a>.google.ads.googleads.v25.services.ApplyRecommendationResponse\"X\xda\x41\x16\x63ustomer_id,operations\x82\xd3\xe4\x93\x02\x39\"4/v25/customers/{customer_id=*}/recommendations:apply:\x01*\x12\xf6\x01\n\x15\x44ismissRecommendation\x12?.google.ads.googleads.v25.services.DismissRecommendationRequest\x1a@.google.ads.googleads.v25.services.DismissRecommendationResponse\"Z\xda\x41\x16\x63ustomer_id,operations\x82\xd3\xe4\x93\x02;\"6/v25/customers/{customer_id=*}/recommendations:dismiss:\x01*\x12\xa0\x02\n\x17GenerateRecommendations\x12\x41.google.ads.googleads.v25.services.GenerateRecommendationsRequest\x1a\x42.google.ads.googleads.v25.services.GenerateRecommendationsResponse\"~\xda\x41\x39\x63ustomer_id,recommendation_types,advertising_channel_type\x82\xd3\xe4\x93\x02<\"7/v25/customers/{customer_id=*}/recommendations:generate:\x01*\x1a\x45\xca\x41\x18googleads.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/adwordsB\x86\x02\n%com.google.ads.googleads.v25.servicesB\x1aRecommendationServiceProtoP\x01ZIgoogle.golang.org/genproto/googleapis/ads/googleads/v25/services;services\xa2\x02\x03GAA\xaa\x02!Google.Ads.GoogleAds.V25.Services\xca\x02!Google\\Ads\\GoogleAds\\V25\\Services\xea\x02%Google::Ads::GoogleAds::V25::Servicesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Services + ApplyRecommendationRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.ApplyRecommendationRequest").msgclass + ApplyRecommendationOperation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.ApplyRecommendationOperation").msgclass + ApplyRecommendationOperation::CampaignBudgetParameters = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.ApplyRecommendationOperation.CampaignBudgetParameters").msgclass + ApplyRecommendationOperation::ForecastingSetTargetRoasParameters = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.ApplyRecommendationOperation.ForecastingSetTargetRoasParameters").msgclass + ApplyRecommendationOperation::TextAdParameters = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.ApplyRecommendationOperation.TextAdParameters").msgclass + ApplyRecommendationOperation::KeywordParameters = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.ApplyRecommendationOperation.KeywordParameters").msgclass + ApplyRecommendationOperation::TargetCpaOptInParameters = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.ApplyRecommendationOperation.TargetCpaOptInParameters").msgclass + ApplyRecommendationOperation::TargetRoasOptInParameters = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.ApplyRecommendationOperation.TargetRoasOptInParameters").msgclass + ApplyRecommendationOperation::CalloutExtensionParameters = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.ApplyRecommendationOperation.CalloutExtensionParameters").msgclass + ApplyRecommendationOperation::CallExtensionParameters = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.ApplyRecommendationOperation.CallExtensionParameters").msgclass + ApplyRecommendationOperation::SitelinkExtensionParameters = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.ApplyRecommendationOperation.SitelinkExtensionParameters").msgclass + ApplyRecommendationOperation::CalloutAssetParameters = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.ApplyRecommendationOperation.CalloutAssetParameters").msgclass + ApplyRecommendationOperation::CallAssetParameters = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.ApplyRecommendationOperation.CallAssetParameters").msgclass + ApplyRecommendationOperation::SitelinkAssetParameters = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.ApplyRecommendationOperation.SitelinkAssetParameters").msgclass + ApplyRecommendationOperation::RaiseTargetCpaParameters = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.ApplyRecommendationOperation.RaiseTargetCpaParameters").msgclass + ApplyRecommendationOperation::LowerTargetRoasParameters = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.ApplyRecommendationOperation.LowerTargetRoasParameters").msgclass + ApplyRecommendationOperation::AdAssetApplyParameters = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.ApplyRecommendationOperation.AdAssetApplyParameters").msgclass + ApplyRecommendationOperation::AdAssetApplyParameters::ApplyScope = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.ApplyRecommendationOperation.AdAssetApplyParameters.ApplyScope").enummodule + ApplyRecommendationOperation::MoveUnusedBudgetParameters = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.ApplyRecommendationOperation.MoveUnusedBudgetParameters").msgclass + ApplyRecommendationOperation::ResponsiveSearchAdAssetParameters = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.ApplyRecommendationOperation.ResponsiveSearchAdAssetParameters").msgclass + ApplyRecommendationOperation::ResponsiveSearchAdImproveAdStrengthParameters = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.ApplyRecommendationOperation.ResponsiveSearchAdImproveAdStrengthParameters").msgclass + ApplyRecommendationOperation::ResponsiveSearchAdParameters = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.ApplyRecommendationOperation.ResponsiveSearchAdParameters").msgclass + ApplyRecommendationOperation::RaiseTargetCpaBidTooLowParameters = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.ApplyRecommendationOperation.RaiseTargetCpaBidTooLowParameters").msgclass + ApplyRecommendationOperation::UseBroadMatchKeywordParameters = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.ApplyRecommendationOperation.UseBroadMatchKeywordParameters").msgclass + ApplyRecommendationOperation::ForecastingSetTargetCpaParameters = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.ApplyRecommendationOperation.ForecastingSetTargetCpaParameters").msgclass + ApplyRecommendationOperation::LeadFormAssetParameters = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.ApplyRecommendationOperation.LeadFormAssetParameters").msgclass + ApplyRecommendationResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.ApplyRecommendationResponse").msgclass + ApplyRecommendationResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.ApplyRecommendationResult").msgclass + DismissRecommendationRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.DismissRecommendationRequest").msgclass + DismissRecommendationRequest::DismissRecommendationOperation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.DismissRecommendationRequest.DismissRecommendationOperation").msgclass + DismissRecommendationResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.DismissRecommendationResponse").msgclass + DismissRecommendationResponse::DismissRecommendationResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.DismissRecommendationResponse.DismissRecommendationResult").msgclass + GenerateRecommendationsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.GenerateRecommendationsRequest").msgclass + GenerateRecommendationsRequest::BiddingInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.GenerateRecommendationsRequest.BiddingInfo").msgclass + GenerateRecommendationsRequest::AdGroupInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.GenerateRecommendationsRequest.AdGroupInfo").msgclass + GenerateRecommendationsRequest::SeedInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.GenerateRecommendationsRequest.SeedInfo").msgclass + GenerateRecommendationsRequest::BudgetInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.GenerateRecommendationsRequest.BudgetInfo").msgclass + GenerateRecommendationsRequest::AssetGroupInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.GenerateRecommendationsRequest.AssetGroupInfo").msgclass + GenerateRecommendationsRequest::TargetImpressionShareInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.GenerateRecommendationsRequest.TargetImpressionShareInfo").msgclass + GenerateRecommendationsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.GenerateRecommendationsResponse").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/recommendation_service_services_pb.rb b/lib/google/ads/google_ads/v25/services/recommendation_service_services_pb.rb new file mode 100644 index 000000000..ec36abd8d --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/recommendation_service_services_pb.rb @@ -0,0 +1,84 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/ads/googleads/v25/services/recommendation_service.proto for package 'Google.Ads.GoogleAds.V25.Services' +# Original file comments: +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +require 'grpc' +require 'google/ads/google_ads/v25/services/recommendation_service_pb' + +module Google + module Ads + module GoogleAds + module V25 + module Services + module RecommendationService + # Proto file describing the Recommendation service. + # + # Service to manage recommendations. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.ads.googleads.v25.services.RecommendationService' + + # Applies given recommendations with corresponding apply parameters. + # + # List of thrown errors: + # [AuthenticationError]() + # [AuthorizationError]() + # [DatabaseError]() + # [FieldError]() + # [HeaderError]() + # [InternalError]() + # [MutateError]() + # [QuotaError]() + # [RecommendationError]() + # [RequestError]() + # [UrlFieldError]() + rpc :ApplyRecommendation, ::Google::Ads::GoogleAds::V25::Services::ApplyRecommendationRequest, ::Google::Ads::GoogleAds::V25::Services::ApplyRecommendationResponse + # Dismisses given recommendations. + # + # List of thrown errors: + # [AuthenticationError]() + # [AuthorizationError]() + # [HeaderError]() + # [InternalError]() + # [QuotaError]() + # [RecommendationError]() + # [RequestError]() + rpc :DismissRecommendation, ::Google::Ads::GoogleAds::V25::Services::DismissRecommendationRequest, ::Google::Ads::GoogleAds::V25::Services::DismissRecommendationResponse + # Generates Recommendations based off the requested recommendation_types. + # + # List of thrown errors: + # [AuthenticationError]() + # [AuthorizationError]() + # [HeaderError]() + # [InternalError]() + # [QuotaError]() + # [RecommendationError]() + # [RequestError]() + rpc :GenerateRecommendations, ::Google::Ads::GoogleAds::V25::Services::GenerateRecommendationsRequest, ::Google::Ads::GoogleAds::V25::Services::GenerateRecommendationsResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/recommendation_subscription_service.rb b/lib/google/ads/google_ads/v25/services/recommendation_subscription_service.rb new file mode 100644 index 000000000..54de55736 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/recommendation_subscription_service.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/ads/google_ads/version" + +require "google/ads/google_ads/v25/services/recommendation_subscription_service/credentials" +require "google/ads/google_ads/v25/services/recommendation_subscription_service/paths" +require "google/ads/google_ads/v25/services/recommendation_subscription_service/client" + +module Google + module Ads + module GoogleAds + module V25 + module Services + ## + # Service to manage recommendation subscriptions. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/ads/google_ads/v25/services/recommendation_subscription_service" + # client = ::Google::Ads::GoogleAds::V25::Services::RecommendationSubscriptionService::Client.new + # + module RecommendationSubscriptionService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "recommendation_subscription_service", "helpers.rb" +require "google/ads/google_ads/v25/services/recommendation_subscription_service/helpers" if ::File.file? helper_path diff --git a/lib/google/ads/google_ads/v25/services/recommendation_subscription_service/client.rb b/lib/google/ads/google_ads/v25/services/recommendation_subscription_service/client.rb new file mode 100644 index 000000000..794d7b84d --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/recommendation_subscription_service/client.rb @@ -0,0 +1,507 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# require "google/ads/google_ads/error" +require "google/ads/google_ads/v25/services/recommendation_subscription_service_pb" + +module Google + module Ads + module GoogleAds + module V25 + module Services + module RecommendationSubscriptionService + ## + # Client for the RecommendationSubscriptionService service. + # + # Service to manage recommendation subscriptions. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "googleads.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :recommendation_subscription_service_stub + + ## + # Configure the RecommendationSubscriptionService Client class. + # + # See {::Google::Ads::GoogleAds::V25::Services::RecommendationSubscriptionService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all RecommendationSubscriptionService clients + # ::Google::Ads::GoogleAds::V25::Services::RecommendationSubscriptionService::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + default_config = Client::Configuration.new + + default_config.timeout = 14_400.0 + default_config.retry_policy = { + initial_delay: 5.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the RecommendationSubscriptionService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Ads::GoogleAds::V25::Services::RecommendationSubscriptionService::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @recommendation_subscription_service_stub.universe_domain + end + + ## + # Create a new RecommendationSubscriptionService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Ads::GoogleAds::V25::Services::RecommendationSubscriptionService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Ads::GoogleAds::V25::Services::RecommendationSubscriptionService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the RecommendationSubscriptionService client. + # @yieldparam config [Client::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/ads/google_ads/v25/services/recommendation_subscription_service_services_pb" + + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @recommendation_subscription_service_stub = ::Gapic::ServiceStub.new( + ::Google::Ads::GoogleAds::V25::Services::RecommendationSubscriptionService::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool, + logger: @config.logger + ) + + @recommendation_subscription_service_stub.stub_logger&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @recommendation_subscription_service_stub.logger + end + + # Service calls + + ## + # Mutates given subscription with corresponding apply parameters. + # + # List of thrown errors: + # [AuthenticationError]() + # [AuthorizationError]() + # [DatabaseError]() + # [FieldError]() + # [HeaderError]() + # [InternalError]() + # [MutateError]() + # [QuotaError]() + # [RecommendationError]() + # [RecommendationSubscriptionError]() + # [RequestError]() + # [UrlFieldError]() + # + # @overload mutate_recommendation_subscription(request, options = nil) + # Pass arguments to `mutate_recommendation_subscription` via a request object, either of type + # {::Google::Ads::GoogleAds::V25::Services::MutateRecommendationSubscriptionRequest} or an equivalent Hash. + # + # @param request [::Google::Ads::GoogleAds::V25::Services::MutateRecommendationSubscriptionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload mutate_recommendation_subscription(customer_id: nil, operations: nil, partial_failure: nil, validate_only: nil, response_content_type: nil) + # Pass arguments to `mutate_recommendation_subscription` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param customer_id [::String] + # Required. The ID of the subscribing customer. + # @param operations [::Array<::Google::Ads::GoogleAds::V25::Services::RecommendationSubscriptionOperation, ::Hash>] + # Required. The list of create or update operations. + # @param partial_failure [::Boolean] + # 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. + # @param validate_only [::Boolean] + # If true, the request is validated but not executed. Only errors are + # returned, not results. + # @param response_content_type [::Google::Ads::GoogleAds::V25::Enums::ResponseContentTypeEnum::ResponseContentType] + # The response content type setting. Determines whether the mutable resource + # or just the resource name should be returned post mutation. The mutable + # resource will only be returned if the resource has the appropriate response + # field. For example, MutateCampaignResult.campaign. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Ads::GoogleAds::V25::Services::MutateRecommendationSubscriptionResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Ads::GoogleAds::V25::Services::MutateRecommendationSubscriptionResponse] + # + # @raise [Google::Ads::GoogleAds::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/ads/google_ads/v25/services" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Ads::GoogleAds::V25::Services::RecommendationSubscriptionService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Ads::GoogleAds::V25::Services::MutateRecommendationSubscriptionRequest.new + # + # # Call the mutate_recommendation_subscription method. + # result = client.mutate_recommendation_subscription request + # + # # The returned object is of type Google::Ads::GoogleAds::V25::Services::MutateRecommendationSubscriptionResponse. + # p result + # + def mutate_recommendation_subscription request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::GoogleAds::V25::Services::MutateRecommendationSubscriptionRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.mutate_recommendation_subscription.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Ads::GoogleAds::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.customer_id + header_params["customer_id"] = request.customer_id + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.mutate_recommendation_subscription.timeout, + metadata: metadata, + retry_policy: @config.rpcs.mutate_recommendation_subscription.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @recommendation_subscription_service_stub.call_rpc :mutate_recommendation_subscription, request, + options: options do |response, operation| + yield response, operation if block_given? + end + # rescue GRPC::BadStatus => grpc_error + # raise Google::Ads::GoogleAds::Error.new grpc_error.message + end + + ## + # Configuration class for the RecommendationSubscriptionService API. + # + # This class represents the configuration for RecommendationSubscriptionService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Ads::GoogleAds::V25::Services::RecommendationSubscriptionService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # mutate_recommendation_subscription to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Ads::GoogleAds::V25::Services::RecommendationSubscriptionService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.mutate_recommendation_subscription.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Ads::GoogleAds::V25::Services::RecommendationSubscriptionService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.mutate_recommendation_subscription.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Ads::GoogleAds::V25::Services::RecommendationSubscriptionService::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "googleads.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, + ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the RecommendationSubscriptionService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `mutate_recommendation_subscription` + # @return [::Gapic::Config::Method] + # + attr_reader :mutate_recommendation_subscription + + # @private + def initialize parent_rpcs = nil + mutate_recommendation_subscription_config = parent_rpcs.mutate_recommendation_subscription if parent_rpcs.respond_to? :mutate_recommendation_subscription + @mutate_recommendation_subscription = ::Gapic::Config::Method.new mutate_recommendation_subscription_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/recommendation_subscription_service/credentials.rb b/lib/google/ads/google_ads/v25/services/recommendation_subscription_service/credentials.rb new file mode 100644 index 000000000..5eec6b3ad --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/recommendation_subscription_service/credentials.rb @@ -0,0 +1,38 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Ads + module GoogleAds + module V25 + module Services + module RecommendationSubscriptionService + # Credentials for the RecommendationSubscriptionService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/adwords" + ] + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/recommendation_subscription_service/paths.rb b/lib/google/ads/google_ads/v25/services/recommendation_subscription_service/paths.rb new file mode 100644 index 000000000..89801779d --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/recommendation_subscription_service/paths.rb @@ -0,0 +1,52 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Ads + module GoogleAds + module V25 + module Services + module RecommendationSubscriptionService + # Path helper methods for the RecommendationSubscriptionService API. + module Paths + ## + # Create a fully-qualified RecommendationSubscription resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/recommendationSubscriptions/{recommendation_type}` + # + # @param customer_id [String] + # @param recommendation_type [String] + # + # @return [::String] + def recommendation_subscription_path customer_id:, recommendation_type: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/recommendationSubscriptions/#{recommendation_type}" + end + + extend self + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/recommendation_subscription_service_pb.rb b/lib/google/ads/google_ads/v25/services/recommendation_subscription_service_pb.rb new file mode 100644 index 000000000..4bf4fcf14 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/recommendation_subscription_service_pb.rb @@ -0,0 +1,35 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/services/recommendation_subscription_service.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/enums/response_content_type_pb' +require 'google/ads/google_ads/v25/resources/recommendation_subscription_pb' +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/field_mask_pb' +require 'google/rpc/status_pb' + + +descriptor_data = "\nKgoogle/ads/googleads/v25/services/recommendation_subscription_service.proto\x12!google.ads.googleads.v25.services\x1a:google/ads/googleads/v25/enums/response_content_type.proto\x1a\x44google/ads/googleads/v25/resources/recommendation_subscription.proto\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\x1a\x17google/rpc/status.proto\"\xc0\x02\n\'MutateRecommendationSubscriptionRequest\x12\x18\n\x0b\x63ustomer_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12_\n\noperations\x18\x02 \x03(\x0b\x32\x46.google.ads.googleads.v25.services.RecommendationSubscriptionOperationB\x03\xe0\x41\x02\x12\x17\n\x0fpartial_failure\x18\x03 \x01(\x08\x12\x15\n\rvalidate_only\x18\x04 \x01(\x08\x12j\n\x15response_content_type\x18\x05 \x01(\x0e\x32K.google.ads.googleads.v25.enums.ResponseContentTypeEnum.ResponseContentType\"\x8c\x02\n#RecommendationSubscriptionOperation\x12\x34\n\x0bupdate_mask\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\x12P\n\x06\x63reate\x18\x01 \x01(\x0b\x32>.google.ads.googleads.v25.resources.RecommendationSubscriptionH\x00\x12P\n\x06update\x18\x02 \x01(\x0b\x32>.google.ads.googleads.v25.resources.RecommendationSubscriptionH\x00\x42\x0b\n\toperation\"\xb9\x01\n(MutateRecommendationSubscriptionResponse\x12Z\n\x07results\x18\x01 \x03(\x0b\x32I.google.ads.googleads.v25.services.MutateRecommendationSubscriptionResult\x12\x31\n\x15partial_failure_error\x18\x02 \x01(\x0b\x32\x12.google.rpc.Status\"\xde\x01\n&MutateRecommendationSubscriptionResult\x12O\n\rresource_name\x18\x01 \x01(\tB8\xfa\x41\x35\n3googleads.googleapis.com/RecommendationSubscription\x12\x63\n\x1brecommendation_subscription\x18\x02 \x01(\x0b\x32>.google.ads.googleads.v25.resources.RecommendationSubscription2\xa9\x03\n!RecommendationSubscriptionService\x12\xbc\x02\n MutateRecommendationSubscription\x12J.google.ads.googleads.v25.services.MutateRecommendationSubscriptionRequest\x1aK.google.ads.googleads.v25.services.MutateRecommendationSubscriptionResponse\"\x7f\xda\x41\x16\x63ustomer_id,operations\x82\xd3\xe4\x93\x02`\"[/v25/customers/{customer_id=*}/recommendationSubscriptions:mutateRecommendationSubscription:\x01*\x1a\x45\xca\x41\x18googleads.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/adwordsB\x92\x02\n%com.google.ads.googleads.v25.servicesB&RecommendationSubscriptionServiceProtoP\x01ZIgoogle.golang.org/genproto/googleapis/ads/googleads/v25/services;services\xa2\x02\x03GAA\xaa\x02!Google.Ads.GoogleAds.V25.Services\xca\x02!Google\\Ads\\GoogleAds\\V25\\Services\xea\x02%Google::Ads::GoogleAds::V25::Servicesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Services + MutateRecommendationSubscriptionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.MutateRecommendationSubscriptionRequest").msgclass + RecommendationSubscriptionOperation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.RecommendationSubscriptionOperation").msgclass + MutateRecommendationSubscriptionResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.MutateRecommendationSubscriptionResponse").msgclass + MutateRecommendationSubscriptionResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.MutateRecommendationSubscriptionResult").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/recommendation_subscription_service_services_pb.rb b/lib/google/ads/google_ads/v25/services/recommendation_subscription_service_services_pb.rb new file mode 100644 index 000000000..c3f042392 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/recommendation_subscription_service_services_pb.rb @@ -0,0 +1,63 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/ads/googleads/v25/services/recommendation_subscription_service.proto for package 'Google.Ads.GoogleAds.V25.Services' +# Original file comments: +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +require 'grpc' +require 'google/ads/google_ads/v25/services/recommendation_subscription_service_pb' + +module Google + module Ads + module GoogleAds + module V25 + module Services + module RecommendationSubscriptionService + # Proto file describing the Recommendation service. + # + # Service to manage recommendation subscriptions. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.ads.googleads.v25.services.RecommendationSubscriptionService' + + # Mutates given subscription with corresponding apply parameters. + # + # List of thrown errors: + # [AuthenticationError]() + # [AuthorizationError]() + # [DatabaseError]() + # [FieldError]() + # [HeaderError]() + # [InternalError]() + # [MutateError]() + # [QuotaError]() + # [RecommendationError]() + # [RecommendationSubscriptionError]() + # [RequestError]() + # [UrlFieldError]() + rpc :MutateRecommendationSubscription, ::Google::Ads::GoogleAds::V25::Services::MutateRecommendationSubscriptionRequest, ::Google::Ads::GoogleAds::V25::Services::MutateRecommendationSubscriptionResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/remarketing_action_service.rb b/lib/google/ads/google_ads/v25/services/remarketing_action_service.rb new file mode 100644 index 000000000..452b79ffe --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/remarketing_action_service.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/ads/google_ads/version" + +require "google/ads/google_ads/v25/services/remarketing_action_service/credentials" +require "google/ads/google_ads/v25/services/remarketing_action_service/paths" +require "google/ads/google_ads/v25/services/remarketing_action_service/client" + +module Google + module Ads + module GoogleAds + module V25 + module Services + ## + # Service to manage remarketing actions. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/ads/google_ads/v25/services/remarketing_action_service" + # client = ::Google::Ads::GoogleAds::V25::Services::RemarketingActionService::Client.new + # + module RemarketingActionService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "remarketing_action_service", "helpers.rb" +require "google/ads/google_ads/v25/services/remarketing_action_service/helpers" if ::File.file? helper_path diff --git a/lib/google/ads/google_ads/v25/services/remarketing_action_service/client.rb b/lib/google/ads/google_ads/v25/services/remarketing_action_service/client.rb new file mode 100644 index 000000000..da7ed32ec --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/remarketing_action_service/client.rb @@ -0,0 +1,499 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# require "google/ads/google_ads/error" +require "google/ads/google_ads/v25/services/remarketing_action_service_pb" + +module Google + module Ads + module GoogleAds + module V25 + module Services + module RemarketingActionService + ## + # Client for the RemarketingActionService service. + # + # Service to manage remarketing actions. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "googleads.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :remarketing_action_service_stub + + ## + # Configure the RemarketingActionService Client class. + # + # See {::Google::Ads::GoogleAds::V25::Services::RemarketingActionService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all RemarketingActionService clients + # ::Google::Ads::GoogleAds::V25::Services::RemarketingActionService::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + default_config = Client::Configuration.new + + default_config.timeout = 14_400.0 + default_config.retry_policy = { + initial_delay: 5.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the RemarketingActionService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Ads::GoogleAds::V25::Services::RemarketingActionService::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @remarketing_action_service_stub.universe_domain + end + + ## + # Create a new RemarketingActionService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Ads::GoogleAds::V25::Services::RemarketingActionService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Ads::GoogleAds::V25::Services::RemarketingActionService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the RemarketingActionService client. + # @yieldparam config [Client::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/ads/google_ads/v25/services/remarketing_action_service_services_pb" + + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @remarketing_action_service_stub = ::Gapic::ServiceStub.new( + ::Google::Ads::GoogleAds::V25::Services::RemarketingActionService::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool, + logger: @config.logger + ) + + @remarketing_action_service_stub.stub_logger&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @remarketing_action_service_stub.logger + end + + # Service calls + + ## + # Creates or updates remarketing actions. Operation statuses are returned. + # + # List of thrown errors: + # [AuthenticationError]() + # [AuthorizationError]() + # [ConversionActionError]() + # [HeaderError]() + # [InternalError]() + # [QuotaError]() + # [RequestError]() + # + # @overload mutate_remarketing_actions(request, options = nil) + # Pass arguments to `mutate_remarketing_actions` via a request object, either of type + # {::Google::Ads::GoogleAds::V25::Services::MutateRemarketingActionsRequest} or an equivalent Hash. + # + # @param request [::Google::Ads::GoogleAds::V25::Services::MutateRemarketingActionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload mutate_remarketing_actions(customer_id: nil, operations: nil, partial_failure: nil, validate_only: nil) + # Pass arguments to `mutate_remarketing_actions` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param customer_id [::String] + # Required. The ID of the customer whose remarketing actions are being + # modified. + # @param operations [::Array<::Google::Ads::GoogleAds::V25::Services::RemarketingActionOperation, ::Hash>] + # Required. The list of operations to perform on individual remarketing + # actions. + # @param partial_failure [::Boolean] + # 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. + # @param validate_only [::Boolean] + # If true, the request is validated but not executed. Only errors are + # returned, not results. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Ads::GoogleAds::V25::Services::MutateRemarketingActionsResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Ads::GoogleAds::V25::Services::MutateRemarketingActionsResponse] + # + # @raise [Google::Ads::GoogleAds::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/ads/google_ads/v25/services" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Ads::GoogleAds::V25::Services::RemarketingActionService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Ads::GoogleAds::V25::Services::MutateRemarketingActionsRequest.new + # + # # Call the mutate_remarketing_actions method. + # result = client.mutate_remarketing_actions request + # + # # The returned object is of type Google::Ads::GoogleAds::V25::Services::MutateRemarketingActionsResponse. + # p result + # + def mutate_remarketing_actions request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::GoogleAds::V25::Services::MutateRemarketingActionsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.mutate_remarketing_actions.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Ads::GoogleAds::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.customer_id + header_params["customer_id"] = request.customer_id + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.mutate_remarketing_actions.timeout, + metadata: metadata, + retry_policy: @config.rpcs.mutate_remarketing_actions.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @remarketing_action_service_stub.call_rpc :mutate_remarketing_actions, request, + options: options do |response, operation| + yield response, operation if block_given? + end + # rescue GRPC::BadStatus => grpc_error + # raise Google::Ads::GoogleAds::Error.new grpc_error.message + end + + ## + # Configuration class for the RemarketingActionService API. + # + # This class represents the configuration for RemarketingActionService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Ads::GoogleAds::V25::Services::RemarketingActionService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # mutate_remarketing_actions to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Ads::GoogleAds::V25::Services::RemarketingActionService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.mutate_remarketing_actions.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Ads::GoogleAds::V25::Services::RemarketingActionService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.mutate_remarketing_actions.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Ads::GoogleAds::V25::Services::RemarketingActionService::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "googleads.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, + ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the RemarketingActionService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `mutate_remarketing_actions` + # @return [::Gapic::Config::Method] + # + attr_reader :mutate_remarketing_actions + + # @private + def initialize parent_rpcs = nil + mutate_remarketing_actions_config = parent_rpcs.mutate_remarketing_actions if parent_rpcs.respond_to? :mutate_remarketing_actions + @mutate_remarketing_actions = ::Gapic::Config::Method.new mutate_remarketing_actions_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/remarketing_action_service/credentials.rb b/lib/google/ads/google_ads/v25/services/remarketing_action_service/credentials.rb new file mode 100644 index 000000000..894196209 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/remarketing_action_service/credentials.rb @@ -0,0 +1,38 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Ads + module GoogleAds + module V25 + module Services + module RemarketingActionService + # Credentials for the RemarketingActionService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/adwords" + ] + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/remarketing_action_service/paths.rb b/lib/google/ads/google_ads/v25/services/remarketing_action_service/paths.rb new file mode 100644 index 000000000..862202636 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/remarketing_action_service/paths.rb @@ -0,0 +1,52 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Ads + module GoogleAds + module V25 + module Services + module RemarketingActionService + # Path helper methods for the RemarketingActionService API. + module Paths + ## + # Create a fully-qualified RemarketingAction resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/remarketingActions/{remarketing_action_id}` + # + # @param customer_id [String] + # @param remarketing_action_id [String] + # + # @return [::String] + def remarketing_action_path customer_id:, remarketing_action_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/remarketingActions/#{remarketing_action_id}" + end + + extend self + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/remarketing_action_service_pb.rb b/lib/google/ads/google_ads/v25/services/remarketing_action_service_pb.rb new file mode 100644 index 000000000..7c777fd79 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/remarketing_action_service_pb.rb @@ -0,0 +1,34 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/services/remarketing_action_service.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/resources/remarketing_action_pb' +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/field_mask_pb' +require 'google/rpc/status_pb' + + +descriptor_data = "\nBgoogle/ads/googleads/v25/services/remarketing_action_service.proto\x12!google.ads.googleads.v25.services\x1a;google/ads/googleads/v25/resources/remarketing_action.proto\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\x1a\x17google/rpc/status.proto\"\xc3\x01\n\x1fMutateRemarketingActionsRequest\x12\x18\n\x0b\x63ustomer_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12V\n\noperations\x18\x02 \x03(\x0b\x32=.google.ads.googleads.v25.services.RemarketingActionOperationB\x03\xe0\x41\x02\x12\x17\n\x0fpartial_failure\x18\x03 \x01(\x08\x12\x15\n\rvalidate_only\x18\x04 \x01(\x08\"\xec\x01\n\x1aRemarketingActionOperation\x12/\n\x0bupdate_mask\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\x12G\n\x06\x63reate\x18\x01 \x01(\x0b\x32\x35.google.ads.googleads.v25.resources.RemarketingActionH\x00\x12G\n\x06update\x18\x02 \x01(\x0b\x32\x35.google.ads.googleads.v25.resources.RemarketingActionH\x00\x42\x0b\n\toperation\"\xa8\x01\n MutateRemarketingActionsResponse\x12\x31\n\x15partial_failure_error\x18\x03 \x01(\x0b\x32\x12.google.rpc.Status\x12Q\n\x07results\x18\x02 \x03(\x0b\x32@.google.ads.googleads.v25.services.MutateRemarketingActionResult\"g\n\x1dMutateRemarketingActionResult\x12\x46\n\rresource_name\x18\x01 \x01(\tB/\xfa\x41,\n*googleads.googleapis.com/RemarketingAction2\xe5\x02\n\x18RemarketingActionService\x12\x81\x02\n\x18MutateRemarketingActions\x12\x42.google.ads.googleads.v25.services.MutateRemarketingActionsRequest\x1a\x43.google.ads.googleads.v25.services.MutateRemarketingActionsResponse\"\\\xda\x41\x16\x63ustomer_id,operations\x82\xd3\xe4\x93\x02=\"8/v25/customers/{customer_id=*}/remarketingActions:mutate:\x01*\x1a\x45\xca\x41\x18googleads.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/adwordsB\x89\x02\n%com.google.ads.googleads.v25.servicesB\x1dRemarketingActionServiceProtoP\x01ZIgoogle.golang.org/genproto/googleapis/ads/googleads/v25/services;services\xa2\x02\x03GAA\xaa\x02!Google.Ads.GoogleAds.V25.Services\xca\x02!Google\\Ads\\GoogleAds\\V25\\Services\xea\x02%Google::Ads::GoogleAds::V25::Servicesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Services + MutateRemarketingActionsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.MutateRemarketingActionsRequest").msgclass + RemarketingActionOperation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.RemarketingActionOperation").msgclass + MutateRemarketingActionsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.MutateRemarketingActionsResponse").msgclass + MutateRemarketingActionResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.MutateRemarketingActionResult").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/remarketing_action_service_services_pb.rb b/lib/google/ads/google_ads/v25/services/remarketing_action_service_services_pb.rb new file mode 100644 index 000000000..f892c9aa3 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/remarketing_action_service_services_pb.rb @@ -0,0 +1,58 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/ads/googleads/v25/services/remarketing_action_service.proto for package 'Google.Ads.GoogleAds.V25.Services' +# Original file comments: +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +require 'grpc' +require 'google/ads/google_ads/v25/services/remarketing_action_service_pb' + +module Google + module Ads + module GoogleAds + module V25 + module Services + module RemarketingActionService + # Proto file describing the Remarketing Action service. + # + # Service to manage remarketing actions. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.ads.googleads.v25.services.RemarketingActionService' + + # Creates or updates remarketing actions. Operation statuses are returned. + # + # List of thrown errors: + # [AuthenticationError]() + # [AuthorizationError]() + # [ConversionActionError]() + # [HeaderError]() + # [InternalError]() + # [QuotaError]() + # [RequestError]() + rpc :MutateRemarketingActions, ::Google::Ads::GoogleAds::V25::Services::MutateRemarketingActionsRequest, ::Google::Ads::GoogleAds::V25::Services::MutateRemarketingActionsResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/reservation_service.rb b/lib/google/ads/google_ads/v25/services/reservation_service.rb new file mode 100644 index 000000000..5bc6e811d --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/reservation_service.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/ads/google_ads/version" + +require "google/ads/google_ads/v25/services/reservation_service/credentials" +require "google/ads/google_ads/v25/services/reservation_service/client" + +module Google + module Ads + module GoogleAds + module V25 + module Services + ## + # Service for reservation related operations. + # This service is not publicly available. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/ads/google_ads/v25/services/reservation_service" + # client = ::Google::Ads::GoogleAds::V25::Services::ReservationService::Client.new + # + module ReservationService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "reservation_service", "helpers.rb" +require "google/ads/google_ads/v25/services/reservation_service/helpers" if ::File.file? helper_path diff --git a/lib/google/ads/google_ads/v25/services/reservation_service/client.rb b/lib/google/ads/google_ads/v25/services/reservation_service/client.rb new file mode 100644 index 000000000..33930bbd1 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/reservation_service/client.rb @@ -0,0 +1,574 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# require "google/ads/google_ads/error" +require "google/ads/google_ads/v25/services/reservation_service_pb" + +module Google + module Ads + module GoogleAds + module V25 + module Services + module ReservationService + ## + # Client for the ReservationService service. + # + # Service for reservation related operations. + # This service is not publicly available. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "googleads.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :reservation_service_stub + + ## + # Configure the ReservationService Client class. + # + # See {::Google::Ads::GoogleAds::V25::Services::ReservationService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all ReservationService clients + # ::Google::Ads::GoogleAds::V25::Services::ReservationService::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + default_config = Client::Configuration.new + + default_config.timeout = 14_400.0 + default_config.retry_policy = { + initial_delay: 5.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the ReservationService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Ads::GoogleAds::V25::Services::ReservationService::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @reservation_service_stub.universe_domain + end + + ## + # Create a new ReservationService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Ads::GoogleAds::V25::Services::ReservationService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Ads::GoogleAds::V25::Services::ReservationService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the ReservationService client. + # @yieldparam config [Client::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/ads/google_ads/v25/services/reservation_service_services_pb" + + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @reservation_service_stub = ::Gapic::ServiceStub.new( + ::Google::Ads::GoogleAds::V25::Services::ReservationService::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool, + logger: @config.logger + ) + + @reservation_service_stub.stub_logger&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @reservation_service_stub.logger + end + + # Service calls + + ## + # Proposes quotes for booking campaigns. + # This request can have a latency of 30 seconds. + # + # @overload quote_campaigns(request, options = nil) + # Pass arguments to `quote_campaigns` via a request object, either of type + # {::Google::Ads::GoogleAds::V25::Services::QuoteCampaignsRequest} or an equivalent Hash. + # + # @param request [::Google::Ads::GoogleAds::V25::Services::QuoteCampaignsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload quote_campaigns(customer_id: nil, operation: nil) + # Pass arguments to `quote_campaigns` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param customer_id [::String] + # Required. The ID of the customer making the request. + # @param operation [::Google::Ads::GoogleAds::V25::Actions::QuoteCampaignsOperation, ::Hash] + # The operation to quote the campaigns. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Ads::GoogleAds::V25::Services::QuoteCampaignsResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Ads::GoogleAds::V25::Services::QuoteCampaignsResponse] + # + # @raise [Google::Ads::GoogleAds::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/ads/google_ads/v25/services" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Ads::GoogleAds::V25::Services::ReservationService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Ads::GoogleAds::V25::Services::QuoteCampaignsRequest.new + # + # # Call the quote_campaigns method. + # result = client.quote_campaigns request + # + # # The returned object is of type Google::Ads::GoogleAds::V25::Services::QuoteCampaignsResponse. + # p result + # + def quote_campaigns request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::GoogleAds::V25::Services::QuoteCampaignsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.quote_campaigns.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Ads::GoogleAds::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.customer_id + header_params["customer_id"] = request.customer_id + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.quote_campaigns.timeout, + metadata: metadata, + retry_policy: @config.rpcs.quote_campaigns.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @reservation_service_stub.call_rpc :quote_campaigns, request, options: options do |response, operation| + yield response, operation if block_given? + end + # rescue GRPC::BadStatus => grpc_error + # raise Google::Ads::GoogleAds::Error.new grpc_error.message + end + + ## + # Books the requested campaigns. + # This request can have a latency of 30 seconds. + # + # @overload book_campaigns(request, options = nil) + # Pass arguments to `book_campaigns` via a request object, either of type + # {::Google::Ads::GoogleAds::V25::Services::BookCampaignsRequest} or an equivalent Hash. + # + # @param request [::Google::Ads::GoogleAds::V25::Services::BookCampaignsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload book_campaigns(customer_id: nil, operation: nil) + # Pass arguments to `book_campaigns` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param customer_id [::String] + # Required. The ID of the customer making the request. + # @param operation [::Google::Ads::GoogleAds::V25::Actions::BookCampaignsOperation, ::Hash] + # The operation to book the campaigns. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Ads::GoogleAds::V25::Services::BookCampaignsResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Ads::GoogleAds::V25::Services::BookCampaignsResponse] + # + # @raise [Google::Ads::GoogleAds::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/ads/google_ads/v25/services" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Ads::GoogleAds::V25::Services::ReservationService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Ads::GoogleAds::V25::Services::BookCampaignsRequest.new + # + # # Call the book_campaigns method. + # result = client.book_campaigns request + # + # # The returned object is of type Google::Ads::GoogleAds::V25::Services::BookCampaignsResponse. + # p result + # + def book_campaigns request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::GoogleAds::V25::Services::BookCampaignsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.book_campaigns.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Ads::GoogleAds::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.customer_id + header_params["customer_id"] = request.customer_id + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.book_campaigns.timeout, + metadata: metadata, + retry_policy: @config.rpcs.book_campaigns.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @reservation_service_stub.call_rpc :book_campaigns, request, options: options do |response, operation| + yield response, operation if block_given? + end + # rescue GRPC::BadStatus => grpc_error + # raise Google::Ads::GoogleAds::Error.new grpc_error.message + end + + ## + # Configuration class for the ReservationService API. + # + # This class represents the configuration for ReservationService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Ads::GoogleAds::V25::Services::ReservationService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # quote_campaigns to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Ads::GoogleAds::V25::Services::ReservationService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.quote_campaigns.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Ads::GoogleAds::V25::Services::ReservationService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.quote_campaigns.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Ads::GoogleAds::V25::Services::ReservationService::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "googleads.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, + ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the ReservationService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `quote_campaigns` + # @return [::Gapic::Config::Method] + # + attr_reader :quote_campaigns + ## + # RPC-specific configuration for `book_campaigns` + # @return [::Gapic::Config::Method] + # + attr_reader :book_campaigns + + # @private + def initialize parent_rpcs = nil + quote_campaigns_config = parent_rpcs.quote_campaigns if parent_rpcs.respond_to? :quote_campaigns + @quote_campaigns = ::Gapic::Config::Method.new quote_campaigns_config + book_campaigns_config = parent_rpcs.book_campaigns if parent_rpcs.respond_to? :book_campaigns + @book_campaigns = ::Gapic::Config::Method.new book_campaigns_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/reservation_service/credentials.rb b/lib/google/ads/google_ads/v25/services/reservation_service/credentials.rb new file mode 100644 index 000000000..cf92e10cd --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/reservation_service/credentials.rb @@ -0,0 +1,38 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Ads + module GoogleAds + module V25 + module Services + module ReservationService + # Credentials for the ReservationService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/adwords" + ] + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/reservation_service_pb.rb b/lib/google/ads/google_ads/v25/services/reservation_service_pb.rb new file mode 100644 index 000000000..99f0fe9bc --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/reservation_service_pb.rb @@ -0,0 +1,32 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/services/reservation_service.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/actions/book_campaigns_pb' +require 'google/ads/google_ads/v25/actions/quote_campaigns_pb' +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' + + +descriptor_data = "\n;google/ads/googleads/v25/services/reservation_service.proto\x12!google.ads.googleads.v25.services\x1a\x35google/ads/googleads/v25/actions/book_campaigns.proto\x1a\x36google/ads/googleads/v25/actions/quote_campaigns.proto\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\"\x7f\n\x15QuoteCampaignsRequest\x12\x18\n\x0b\x63ustomer_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12L\n\toperation\x18\x02 \x01(\x0b\x32\x39.google.ads.googleads.v25.actions.QuoteCampaignsOperation\"`\n\x16QuoteCampaignsResponse\x12\x46\n\x06result\x18\x01 \x01(\x0b\x32\x36.google.ads.googleads.v25.actions.QuoteCampaignsResult\"}\n\x14\x42ookCampaignsRequest\x12\x18\n\x0b\x63ustomer_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12K\n\toperation\x18\x02 \x01(\x0b\x32\x38.google.ads.googleads.v25.actions.BookCampaignsOperation\"^\n\x15\x42ookCampaignsResponse\x12\x45\n\x06result\x18\x01 \x01(\x0b\x32\x35.google.ads.googleads.v25.actions.BookCampaignsResult2\x91\x04\n\x12ReservationService\x12\xda\x01\n\x0eQuoteCampaigns\x12\x38.google.ads.googleads.v25.services.QuoteCampaignsRequest\x1a\x39.google.ads.googleads.v25.services.QuoteCampaignsResponse\"S\xda\x41\x0b\x63ustomer_id\x82\xd3\xe4\x93\x02?\":/v25/customers/{customer_id=*}/reservations:quoteCampaigns:\x01*\x12\xd6\x01\n\rBookCampaigns\x12\x37.google.ads.googleads.v25.services.BookCampaignsRequest\x1a\x38.google.ads.googleads.v25.services.BookCampaignsResponse\"R\xda\x41\x0b\x63ustomer_id\x82\xd3\xe4\x93\x02>\"9/v25/customers/{customer_id=*}/reservations:bookCampaigns:\x01*\x1a\x45\xca\x41\x18googleads.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/adwordsB\x83\x02\n%com.google.ads.googleads.v25.servicesB\x17ReservationServiceProtoP\x01ZIgoogle.golang.org/genproto/googleapis/ads/googleads/v25/services;services\xa2\x02\x03GAA\xaa\x02!Google.Ads.GoogleAds.V25.Services\xca\x02!Google\\Ads\\GoogleAds\\V25\\Services\xea\x02%Google::Ads::GoogleAds::V25::Servicesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Services + QuoteCampaignsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.QuoteCampaignsRequest").msgclass + QuoteCampaignsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.QuoteCampaignsResponse").msgclass + BookCampaignsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.BookCampaignsRequest").msgclass + BookCampaignsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.BookCampaignsResponse").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/reservation_service_services_pb.rb b/lib/google/ads/google_ads/v25/services/reservation_service_services_pb.rb new file mode 100644 index 000000000..302772ff3 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/reservation_service_services_pb.rb @@ -0,0 +1,52 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/ads/googleads/v25/services/reservation_service.proto for package 'Google.Ads.GoogleAds.V25.Services' +# Original file comments: +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +require 'grpc' +require 'google/ads/google_ads/v25/services/reservation_service_pb' + +module Google + module Ads + module GoogleAds + module V25 + module Services + module ReservationService + # Service for reservation related operations. + # This service is not publicly available. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.ads.googleads.v25.services.ReservationService' + + # Proposes quotes for booking campaigns. + # This request can have a latency of 30 seconds. + rpc :QuoteCampaigns, ::Google::Ads::GoogleAds::V25::Services::QuoteCampaignsRequest, ::Google::Ads::GoogleAds::V25::Services::QuoteCampaignsResponse + # Books the requested campaigns. + # This request can have a latency of 30 seconds. + rpc :BookCampaigns, ::Google::Ads::GoogleAds::V25::Services::BookCampaignsRequest, ::Google::Ads::GoogleAds::V25::Services::BookCampaignsResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/shareable_preview_service.rb b/lib/google/ads/google_ads/v25/services/shareable_preview_service.rb new file mode 100644 index 000000000..cae66ab9b --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/shareable_preview_service.rb @@ -0,0 +1,57 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/ads/google_ads/version" + +require "google/ads/google_ads/v25/services/shareable_preview_service/credentials" +require "google/ads/google_ads/v25/services/shareable_preview_service/client" + +module Google + module Ads + module GoogleAds + module V25 + module Services + ## + # Service to generate Shareable Previews. + # + # Only Performance Max asset groups and certain YouTube video/audio ad formats + # are supported. Other ad types, such as Responsive Search Ads or Responsive + # Display Ads, are not supported and return an `UNSUPPORTED_AD_TYPE` error. + # + # The generated preview URLs cannot be embedded in an iframe because the + # response headers include `X-Frame-Options: deny`. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/ads/google_ads/v25/services/shareable_preview_service" + # client = ::Google::Ads::GoogleAds::V25::Services::ShareablePreviewService::Client.new + # + module ShareablePreviewService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "shareable_preview_service", "helpers.rb" +require "google/ads/google_ads/v25/services/shareable_preview_service/helpers" if ::File.file? helper_path diff --git a/lib/google/ads/google_ads/v25/services/shareable_preview_service/client.rb b/lib/google/ads/google_ads/v25/services/shareable_preview_service/client.rb new file mode 100644 index 000000000..ab09a757a --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/shareable_preview_service/client.rb @@ -0,0 +1,485 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# require "google/ads/google_ads/error" +require "google/ads/google_ads/v25/services/shareable_preview_service_pb" + +module Google + module Ads + module GoogleAds + module V25 + module Services + module ShareablePreviewService + ## + # Client for the ShareablePreviewService service. + # + # Service to generate Shareable Previews. + # + # Only Performance Max asset groups and certain YouTube video/audio ad formats + # are supported. Other ad types, such as Responsive Search Ads or Responsive + # Display Ads, are not supported and return an `UNSUPPORTED_AD_TYPE` error. + # + # The generated preview URLs cannot be embedded in an iframe because the + # response headers include `X-Frame-Options: deny`. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "googleads.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :shareable_preview_service_stub + + ## + # Configure the ShareablePreviewService Client class. + # + # See {::Google::Ads::GoogleAds::V25::Services::ShareablePreviewService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all ShareablePreviewService clients + # ::Google::Ads::GoogleAds::V25::Services::ShareablePreviewService::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + default_config = Client::Configuration.new + + default_config.timeout = 14_400.0 + default_config.retry_policy = { + initial_delay: 5.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the ShareablePreviewService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Ads::GoogleAds::V25::Services::ShareablePreviewService::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @shareable_preview_service_stub.universe_domain + end + + ## + # Create a new ShareablePreviewService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Ads::GoogleAds::V25::Services::ShareablePreviewService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Ads::GoogleAds::V25::Services::ShareablePreviewService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the ShareablePreviewService client. + # @yieldparam config [Client::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/ads/google_ads/v25/services/shareable_preview_service_services_pb" + + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @shareable_preview_service_stub = ::Gapic::ServiceStub.new( + ::Google::Ads::GoogleAds::V25::Services::ShareablePreviewService::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool, + logger: @config.logger + ) + + @shareable_preview_service_stub.stub_logger&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @shareable_preview_service_stub.logger + end + + # Service calls + + ## + # Returns the requested Shareable Preview. + # + # @overload generate_shareable_previews(request, options = nil) + # Pass arguments to `generate_shareable_previews` via a request object, either of type + # {::Google::Ads::GoogleAds::V25::Services::GenerateShareablePreviewsRequest} or an equivalent Hash. + # + # @param request [::Google::Ads::GoogleAds::V25::Services::GenerateShareablePreviewsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload generate_shareable_previews(customer_id: nil, operation: nil) + # Pass arguments to `generate_shareable_previews` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param customer_id [::String] + # Required. The customer creating the shareable previews request. + # @param operation [::Google::Ads::GoogleAds::V25::Actions::GenerateShareablePreviewsOperation, ::Hash] + # The operation to generate shareable previews. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Ads::GoogleAds::V25::Services::GenerateShareablePreviewsResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Ads::GoogleAds::V25::Services::GenerateShareablePreviewsResponse] + # + # @raise [Google::Ads::GoogleAds::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/ads/google_ads/v25/services" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Ads::GoogleAds::V25::Services::ShareablePreviewService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Ads::GoogleAds::V25::Services::GenerateShareablePreviewsRequest.new + # + # # Call the generate_shareable_previews method. + # result = client.generate_shareable_previews request + # + # # The returned object is of type Google::Ads::GoogleAds::V25::Services::GenerateShareablePreviewsResponse. + # p result + # + def generate_shareable_previews request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::GoogleAds::V25::Services::GenerateShareablePreviewsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.generate_shareable_previews.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Ads::GoogleAds::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.customer_id + header_params["customer_id"] = request.customer_id + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.generate_shareable_previews.timeout, + metadata: metadata, + retry_policy: @config.rpcs.generate_shareable_previews.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @shareable_preview_service_stub.call_rpc :generate_shareable_previews, request, + options: options do |response, operation| + yield response, operation if block_given? + end + # rescue GRPC::BadStatus => grpc_error + # raise Google::Ads::GoogleAds::Error.new grpc_error.message + end + + ## + # Configuration class for the ShareablePreviewService API. + # + # This class represents the configuration for ShareablePreviewService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Ads::GoogleAds::V25::Services::ShareablePreviewService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # generate_shareable_previews to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Ads::GoogleAds::V25::Services::ShareablePreviewService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.generate_shareable_previews.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Ads::GoogleAds::V25::Services::ShareablePreviewService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.generate_shareable_previews.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Ads::GoogleAds::V25::Services::ShareablePreviewService::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "googleads.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, + ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the ShareablePreviewService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `generate_shareable_previews` + # @return [::Gapic::Config::Method] + # + attr_reader :generate_shareable_previews + + # @private + def initialize parent_rpcs = nil + generate_shareable_previews_config = parent_rpcs.generate_shareable_previews if parent_rpcs.respond_to? :generate_shareable_previews + @generate_shareable_previews = ::Gapic::Config::Method.new generate_shareable_previews_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/shareable_preview_service/credentials.rb b/lib/google/ads/google_ads/v25/services/shareable_preview_service/credentials.rb new file mode 100644 index 000000000..82f33109c --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/shareable_preview_service/credentials.rb @@ -0,0 +1,38 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Ads + module GoogleAds + module V25 + module Services + module ShareablePreviewService + # Credentials for the ShareablePreviewService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/adwords" + ] + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/shareable_preview_service_pb.rb b/lib/google/ads/google_ads/v25/services/shareable_preview_service_pb.rb new file mode 100644 index 000000000..f4fbdfb2a --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/shareable_preview_service_pb.rb @@ -0,0 +1,29 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/services/shareable_preview_service.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/actions/generate_shareable_previews_pb' +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' + + +descriptor_data = "\nAgoogle/ads/googleads/v25/services/shareable_preview_service.proto\x12!google.ads.googleads.v25.services\x1a\x42google/ads/googleads/v25/actions/generate_shareable_previews.proto\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\"\x95\x01\n GenerateShareablePreviewsRequest\x12\x18\n\x0b\x63ustomer_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12W\n\toperation\x18\x03 \x01(\x0b\x32\x44.google.ads.googleads.v25.actions.GenerateShareablePreviewsOperation\"v\n!GenerateShareablePreviewsResponse\x12Q\n\x06result\x18\x03 \x01(\x0b\x32\x41.google.ads.googleads.v25.actions.GenerateShareablePreviewsResult2\xdc\x02\n\x17ShareablePreviewService\x12\xf9\x01\n\x19GenerateShareablePreviews\x12\x43.google.ads.googleads.v25.services.GenerateShareablePreviewsRequest\x1a\x44.google.ads.googleads.v25.services.GenerateShareablePreviewsResponse\"Q\xda\x41\x0b\x63ustomer_id\x82\xd3\xe4\x93\x02=\"8/v25/customers/{customer_id=*}:generateShareablePreviews:\x01*\x1a\x45\xca\x41\x18googleads.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/adwordsB\x88\x02\n%com.google.ads.googleads.v25.servicesB\x1cShareablePreviewServiceProtoP\x01ZIgoogle.golang.org/genproto/googleapis/ads/googleads/v25/services;services\xa2\x02\x03GAA\xaa\x02!Google.Ads.GoogleAds.V25.Services\xca\x02!Google\\Ads\\GoogleAds\\V25\\Services\xea\x02%Google::Ads::GoogleAds::V25::Servicesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Services + GenerateShareablePreviewsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.GenerateShareablePreviewsRequest").msgclass + GenerateShareablePreviewsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.GenerateShareablePreviewsResponse").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/shareable_preview_service_services_pb.rb b/lib/google/ads/google_ads/v25/services/shareable_preview_service_services_pb.rb new file mode 100644 index 000000000..9449b1dca --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/shareable_preview_service_services_pb.rb @@ -0,0 +1,54 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/ads/googleads/v25/services/shareable_preview_service.proto for package 'Google.Ads.GoogleAds.V25.Services' +# Original file comments: +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +require 'grpc' +require 'google/ads/google_ads/v25/services/shareable_preview_service_pb' + +module Google + module Ads + module GoogleAds + module V25 + module Services + module ShareablePreviewService + # Service to generate Shareable Previews. + # + # Only Performance Max asset groups and certain YouTube video/audio ad formats + # are supported. Other ad types, such as Responsive Search Ads or Responsive + # Display Ads, are not supported and return an `UNSUPPORTED_AD_TYPE` error. + # + # The generated preview URLs cannot be embedded in an iframe because the + # response headers include `X-Frame-Options: deny`. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.ads.googleads.v25.services.ShareablePreviewService' + + # Returns the requested Shareable Preview. + rpc :GenerateShareablePreviews, ::Google::Ads::GoogleAds::V25::Services::GenerateShareablePreviewsRequest, ::Google::Ads::GoogleAds::V25::Services::GenerateShareablePreviewsResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/shared_criterion_service.rb b/lib/google/ads/google_ads/v25/services/shared_criterion_service.rb new file mode 100644 index 000000000..14a02e704 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/shared_criterion_service.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/ads/google_ads/version" + +require "google/ads/google_ads/v25/services/shared_criterion_service/credentials" +require "google/ads/google_ads/v25/services/shared_criterion_service/paths" +require "google/ads/google_ads/v25/services/shared_criterion_service/client" + +module Google + module Ads + module GoogleAds + module V25 + module Services + ## + # Service to manage shared criteria. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/ads/google_ads/v25/services/shared_criterion_service" + # client = ::Google::Ads::GoogleAds::V25::Services::SharedCriterionService::Client.new + # + module SharedCriterionService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "shared_criterion_service", "helpers.rb" +require "google/ads/google_ads/v25/services/shared_criterion_service/helpers" if ::File.file? helper_path diff --git a/lib/google/ads/google_ads/v25/services/shared_criterion_service/client.rb b/lib/google/ads/google_ads/v25/services/shared_criterion_service/client.rb new file mode 100644 index 000000000..2d7ad64e4 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/shared_criterion_service/client.rb @@ -0,0 +1,513 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# require "google/ads/google_ads/error" +require "google/ads/google_ads/v25/services/shared_criterion_service_pb" + +module Google + module Ads + module GoogleAds + module V25 + module Services + module SharedCriterionService + ## + # Client for the SharedCriterionService service. + # + # Service to manage shared criteria. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "googleads.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :shared_criterion_service_stub + + ## + # Configure the SharedCriterionService Client class. + # + # See {::Google::Ads::GoogleAds::V25::Services::SharedCriterionService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all SharedCriterionService clients + # ::Google::Ads::GoogleAds::V25::Services::SharedCriterionService::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + default_config = Client::Configuration.new + + default_config.timeout = 14_400.0 + default_config.retry_policy = { + initial_delay: 5.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the SharedCriterionService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Ads::GoogleAds::V25::Services::SharedCriterionService::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @shared_criterion_service_stub.universe_domain + end + + ## + # Create a new SharedCriterionService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Ads::GoogleAds::V25::Services::SharedCriterionService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Ads::GoogleAds::V25::Services::SharedCriterionService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the SharedCriterionService client. + # @yieldparam config [Client::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/ads/google_ads/v25/services/shared_criterion_service_services_pb" + + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @shared_criterion_service_stub = ::Gapic::ServiceStub.new( + ::Google::Ads::GoogleAds::V25::Services::SharedCriterionService::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool, + logger: @config.logger + ) + + @shared_criterion_service_stub.stub_logger&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @shared_criterion_service_stub.logger + end + + # Service calls + + ## + # Creates or removes shared criteria. Operation statuses are returned. + # + # List of thrown errors: + # [AuthenticationError]() + # [AuthorizationError]() + # [CriterionError]() + # [DatabaseError]() + # [DistinctError]() + # [FieldError]() + # [HeaderError]() + # [IdError]() + # [InternalError]() + # [MutateError]() + # [NotEmptyError]() + # [NullError]() + # [OperatorError]() + # [QuotaError]() + # [RangeError]() + # [RequestError]() + # [ResourceCountLimitExceededError]() + # [SizeLimitError]() + # [StringFormatError]() + # [StringLengthError]() + # + # @overload mutate_shared_criteria(request, options = nil) + # Pass arguments to `mutate_shared_criteria` via a request object, either of type + # {::Google::Ads::GoogleAds::V25::Services::MutateSharedCriteriaRequest} or an equivalent Hash. + # + # @param request [::Google::Ads::GoogleAds::V25::Services::MutateSharedCriteriaRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload mutate_shared_criteria(customer_id: nil, operations: nil, partial_failure: nil, validate_only: nil, response_content_type: nil) + # Pass arguments to `mutate_shared_criteria` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param customer_id [::String] + # Required. The ID of the customer whose shared criteria are being modified. + # @param operations [::Array<::Google::Ads::GoogleAds::V25::Services::SharedCriterionOperation, ::Hash>] + # Required. The list of operations to perform on individual shared criteria. + # @param partial_failure [::Boolean] + # 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. + # @param validate_only [::Boolean] + # If true, the request is validated but not executed. Only errors are + # returned, not results. + # @param response_content_type [::Google::Ads::GoogleAds::V25::Enums::ResponseContentTypeEnum::ResponseContentType] + # The response content type setting. Determines whether the mutable resource + # or just the resource name should be returned post mutation. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Ads::GoogleAds::V25::Services::MutateSharedCriteriaResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Ads::GoogleAds::V25::Services::MutateSharedCriteriaResponse] + # + # @raise [Google::Ads::GoogleAds::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/ads/google_ads/v25/services" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Ads::GoogleAds::V25::Services::SharedCriterionService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Ads::GoogleAds::V25::Services::MutateSharedCriteriaRequest.new + # + # # Call the mutate_shared_criteria method. + # result = client.mutate_shared_criteria request + # + # # The returned object is of type Google::Ads::GoogleAds::V25::Services::MutateSharedCriteriaResponse. + # p result + # + def mutate_shared_criteria request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::GoogleAds::V25::Services::MutateSharedCriteriaRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.mutate_shared_criteria.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Ads::GoogleAds::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.customer_id + header_params["customer_id"] = request.customer_id + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.mutate_shared_criteria.timeout, + metadata: metadata, + retry_policy: @config.rpcs.mutate_shared_criteria.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @shared_criterion_service_stub.call_rpc :mutate_shared_criteria, request, + options: options do |response, operation| + yield response, operation if block_given? + end + # rescue GRPC::BadStatus => grpc_error + # raise Google::Ads::GoogleAds::Error.new grpc_error.message + end + + ## + # Configuration class for the SharedCriterionService API. + # + # This class represents the configuration for SharedCriterionService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Ads::GoogleAds::V25::Services::SharedCriterionService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # mutate_shared_criteria to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Ads::GoogleAds::V25::Services::SharedCriterionService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.mutate_shared_criteria.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Ads::GoogleAds::V25::Services::SharedCriterionService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.mutate_shared_criteria.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Ads::GoogleAds::V25::Services::SharedCriterionService::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "googleads.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, + ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the SharedCriterionService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `mutate_shared_criteria` + # @return [::Gapic::Config::Method] + # + attr_reader :mutate_shared_criteria + + # @private + def initialize parent_rpcs = nil + mutate_shared_criteria_config = parent_rpcs.mutate_shared_criteria if parent_rpcs.respond_to? :mutate_shared_criteria + @mutate_shared_criteria = ::Gapic::Config::Method.new mutate_shared_criteria_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/shared_criterion_service/credentials.rb b/lib/google/ads/google_ads/v25/services/shared_criterion_service/credentials.rb new file mode 100644 index 000000000..4f491c24b --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/shared_criterion_service/credentials.rb @@ -0,0 +1,38 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Ads + module GoogleAds + module V25 + module Services + module SharedCriterionService + # Credentials for the SharedCriterionService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/adwords" + ] + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/shared_criterion_service/paths.rb b/lib/google/ads/google_ads/v25/services/shared_criterion_service/paths.rb new file mode 100644 index 000000000..1ae1857e4 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/shared_criterion_service/paths.rb @@ -0,0 +1,85 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Ads + module GoogleAds + module V25 + module Services + module SharedCriterionService + # Path helper methods for the SharedCriterionService API. + module Paths + ## + # Create a fully-qualified MobileAppCategoryConstant resource string. + # + # The resource will be in the following format: + # + # `mobileAppCategoryConstants/{mobile_app_category_id}` + # + # @param mobile_app_category_id [String] + # + # @return [::String] + def mobile_app_category_constant_path mobile_app_category_id: + "mobileAppCategoryConstants/#{mobile_app_category_id}" + end + + ## + # Create a fully-qualified SharedCriterion resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/sharedCriteria/{shared_set_id}~{criterion_id}` + # + # @param customer_id [String] + # @param shared_set_id [String] + # @param criterion_id [String] + # + # @return [::String] + def shared_criterion_path customer_id:, shared_set_id:, criterion_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + raise ::ArgumentError, "shared_set_id cannot contain /" if shared_set_id.to_s.include? "/" + + "customers/#{customer_id}/sharedCriteria/#{shared_set_id}~#{criterion_id}" + end + + ## + # Create a fully-qualified SharedSet resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/sharedSets/{shared_set_id}` + # + # @param customer_id [String] + # @param shared_set_id [String] + # + # @return [::String] + def shared_set_path customer_id:, shared_set_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/sharedSets/#{shared_set_id}" + end + + extend self + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/shared_criterion_service_pb.rb b/lib/google/ads/google_ads/v25/services/shared_criterion_service_pb.rb new file mode 100644 index 000000000..744520e61 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/shared_criterion_service_pb.rb @@ -0,0 +1,34 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/services/shared_criterion_service.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/enums/response_content_type_pb' +require 'google/ads/google_ads/v25/resources/shared_criterion_pb' +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/rpc/status_pb' + + +descriptor_data = "\n@google/ads/googleads/v25/services/shared_criterion_service.proto\x12!google.ads.googleads.v25.services\x1a:google/ads/googleads/v25/enums/response_content_type.proto\x1a\x39google/ads/googleads/v25/resources/shared_criterion.proto\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x17google/rpc/status.proto\"\xa9\x02\n\x1bMutateSharedCriteriaRequest\x12\x18\n\x0b\x63ustomer_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12T\n\noperations\x18\x02 \x03(\x0b\x32;.google.ads.googleads.v25.services.SharedCriterionOperationB\x03\xe0\x41\x02\x12\x17\n\x0fpartial_failure\x18\x03 \x01(\x08\x12\x15\n\rvalidate_only\x18\x04 \x01(\x08\x12j\n\x15response_content_type\x18\x05 \x01(\x0e\x32K.google.ads.googleads.v25.enums.ResponseContentTypeEnum.ResponseContentType\"\xaf\x01\n\x18SharedCriterionOperation\x12\x45\n\x06\x63reate\x18\x01 \x01(\x0b\x32\x33.google.ads.googleads.v25.resources.SharedCriterionH\x00\x12?\n\x06remove\x18\x03 \x01(\tB-\xfa\x41*\n(googleads.googleapis.com/SharedCriterionH\x00\x42\x0b\n\toperation\"\xa2\x01\n\x1cMutateSharedCriteriaResponse\x12\x31\n\x15partial_failure_error\x18\x03 \x01(\x0b\x32\x12.google.rpc.Status\x12O\n\x07results\x18\x02 \x03(\x0b\x32>.google.ads.googleads.v25.services.MutateSharedCriterionResult\"\xb2\x01\n\x1bMutateSharedCriterionResult\x12\x44\n\rresource_name\x18\x01 \x01(\tB-\xfa\x41*\n(googleads.googleapis.com/SharedCriterion\x12M\n\x10shared_criterion\x18\x02 \x01(\x0b\x32\x33.google.ads.googleads.v25.resources.SharedCriterion2\xd3\x02\n\x16SharedCriterionService\x12\xf1\x01\n\x14MutateSharedCriteria\x12>.google.ads.googleads.v25.services.MutateSharedCriteriaRequest\x1a?.google.ads.googleads.v25.services.MutateSharedCriteriaResponse\"X\xda\x41\x16\x63ustomer_id,operations\x82\xd3\xe4\x93\x02\x39\"4/v25/customers/{customer_id=*}/sharedCriteria:mutate:\x01*\x1a\x45\xca\x41\x18googleads.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/adwordsB\x87\x02\n%com.google.ads.googleads.v25.servicesB\x1bSharedCriterionServiceProtoP\x01ZIgoogle.golang.org/genproto/googleapis/ads/googleads/v25/services;services\xa2\x02\x03GAA\xaa\x02!Google.Ads.GoogleAds.V25.Services\xca\x02!Google\\Ads\\GoogleAds\\V25\\Services\xea\x02%Google::Ads::GoogleAds::V25::Servicesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Services + MutateSharedCriteriaRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.MutateSharedCriteriaRequest").msgclass + SharedCriterionOperation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.SharedCriterionOperation").msgclass + MutateSharedCriteriaResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.MutateSharedCriteriaResponse").msgclass + MutateSharedCriterionResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.MutateSharedCriterionResult").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/shared_criterion_service_services_pb.rb b/lib/google/ads/google_ads/v25/services/shared_criterion_service_services_pb.rb new file mode 100644 index 000000000..3a49bca84 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/shared_criterion_service_services_pb.rb @@ -0,0 +1,71 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/ads/googleads/v25/services/shared_criterion_service.proto for package 'Google.Ads.GoogleAds.V25.Services' +# Original file comments: +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +require 'grpc' +require 'google/ads/google_ads/v25/services/shared_criterion_service_pb' + +module Google + module Ads + module GoogleAds + module V25 + module Services + module SharedCriterionService + # Proto file describing the Shared Criterion service. + # + # Service to manage shared criteria. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.ads.googleads.v25.services.SharedCriterionService' + + # Creates or removes shared criteria. Operation statuses are returned. + # + # List of thrown errors: + # [AuthenticationError]() + # [AuthorizationError]() + # [CriterionError]() + # [DatabaseError]() + # [DistinctError]() + # [FieldError]() + # [HeaderError]() + # [IdError]() + # [InternalError]() + # [MutateError]() + # [NotEmptyError]() + # [NullError]() + # [OperatorError]() + # [QuotaError]() + # [RangeError]() + # [RequestError]() + # [ResourceCountLimitExceededError]() + # [SizeLimitError]() + # [StringFormatError]() + # [StringLengthError]() + rpc :MutateSharedCriteria, ::Google::Ads::GoogleAds::V25::Services::MutateSharedCriteriaRequest, ::Google::Ads::GoogleAds::V25::Services::MutateSharedCriteriaResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/shared_set_service.rb b/lib/google/ads/google_ads/v25/services/shared_set_service.rb new file mode 100644 index 000000000..d9f22e3a8 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/shared_set_service.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/ads/google_ads/version" + +require "google/ads/google_ads/v25/services/shared_set_service/credentials" +require "google/ads/google_ads/v25/services/shared_set_service/paths" +require "google/ads/google_ads/v25/services/shared_set_service/client" + +module Google + module Ads + module GoogleAds + module V25 + module Services + ## + # Service to manage shared sets. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/ads/google_ads/v25/services/shared_set_service" + # client = ::Google::Ads::GoogleAds::V25::Services::SharedSetService::Client.new + # + module SharedSetService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "shared_set_service", "helpers.rb" +require "google/ads/google_ads/v25/services/shared_set_service/helpers" if ::File.file? helper_path diff --git a/lib/google/ads/google_ads/v25/services/shared_set_service/client.rb b/lib/google/ads/google_ads/v25/services/shared_set_service/client.rb new file mode 100644 index 000000000..b8d1447af --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/shared_set_service/client.rb @@ -0,0 +1,516 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# require "google/ads/google_ads/error" +require "google/ads/google_ads/v25/services/shared_set_service_pb" + +module Google + module Ads + module GoogleAds + module V25 + module Services + module SharedSetService + ## + # Client for the SharedSetService service. + # + # Service to manage shared sets. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "googleads.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :shared_set_service_stub + + ## + # Configure the SharedSetService Client class. + # + # See {::Google::Ads::GoogleAds::V25::Services::SharedSetService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all SharedSetService clients + # ::Google::Ads::GoogleAds::V25::Services::SharedSetService::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + default_config = Client::Configuration.new + + default_config.timeout = 14_400.0 + default_config.retry_policy = { + initial_delay: 5.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the SharedSetService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Ads::GoogleAds::V25::Services::SharedSetService::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @shared_set_service_stub.universe_domain + end + + ## + # Create a new SharedSetService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Ads::GoogleAds::V25::Services::SharedSetService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Ads::GoogleAds::V25::Services::SharedSetService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the SharedSetService client. + # @yieldparam config [Client::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/ads/google_ads/v25/services/shared_set_service_services_pb" + + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @shared_set_service_stub = ::Gapic::ServiceStub.new( + ::Google::Ads::GoogleAds::V25::Services::SharedSetService::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool, + logger: @config.logger + ) + + @shared_set_service_stub.stub_logger&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @shared_set_service_stub.logger + end + + # Service calls + + ## + # Creates, updates, or removes shared sets. Operation statuses are returned. + # + # List of thrown errors: + # [AuthenticationError]() + # [AuthorizationError]() + # [DatabaseError]() + # [DateError]() + # [DistinctError]() + # [FieldError]() + # [FieldMaskError]() + # [HeaderError]() + # [IdError]() + # [InternalError]() + # [MutateError]() + # [NewResourceCreationError]() + # [NotEmptyError]() + # [NullError]() + # [OperatorError]() + # [QuotaError]() + # [RangeError]() + # [RequestError]() + # [ResourceCountLimitExceededError]() + # [SharedSetError]() + # [SizeLimitError]() + # [StringFormatError]() + # [StringLengthError]() + # + # @overload mutate_shared_sets(request, options = nil) + # Pass arguments to `mutate_shared_sets` via a request object, either of type + # {::Google::Ads::GoogleAds::V25::Services::MutateSharedSetsRequest} or an equivalent Hash. + # + # @param request [::Google::Ads::GoogleAds::V25::Services::MutateSharedSetsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload mutate_shared_sets(customer_id: nil, operations: nil, partial_failure: nil, validate_only: nil, response_content_type: nil) + # Pass arguments to `mutate_shared_sets` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param customer_id [::String] + # Required. The ID of the customer whose shared sets are being modified. + # @param operations [::Array<::Google::Ads::GoogleAds::V25::Services::SharedSetOperation, ::Hash>] + # Required. The list of operations to perform on individual shared sets. + # @param partial_failure [::Boolean] + # 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. + # @param validate_only [::Boolean] + # If true, the request is validated but not executed. Only errors are + # returned, not results. + # @param response_content_type [::Google::Ads::GoogleAds::V25::Enums::ResponseContentTypeEnum::ResponseContentType] + # The response content type setting. Determines whether the mutable resource + # or just the resource name should be returned post mutation. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Ads::GoogleAds::V25::Services::MutateSharedSetsResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Ads::GoogleAds::V25::Services::MutateSharedSetsResponse] + # + # @raise [Google::Ads::GoogleAds::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/ads/google_ads/v25/services" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Ads::GoogleAds::V25::Services::SharedSetService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Ads::GoogleAds::V25::Services::MutateSharedSetsRequest.new + # + # # Call the mutate_shared_sets method. + # result = client.mutate_shared_sets request + # + # # The returned object is of type Google::Ads::GoogleAds::V25::Services::MutateSharedSetsResponse. + # p result + # + def mutate_shared_sets request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::GoogleAds::V25::Services::MutateSharedSetsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.mutate_shared_sets.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Ads::GoogleAds::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.customer_id + header_params["customer_id"] = request.customer_id + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.mutate_shared_sets.timeout, + metadata: metadata, + retry_policy: @config.rpcs.mutate_shared_sets.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @shared_set_service_stub.call_rpc :mutate_shared_sets, request, + options: options do |response, operation| + yield response, operation if block_given? + end + # rescue GRPC::BadStatus => grpc_error + # raise Google::Ads::GoogleAds::Error.new grpc_error.message + end + + ## + # Configuration class for the SharedSetService API. + # + # This class represents the configuration for SharedSetService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Ads::GoogleAds::V25::Services::SharedSetService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # mutate_shared_sets to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Ads::GoogleAds::V25::Services::SharedSetService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.mutate_shared_sets.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Ads::GoogleAds::V25::Services::SharedSetService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.mutate_shared_sets.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Ads::GoogleAds::V25::Services::SharedSetService::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "googleads.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, + ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the SharedSetService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `mutate_shared_sets` + # @return [::Gapic::Config::Method] + # + attr_reader :mutate_shared_sets + + # @private + def initialize parent_rpcs = nil + mutate_shared_sets_config = parent_rpcs.mutate_shared_sets if parent_rpcs.respond_to? :mutate_shared_sets + @mutate_shared_sets = ::Gapic::Config::Method.new mutate_shared_sets_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/shared_set_service/credentials.rb b/lib/google/ads/google_ads/v25/services/shared_set_service/credentials.rb new file mode 100644 index 000000000..06c6c57bf --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/shared_set_service/credentials.rb @@ -0,0 +1,38 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Ads + module GoogleAds + module V25 + module Services + module SharedSetService + # Credentials for the SharedSetService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/adwords" + ] + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/shared_set_service/paths.rb b/lib/google/ads/google_ads/v25/services/shared_set_service/paths.rb new file mode 100644 index 000000000..039e823d2 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/shared_set_service/paths.rb @@ -0,0 +1,52 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Ads + module GoogleAds + module V25 + module Services + module SharedSetService + # Path helper methods for the SharedSetService API. + module Paths + ## + # Create a fully-qualified SharedSet resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/sharedSets/{shared_set_id}` + # + # @param customer_id [String] + # @param shared_set_id [String] + # + # @return [::String] + def shared_set_path customer_id:, shared_set_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/sharedSets/#{shared_set_id}" + end + + extend self + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/shared_set_service_pb.rb b/lib/google/ads/google_ads/v25/services/shared_set_service_pb.rb new file mode 100644 index 000000000..1c1a4a3e9 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/shared_set_service_pb.rb @@ -0,0 +1,35 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/services/shared_set_service.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/enums/response_content_type_pb' +require 'google/ads/google_ads/v25/resources/shared_set_pb' +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/field_mask_pb' +require 'google/rpc/status_pb' + + +descriptor_data = "\n:google/ads/googleads/v25/services/shared_set_service.proto\x12!google.ads.googleads.v25.services\x1a:google/ads/googleads/v25/enums/response_content_type.proto\x1a\x33google/ads/googleads/v25/resources/shared_set.proto\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\x1a\x17google/rpc/status.proto\"\x9f\x02\n\x17MutateSharedSetsRequest\x12\x18\n\x0b\x63ustomer_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12N\n\noperations\x18\x02 \x03(\x0b\x32\x35.google.ads.googleads.v25.services.SharedSetOperationB\x03\xe0\x41\x02\x12\x17\n\x0fpartial_failure\x18\x03 \x01(\x08\x12\x15\n\rvalidate_only\x18\x04 \x01(\x08\x12j\n\x15response_content_type\x18\x05 \x01(\x0e\x32K.google.ads.googleads.v25.enums.ResponseContentTypeEnum.ResponseContentType\"\x8f\x02\n\x12SharedSetOperation\x12/\n\x0bupdate_mask\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\x12?\n\x06\x63reate\x18\x01 \x01(\x0b\x32-.google.ads.googleads.v25.resources.SharedSetH\x00\x12?\n\x06update\x18\x02 \x01(\x0b\x32-.google.ads.googleads.v25.resources.SharedSetH\x00\x12\x39\n\x06remove\x18\x03 \x01(\tB\'\xfa\x41$\n\"googleads.googleapis.com/SharedSetH\x00\x42\x0b\n\toperation\"\x98\x01\n\x18MutateSharedSetsResponse\x12\x31\n\x15partial_failure_error\x18\x03 \x01(\x0b\x32\x12.google.rpc.Status\x12I\n\x07results\x18\x02 \x03(\x0b\x32\x38.google.ads.googleads.v25.services.MutateSharedSetResult\"\x9a\x01\n\x15MutateSharedSetResult\x12>\n\rresource_name\x18\x01 \x01(\tB\'\xfa\x41$\n\"googleads.googleapis.com/SharedSet\x12\x41\n\nshared_set\x18\x02 \x01(\x0b\x32-.google.ads.googleads.v25.resources.SharedSet2\xbd\x02\n\x10SharedSetService\x12\xe1\x01\n\x10MutateSharedSets\x12:.google.ads.googleads.v25.services.MutateSharedSetsRequest\x1a;.google.ads.googleads.v25.services.MutateSharedSetsResponse\"T\xda\x41\x16\x63ustomer_id,operations\x82\xd3\xe4\x93\x02\x35\"0/v25/customers/{customer_id=*}/sharedSets:mutate:\x01*\x1a\x45\xca\x41\x18googleads.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/adwordsB\x81\x02\n%com.google.ads.googleads.v25.servicesB\x15SharedSetServiceProtoP\x01ZIgoogle.golang.org/genproto/googleapis/ads/googleads/v25/services;services\xa2\x02\x03GAA\xaa\x02!Google.Ads.GoogleAds.V25.Services\xca\x02!Google\\Ads\\GoogleAds\\V25\\Services\xea\x02%Google::Ads::GoogleAds::V25::Servicesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Services + MutateSharedSetsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.MutateSharedSetsRequest").msgclass + SharedSetOperation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.SharedSetOperation").msgclass + MutateSharedSetsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.MutateSharedSetsResponse").msgclass + MutateSharedSetResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.MutateSharedSetResult").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/shared_set_service_services_pb.rb b/lib/google/ads/google_ads/v25/services/shared_set_service_services_pb.rb new file mode 100644 index 000000000..7805cba50 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/shared_set_service_services_pb.rb @@ -0,0 +1,74 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/ads/googleads/v25/services/shared_set_service.proto for package 'Google.Ads.GoogleAds.V25.Services' +# Original file comments: +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +require 'grpc' +require 'google/ads/google_ads/v25/services/shared_set_service_pb' + +module Google + module Ads + module GoogleAds + module V25 + module Services + module SharedSetService + # Proto file describing the Shared Set service. + # + # Service to manage shared sets. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.ads.googleads.v25.services.SharedSetService' + + # Creates, updates, or removes shared sets. Operation statuses are returned. + # + # List of thrown errors: + # [AuthenticationError]() + # [AuthorizationError]() + # [DatabaseError]() + # [DateError]() + # [DistinctError]() + # [FieldError]() + # [FieldMaskError]() + # [HeaderError]() + # [IdError]() + # [InternalError]() + # [MutateError]() + # [NewResourceCreationError]() + # [NotEmptyError]() + # [NullError]() + # [OperatorError]() + # [QuotaError]() + # [RangeError]() + # [RequestError]() + # [ResourceCountLimitExceededError]() + # [SharedSetError]() + # [SizeLimitError]() + # [StringFormatError]() + # [StringLengthError]() + rpc :MutateSharedSets, ::Google::Ads::GoogleAds::V25::Services::MutateSharedSetsRequest, ::Google::Ads::GoogleAds::V25::Services::MutateSharedSetsResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/smart_campaign_setting_service.rb b/lib/google/ads/google_ads/v25/services/smart_campaign_setting_service.rb new file mode 100644 index 000000000..ececa6c06 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/smart_campaign_setting_service.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/ads/google_ads/version" + +require "google/ads/google_ads/v25/services/smart_campaign_setting_service/credentials" +require "google/ads/google_ads/v25/services/smart_campaign_setting_service/paths" +require "google/ads/google_ads/v25/services/smart_campaign_setting_service/client" + +module Google + module Ads + module GoogleAds + module V25 + module Services + ## + # Service to manage Smart campaign settings. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/ads/google_ads/v25/services/smart_campaign_setting_service" + # client = ::Google::Ads::GoogleAds::V25::Services::SmartCampaignSettingService::Client.new + # + module SmartCampaignSettingService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "smart_campaign_setting_service", "helpers.rb" +require "google/ads/google_ads/v25/services/smart_campaign_setting_service/helpers" if ::File.file? helper_path diff --git a/lib/google/ads/google_ads/v25/services/smart_campaign_setting_service/client.rb b/lib/google/ads/google_ads/v25/services/smart_campaign_setting_service/client.rb new file mode 100644 index 000000000..344634205 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/smart_campaign_setting_service/client.rb @@ -0,0 +1,587 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# require "google/ads/google_ads/error" +require "google/ads/google_ads/v25/services/smart_campaign_setting_service_pb" + +module Google + module Ads + module GoogleAds + module V25 + module Services + module SmartCampaignSettingService + ## + # Client for the SmartCampaignSettingService service. + # + # Service to manage Smart campaign settings. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "googleads.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :smart_campaign_setting_service_stub + + ## + # Configure the SmartCampaignSettingService Client class. + # + # See {::Google::Ads::GoogleAds::V25::Services::SmartCampaignSettingService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all SmartCampaignSettingService clients + # ::Google::Ads::GoogleAds::V25::Services::SmartCampaignSettingService::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + default_config = Client::Configuration.new + + default_config.timeout = 14_400.0 + default_config.retry_policy = { + initial_delay: 5.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the SmartCampaignSettingService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Ads::GoogleAds::V25::Services::SmartCampaignSettingService::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @smart_campaign_setting_service_stub.universe_domain + end + + ## + # Create a new SmartCampaignSettingService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Ads::GoogleAds::V25::Services::SmartCampaignSettingService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Ads::GoogleAds::V25::Services::SmartCampaignSettingService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the SmartCampaignSettingService client. + # @yieldparam config [Client::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/ads/google_ads/v25/services/smart_campaign_setting_service_services_pb" + + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @smart_campaign_setting_service_stub = ::Gapic::ServiceStub.new( + ::Google::Ads::GoogleAds::V25::Services::SmartCampaignSettingService::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool, + logger: @config.logger + ) + + @smart_campaign_setting_service_stub.stub_logger&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @smart_campaign_setting_service_stub.logger + end + + # Service calls + + ## + # Returns the status of the requested Smart campaign. + # + # @overload get_smart_campaign_status(request, options = nil) + # Pass arguments to `get_smart_campaign_status` via a request object, either of type + # {::Google::Ads::GoogleAds::V25::Services::GetSmartCampaignStatusRequest} or an equivalent Hash. + # + # @param request [::Google::Ads::GoogleAds::V25::Services::GetSmartCampaignStatusRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_smart_campaign_status(resource_name: nil) + # Pass arguments to `get_smart_campaign_status` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param resource_name [::String] + # Required. The resource name of the Smart campaign setting belonging to the + # Smart campaign to fetch the status of. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Ads::GoogleAds::V25::Services::GetSmartCampaignStatusResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Ads::GoogleAds::V25::Services::GetSmartCampaignStatusResponse] + # + # @raise [Google::Ads::GoogleAds::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/ads/google_ads/v25/services" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Ads::GoogleAds::V25::Services::SmartCampaignSettingService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Ads::GoogleAds::V25::Services::GetSmartCampaignStatusRequest.new + # + # # Call the get_smart_campaign_status method. + # result = client.get_smart_campaign_status request + # + # # The returned object is of type Google::Ads::GoogleAds::V25::Services::GetSmartCampaignStatusResponse. + # p result + # + def get_smart_campaign_status request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::GoogleAds::V25::Services::GetSmartCampaignStatusRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_smart_campaign_status.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Ads::GoogleAds::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.resource_name + header_params["resource_name"] = request.resource_name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_smart_campaign_status.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_smart_campaign_status.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @smart_campaign_setting_service_stub.call_rpc :get_smart_campaign_status, request, + options: options do |response, operation| + yield response, operation if block_given? + end + # rescue GRPC::BadStatus => grpc_error + # raise Google::Ads::GoogleAds::Error.new grpc_error.message + end + + ## + # Updates Smart campaign settings for campaigns. + # + # @overload mutate_smart_campaign_settings(request, options = nil) + # Pass arguments to `mutate_smart_campaign_settings` via a request object, either of type + # {::Google::Ads::GoogleAds::V25::Services::MutateSmartCampaignSettingsRequest} or an equivalent Hash. + # + # @param request [::Google::Ads::GoogleAds::V25::Services::MutateSmartCampaignSettingsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload mutate_smart_campaign_settings(customer_id: nil, operations: nil, partial_failure: nil, validate_only: nil, response_content_type: nil) + # Pass arguments to `mutate_smart_campaign_settings` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param customer_id [::String] + # Required. The ID of the customer whose Smart campaign settings are being + # modified. + # @param operations [::Array<::Google::Ads::GoogleAds::V25::Services::SmartCampaignSettingOperation, ::Hash>] + # Required. The list of operations to perform on individual Smart campaign + # settings. + # @param partial_failure [::Boolean] + # 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. + # @param validate_only [::Boolean] + # If true, the request is validated but not executed. Only errors are + # returned, not results. + # @param response_content_type [::Google::Ads::GoogleAds::V25::Enums::ResponseContentTypeEnum::ResponseContentType] + # The response content type setting. Determines whether the mutable resource + # or just the resource name should be returned post mutation. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Ads::GoogleAds::V25::Services::MutateSmartCampaignSettingsResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Ads::GoogleAds::V25::Services::MutateSmartCampaignSettingsResponse] + # + # @raise [Google::Ads::GoogleAds::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/ads/google_ads/v25/services" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Ads::GoogleAds::V25::Services::SmartCampaignSettingService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Ads::GoogleAds::V25::Services::MutateSmartCampaignSettingsRequest.new + # + # # Call the mutate_smart_campaign_settings method. + # result = client.mutate_smart_campaign_settings request + # + # # The returned object is of type Google::Ads::GoogleAds::V25::Services::MutateSmartCampaignSettingsResponse. + # p result + # + def mutate_smart_campaign_settings request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::GoogleAds::V25::Services::MutateSmartCampaignSettingsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.mutate_smart_campaign_settings.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Ads::GoogleAds::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.customer_id + header_params["customer_id"] = request.customer_id + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.mutate_smart_campaign_settings.timeout, + metadata: metadata, + retry_policy: @config.rpcs.mutate_smart_campaign_settings.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @smart_campaign_setting_service_stub.call_rpc :mutate_smart_campaign_settings, request, + options: options do |response, operation| + yield response, operation if block_given? + end + # rescue GRPC::BadStatus => grpc_error + # raise Google::Ads::GoogleAds::Error.new grpc_error.message + end + + ## + # Configuration class for the SmartCampaignSettingService API. + # + # This class represents the configuration for SmartCampaignSettingService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Ads::GoogleAds::V25::Services::SmartCampaignSettingService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # get_smart_campaign_status to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Ads::GoogleAds::V25::Services::SmartCampaignSettingService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_smart_campaign_status.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Ads::GoogleAds::V25::Services::SmartCampaignSettingService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_smart_campaign_status.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Ads::GoogleAds::V25::Services::SmartCampaignSettingService::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "googleads.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, + ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the SmartCampaignSettingService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `get_smart_campaign_status` + # @return [::Gapic::Config::Method] + # + attr_reader :get_smart_campaign_status + ## + # RPC-specific configuration for `mutate_smart_campaign_settings` + # @return [::Gapic::Config::Method] + # + attr_reader :mutate_smart_campaign_settings + + # @private + def initialize parent_rpcs = nil + get_smart_campaign_status_config = parent_rpcs.get_smart_campaign_status if parent_rpcs.respond_to? :get_smart_campaign_status + @get_smart_campaign_status = ::Gapic::Config::Method.new get_smart_campaign_status_config + mutate_smart_campaign_settings_config = parent_rpcs.mutate_smart_campaign_settings if parent_rpcs.respond_to? :mutate_smart_campaign_settings + @mutate_smart_campaign_settings = ::Gapic::Config::Method.new mutate_smart_campaign_settings_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/smart_campaign_setting_service/credentials.rb b/lib/google/ads/google_ads/v25/services/smart_campaign_setting_service/credentials.rb new file mode 100644 index 000000000..7556e3d6e --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/smart_campaign_setting_service/credentials.rb @@ -0,0 +1,38 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Ads + module GoogleAds + module V25 + module Services + module SmartCampaignSettingService + # Credentials for the SmartCampaignSettingService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/adwords" + ] + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/smart_campaign_setting_service/paths.rb b/lib/google/ads/google_ads/v25/services/smart_campaign_setting_service/paths.rb new file mode 100644 index 000000000..f805402b6 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/smart_campaign_setting_service/paths.rb @@ -0,0 +1,69 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Ads + module GoogleAds + module V25 + module Services + module SmartCampaignSettingService + # Path helper methods for the SmartCampaignSettingService API. + module Paths + ## + # Create a fully-qualified Campaign resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/campaigns/{campaign_id}` + # + # @param customer_id [String] + # @param campaign_id [String] + # + # @return [::String] + def campaign_path customer_id:, campaign_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/campaigns/#{campaign_id}" + end + + ## + # Create a fully-qualified SmartCampaignSetting resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/smartCampaignSettings/{campaign_id}` + # + # @param customer_id [String] + # @param campaign_id [String] + # + # @return [::String] + def smart_campaign_setting_path customer_id:, campaign_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/smartCampaignSettings/#{campaign_id}" + end + + extend self + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/smart_campaign_setting_service_pb.rb b/lib/google/ads/google_ads/v25/services/smart_campaign_setting_service_pb.rb new file mode 100644 index 000000000..eaf04f3fa --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/smart_campaign_setting_service_pb.rb @@ -0,0 +1,44 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/services/smart_campaign_setting_service.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/enums/response_content_type_pb' +require 'google/ads/google_ads/v25/enums/smart_campaign_not_eligible_reason_pb' +require 'google/ads/google_ads/v25/enums/smart_campaign_status_pb' +require 'google/ads/google_ads/v25/resources/smart_campaign_setting_pb' +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/field_mask_pb' +require 'google/rpc/status_pb' + + +descriptor_data = "\nFgoogle/ads/googleads/v25/services/smart_campaign_setting_service.proto\x12!google.ads.googleads.v25.services\x1a:google/ads/googleads/v25/enums/response_content_type.proto\x1aGgoogle/ads/googleads/v25/enums/smart_campaign_not_eligible_reason.proto\x1a:google/ads/googleads/v25/enums/smart_campaign_status.proto\x1a?google/ads/googleads/v25/resources/smart_campaign_setting.proto\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\x1a\x17google/rpc/status.proto\"m\n\x1dGetSmartCampaignStatusRequest\x12L\n\rresource_name\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-googleads.googleapis.com/SmartCampaignSetting\"\xbf\x01\n\x1fSmartCampaignNotEligibleDetails\x12\x83\x01\n\x13not_eligible_reason\x18\x01 \x01(\x0e\x32\x61.google.ads.googleads.v25.enums.SmartCampaignNotEligibleReasonEnum.SmartCampaignNotEligibleReasonH\x00\x88\x01\x01\x42\x16\n\x14_not_eligible_reason\"\x92\x01\n\x1cSmartCampaignEligibleDetails\x12&\n\x19last_impression_date_time\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x1a\n\rend_date_time\x18\x02 \x01(\tH\x01\x88\x01\x01\x42\x1c\n\x1a_last_impression_date_timeB\x10\n\x0e_end_date_time\"P\n\x1aSmartCampaignPausedDetails\x12\x1d\n\x10paused_date_time\x18\x01 \x01(\tH\x00\x88\x01\x01\x42\x13\n\x11_paused_date_time\"S\n\x1bSmartCampaignRemovedDetails\x12\x1e\n\x11removed_date_time\x18\x01 \x01(\tH\x00\x88\x01\x01\x42\x14\n\x12_removed_date_time\"I\n\x19SmartCampaignEndedDetails\x12\x1a\n\rend_date_time\x18\x01 \x01(\tH\x00\x88\x01\x01\x42\x10\n\x0e_end_date_time\"\xf9\x04\n\x1eGetSmartCampaignStatusResponse\x12j\n\x15smart_campaign_status\x18\x01 \x01(\x0e\x32K.google.ads.googleads.v25.enums.SmartCampaignStatusEnum.SmartCampaignStatus\x12\x62\n\x14not_eligible_details\x18\x02 \x01(\x0b\x32\x42.google.ads.googleads.v25.services.SmartCampaignNotEligibleDetailsH\x00\x12[\n\x10\x65ligible_details\x18\x03 \x01(\x0b\x32?.google.ads.googleads.v25.services.SmartCampaignEligibleDetailsH\x00\x12W\n\x0epaused_details\x18\x04 \x01(\x0b\x32=.google.ads.googleads.v25.services.SmartCampaignPausedDetailsH\x00\x12Y\n\x0fremoved_details\x18\x05 \x01(\x0b\x32>.google.ads.googleads.v25.services.SmartCampaignRemovedDetailsH\x00\x12U\n\rended_details\x18\x06 \x01(\x0b\x32<.google.ads.googleads.v25.services.SmartCampaignEndedDetailsH\x00\x42\x1f\n\x1dsmart_campaign_status_details\"\xb5\x02\n\"MutateSmartCampaignSettingsRequest\x12\x18\n\x0b\x63ustomer_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12Y\n\noperations\x18\x02 \x03(\x0b\x32@.google.ads.googleads.v25.services.SmartCampaignSettingOperationB\x03\xe0\x41\x02\x12\x17\n\x0fpartial_failure\x18\x03 \x01(\x08\x12\x15\n\rvalidate_only\x18\x04 \x01(\x08\x12j\n\x15response_content_type\x18\x05 \x01(\x0e\x32K.google.ads.googleads.v25.enums.ResponseContentTypeEnum.ResponseContentType\"\x9a\x01\n\x1dSmartCampaignSettingOperation\x12H\n\x06update\x18\x01 \x01(\x0b\x32\x38.google.ads.googleads.v25.resources.SmartCampaignSetting\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"\xae\x01\n#MutateSmartCampaignSettingsResponse\x12\x31\n\x15partial_failure_error\x18\x01 \x01(\x0b\x32\x12.google.rpc.Status\x12T\n\x07results\x18\x02 \x03(\x0b\x32\x43.google.ads.googleads.v25.services.MutateSmartCampaignSettingResult\"\xc7\x01\n MutateSmartCampaignSettingResult\x12I\n\rresource_name\x18\x01 \x01(\tB2\xfa\x41/\n-googleads.googleapis.com/SmartCampaignSetting\x12X\n\x16smart_campaign_setting\x18\x02 \x01(\x0b\x32\x38.google.ads.googleads.v25.resources.SmartCampaignSetting2\xfd\x04\n\x1bSmartCampaignSettingService\x12\x86\x02\n\x16GetSmartCampaignStatus\x12@.google.ads.googleads.v25.services.GetSmartCampaignStatusRequest\x1a\x41.google.ads.googleads.v25.services.GetSmartCampaignStatusResponse\"g\xda\x41\rresource_name\x82\xd3\xe4\x93\x02Q\x12O/v25/{resource_name=customers/*/smartCampaignSettings/*}:getSmartCampaignStatus\x12\x8d\x02\n\x1bMutateSmartCampaignSettings\x12\x45.google.ads.googleads.v25.services.MutateSmartCampaignSettingsRequest\x1a\x46.google.ads.googleads.v25.services.MutateSmartCampaignSettingsResponse\"_\xda\x41\x16\x63ustomer_id,operations\x82\xd3\xe4\x93\x02@\";/v25/customers/{customer_id=*}/smartCampaignSettings:mutate:\x01*\x1a\x45\xca\x41\x18googleads.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/adwordsB\x8c\x02\n%com.google.ads.googleads.v25.servicesB SmartCampaignSettingServiceProtoP\x01ZIgoogle.golang.org/genproto/googleapis/ads/googleads/v25/services;services\xa2\x02\x03GAA\xaa\x02!Google.Ads.GoogleAds.V25.Services\xca\x02!Google\\Ads\\GoogleAds\\V25\\Services\xea\x02%Google::Ads::GoogleAds::V25::Servicesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Services + GetSmartCampaignStatusRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.GetSmartCampaignStatusRequest").msgclass + SmartCampaignNotEligibleDetails = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.SmartCampaignNotEligibleDetails").msgclass + SmartCampaignEligibleDetails = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.SmartCampaignEligibleDetails").msgclass + SmartCampaignPausedDetails = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.SmartCampaignPausedDetails").msgclass + SmartCampaignRemovedDetails = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.SmartCampaignRemovedDetails").msgclass + SmartCampaignEndedDetails = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.SmartCampaignEndedDetails").msgclass + GetSmartCampaignStatusResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.GetSmartCampaignStatusResponse").msgclass + MutateSmartCampaignSettingsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.MutateSmartCampaignSettingsRequest").msgclass + SmartCampaignSettingOperation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.SmartCampaignSettingOperation").msgclass + MutateSmartCampaignSettingsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.MutateSmartCampaignSettingsResponse").msgclass + MutateSmartCampaignSettingResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.MutateSmartCampaignSettingResult").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/smart_campaign_setting_service_services_pb.rb b/lib/google/ads/google_ads/v25/services/smart_campaign_setting_service_services_pb.rb new file mode 100644 index 000000000..94e05845c --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/smart_campaign_setting_service_services_pb.rb @@ -0,0 +1,51 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/ads/googleads/v25/services/smart_campaign_setting_service.proto for package 'Google.Ads.GoogleAds.V25.Services' +# Original file comments: +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +require 'grpc' +require 'google/ads/google_ads/v25/services/smart_campaign_setting_service_pb' + +module Google + module Ads + module GoogleAds + module V25 + module Services + module SmartCampaignSettingService + # Proto file describing the Smart campaign setting service. + # + # Service to manage Smart campaign settings. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.ads.googleads.v25.services.SmartCampaignSettingService' + + # Returns the status of the requested Smart campaign. + rpc :GetSmartCampaignStatus, ::Google::Ads::GoogleAds::V25::Services::GetSmartCampaignStatusRequest, ::Google::Ads::GoogleAds::V25::Services::GetSmartCampaignStatusResponse + # Updates Smart campaign settings for campaigns. + rpc :MutateSmartCampaignSettings, ::Google::Ads::GoogleAds::V25::Services::MutateSmartCampaignSettingsRequest, ::Google::Ads::GoogleAds::V25::Services::MutateSmartCampaignSettingsResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/smart_campaign_suggest_service.rb b/lib/google/ads/google_ads/v25/services/smart_campaign_suggest_service.rb new file mode 100644 index 000000000..720918ddd --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/smart_campaign_suggest_service.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/ads/google_ads/version" + +require "google/ads/google_ads/v25/services/smart_campaign_suggest_service/credentials" +require "google/ads/google_ads/v25/services/smart_campaign_suggest_service/paths" +require "google/ads/google_ads/v25/services/smart_campaign_suggest_service/client" + +module Google + module Ads + module GoogleAds + module V25 + module Services + ## + # Service to get suggestions for Smart Campaigns. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/ads/google_ads/v25/services/smart_campaign_suggest_service" + # client = ::Google::Ads::GoogleAds::V25::Services::SmartCampaignSuggestService::Client.new + # + module SmartCampaignSuggestService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "smart_campaign_suggest_service", "helpers.rb" +require "google/ads/google_ads/v25/services/smart_campaign_suggest_service/helpers" if ::File.file? helper_path diff --git a/lib/google/ads/google_ads/v25/services/smart_campaign_suggest_service/client.rb b/lib/google/ads/google_ads/v25/services/smart_campaign_suggest_service/client.rb new file mode 100644 index 000000000..9ac2411bd --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/smart_campaign_suggest_service/client.rb @@ -0,0 +1,689 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# require "google/ads/google_ads/error" +require "google/ads/google_ads/v25/services/smart_campaign_suggest_service_pb" + +module Google + module Ads + module GoogleAds + module V25 + module Services + module SmartCampaignSuggestService + ## + # Client for the SmartCampaignSuggestService service. + # + # Service to get suggestions for Smart Campaigns. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "googleads.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :smart_campaign_suggest_service_stub + + ## + # Configure the SmartCampaignSuggestService Client class. + # + # See {::Google::Ads::GoogleAds::V25::Services::SmartCampaignSuggestService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all SmartCampaignSuggestService clients + # ::Google::Ads::GoogleAds::V25::Services::SmartCampaignSuggestService::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + default_config = Client::Configuration.new + + default_config.timeout = 14_400.0 + default_config.retry_policy = { + initial_delay: 5.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the SmartCampaignSuggestService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Ads::GoogleAds::V25::Services::SmartCampaignSuggestService::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @smart_campaign_suggest_service_stub.universe_domain + end + + ## + # Create a new SmartCampaignSuggestService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Ads::GoogleAds::V25::Services::SmartCampaignSuggestService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Ads::GoogleAds::V25::Services::SmartCampaignSuggestService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the SmartCampaignSuggestService client. + # @yieldparam config [Client::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/ads/google_ads/v25/services/smart_campaign_suggest_service_services_pb" + + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @smart_campaign_suggest_service_stub = ::Gapic::ServiceStub.new( + ::Google::Ads::GoogleAds::V25::Services::SmartCampaignSuggestService::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool, + logger: @config.logger + ) + + @smart_campaign_suggest_service_stub.stub_logger&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @smart_campaign_suggest_service_stub.logger + end + + # Service calls + + ## + # Returns BudgetOption suggestions. + # + # @overload suggest_smart_campaign_budget_options(request, options = nil) + # Pass arguments to `suggest_smart_campaign_budget_options` via a request object, either of type + # {::Google::Ads::GoogleAds::V25::Services::SuggestSmartCampaignBudgetOptionsRequest} or an equivalent Hash. + # + # @param request [::Google::Ads::GoogleAds::V25::Services::SuggestSmartCampaignBudgetOptionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload suggest_smart_campaign_budget_options(customer_id: nil, campaign: nil, suggestion_info: nil) + # Pass arguments to `suggest_smart_campaign_budget_options` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param customer_id [::String] + # Required. The ID of the customer whose budget options are to be suggested. + # @param campaign [::String] + # Required. The resource name of the campaign to get suggestion for. + # + # Note: The following parameters are mutually exclusive: `campaign`, `suggestion_info`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. + # @param suggestion_info [::Google::Ads::GoogleAds::V25::Services::SmartCampaignSuggestionInfo, ::Hash] + # Required. Information needed to get budget options + # + # Note: The following parameters are mutually exclusive: `suggestion_info`, `campaign`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Ads::GoogleAds::V25::Services::SuggestSmartCampaignBudgetOptionsResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Ads::GoogleAds::V25::Services::SuggestSmartCampaignBudgetOptionsResponse] + # + # @raise [Google::Ads::GoogleAds::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/ads/google_ads/v25/services" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Ads::GoogleAds::V25::Services::SmartCampaignSuggestService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Ads::GoogleAds::V25::Services::SuggestSmartCampaignBudgetOptionsRequest.new + # + # # Call the suggest_smart_campaign_budget_options method. + # result = client.suggest_smart_campaign_budget_options request + # + # # The returned object is of type Google::Ads::GoogleAds::V25::Services::SuggestSmartCampaignBudgetOptionsResponse. + # p result + # + def suggest_smart_campaign_budget_options request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::GoogleAds::V25::Services::SuggestSmartCampaignBudgetOptionsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.suggest_smart_campaign_budget_options.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Ads::GoogleAds::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.customer_id + header_params["customer_id"] = request.customer_id + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.suggest_smart_campaign_budget_options.timeout, + metadata: metadata, + retry_policy: @config.rpcs.suggest_smart_campaign_budget_options.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @smart_campaign_suggest_service_stub.call_rpc :suggest_smart_campaign_budget_options, request, + options: options do |response, operation| + yield response, operation if block_given? + end + # rescue GRPC::BadStatus => grpc_error + # raise Google::Ads::GoogleAds::Error.new grpc_error.message + end + + ## + # Suggests a Smart campaign ad compatible with the Ad family of resources, + # based on data points such as targeting and the business to advertise. + # + # @overload suggest_smart_campaign_ad(request, options = nil) + # Pass arguments to `suggest_smart_campaign_ad` via a request object, either of type + # {::Google::Ads::GoogleAds::V25::Services::SuggestSmartCampaignAdRequest} or an equivalent Hash. + # + # @param request [::Google::Ads::GoogleAds::V25::Services::SuggestSmartCampaignAdRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload suggest_smart_campaign_ad(customer_id: nil, suggestion_info: nil) + # Pass arguments to `suggest_smart_campaign_ad` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param customer_id [::String] + # Required. The ID of the customer. + # @param suggestion_info [::Google::Ads::GoogleAds::V25::Services::SmartCampaignSuggestionInfo, ::Hash] + # Required. Inputs used to suggest a Smart campaign ad. + # Required fields: final_url, language_code, keyword_themes. + # Optional but recommended fields to improve the quality of the suggestion: + # business_setting and geo_target. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Ads::GoogleAds::V25::Services::SuggestSmartCampaignAdResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Ads::GoogleAds::V25::Services::SuggestSmartCampaignAdResponse] + # + # @raise [Google::Ads::GoogleAds::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/ads/google_ads/v25/services" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Ads::GoogleAds::V25::Services::SmartCampaignSuggestService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Ads::GoogleAds::V25::Services::SuggestSmartCampaignAdRequest.new + # + # # Call the suggest_smart_campaign_ad method. + # result = client.suggest_smart_campaign_ad request + # + # # The returned object is of type Google::Ads::GoogleAds::V25::Services::SuggestSmartCampaignAdResponse. + # p result + # + def suggest_smart_campaign_ad request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::GoogleAds::V25::Services::SuggestSmartCampaignAdRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.suggest_smart_campaign_ad.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Ads::GoogleAds::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.customer_id + header_params["customer_id"] = request.customer_id + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.suggest_smart_campaign_ad.timeout, + metadata: metadata, + retry_policy: @config.rpcs.suggest_smart_campaign_ad.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @smart_campaign_suggest_service_stub.call_rpc :suggest_smart_campaign_ad, request, + options: options do |response, operation| + yield response, operation if block_given? + end + # rescue GRPC::BadStatus => grpc_error + # raise Google::Ads::GoogleAds::Error.new grpc_error.message + end + + ## + # Suggests keyword themes to advertise on. + # + # @overload suggest_keyword_themes(request, options = nil) + # Pass arguments to `suggest_keyword_themes` via a request object, either of type + # {::Google::Ads::GoogleAds::V25::Services::SuggestKeywordThemesRequest} or an equivalent Hash. + # + # @param request [::Google::Ads::GoogleAds::V25::Services::SuggestKeywordThemesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload suggest_keyword_themes(customer_id: nil, suggestion_info: nil) + # Pass arguments to `suggest_keyword_themes` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param customer_id [::String] + # Required. The ID of the customer. + # @param suggestion_info [::Google::Ads::GoogleAds::V25::Services::SmartCampaignSuggestionInfo, ::Hash] + # Required. Information to get keyword theme suggestions. + # Required fields: + # + # * suggestion_info.final_url + # * suggestion_info.language_code + # * suggestion_info.geo_target + # + # Recommended fields: + # + # * suggestion_info.business_setting + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Ads::GoogleAds::V25::Services::SuggestKeywordThemesResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Ads::GoogleAds::V25::Services::SuggestKeywordThemesResponse] + # + # @raise [Google::Ads::GoogleAds::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/ads/google_ads/v25/services" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Ads::GoogleAds::V25::Services::SmartCampaignSuggestService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Ads::GoogleAds::V25::Services::SuggestKeywordThemesRequest.new + # + # # Call the suggest_keyword_themes method. + # result = client.suggest_keyword_themes request + # + # # The returned object is of type Google::Ads::GoogleAds::V25::Services::SuggestKeywordThemesResponse. + # p result + # + def suggest_keyword_themes request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::GoogleAds::V25::Services::SuggestKeywordThemesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.suggest_keyword_themes.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Ads::GoogleAds::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.customer_id + header_params["customer_id"] = request.customer_id + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.suggest_keyword_themes.timeout, + metadata: metadata, + retry_policy: @config.rpcs.suggest_keyword_themes.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @smart_campaign_suggest_service_stub.call_rpc :suggest_keyword_themes, request, + options: options do |response, operation| + yield response, operation if block_given? + end + # rescue GRPC::BadStatus => grpc_error + # raise Google::Ads::GoogleAds::Error.new grpc_error.message + end + + ## + # Configuration class for the SmartCampaignSuggestService API. + # + # This class represents the configuration for SmartCampaignSuggestService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Ads::GoogleAds::V25::Services::SmartCampaignSuggestService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # suggest_smart_campaign_budget_options to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Ads::GoogleAds::V25::Services::SmartCampaignSuggestService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.suggest_smart_campaign_budget_options.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Ads::GoogleAds::V25::Services::SmartCampaignSuggestService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.suggest_smart_campaign_budget_options.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Ads::GoogleAds::V25::Services::SmartCampaignSuggestService::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "googleads.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, + ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the SmartCampaignSuggestService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `suggest_smart_campaign_budget_options` + # @return [::Gapic::Config::Method] + # + attr_reader :suggest_smart_campaign_budget_options + ## + # RPC-specific configuration for `suggest_smart_campaign_ad` + # @return [::Gapic::Config::Method] + # + attr_reader :suggest_smart_campaign_ad + ## + # RPC-specific configuration for `suggest_keyword_themes` + # @return [::Gapic::Config::Method] + # + attr_reader :suggest_keyword_themes + + # @private + def initialize parent_rpcs = nil + suggest_smart_campaign_budget_options_config = parent_rpcs.suggest_smart_campaign_budget_options if parent_rpcs.respond_to? :suggest_smart_campaign_budget_options + @suggest_smart_campaign_budget_options = ::Gapic::Config::Method.new suggest_smart_campaign_budget_options_config + suggest_smart_campaign_ad_config = parent_rpcs.suggest_smart_campaign_ad if parent_rpcs.respond_to? :suggest_smart_campaign_ad + @suggest_smart_campaign_ad = ::Gapic::Config::Method.new suggest_smart_campaign_ad_config + suggest_keyword_themes_config = parent_rpcs.suggest_keyword_themes if parent_rpcs.respond_to? :suggest_keyword_themes + @suggest_keyword_themes = ::Gapic::Config::Method.new suggest_keyword_themes_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/smart_campaign_suggest_service/credentials.rb b/lib/google/ads/google_ads/v25/services/smart_campaign_suggest_service/credentials.rb new file mode 100644 index 000000000..1af71b1d1 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/smart_campaign_suggest_service/credentials.rb @@ -0,0 +1,38 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Ads + module GoogleAds + module V25 + module Services + module SmartCampaignSuggestService + # Credentials for the SmartCampaignSuggestService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/adwords" + ] + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/smart_campaign_suggest_service/paths.rb b/lib/google/ads/google_ads/v25/services/smart_campaign_suggest_service/paths.rb new file mode 100644 index 000000000..ea3303964 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/smart_campaign_suggest_service/paths.rb @@ -0,0 +1,69 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Ads + module GoogleAds + module V25 + module Services + module SmartCampaignSuggestService + # Path helper methods for the SmartCampaignSuggestService API. + module Paths + ## + # Create a fully-qualified Campaign resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/campaigns/{campaign_id}` + # + # @param customer_id [String] + # @param campaign_id [String] + # + # @return [::String] + def campaign_path customer_id:, campaign_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/campaigns/#{campaign_id}" + end + + ## + # Create a fully-qualified KeywordThemeConstant resource string. + # + # The resource will be in the following format: + # + # `keywordThemeConstants/{express_category_id}~{express_sub_category_id}` + # + # @param express_category_id [String] + # @param express_sub_category_id [String] + # + # @return [::String] + def keyword_theme_constant_path express_category_id:, express_sub_category_id: + raise ::ArgumentError, "express_category_id cannot contain /" if express_category_id.to_s.include? "/" + + "keywordThemeConstants/#{express_category_id}~#{express_sub_category_id}" + end + + extend self + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/smart_campaign_suggest_service_pb.rb b/lib/google/ads/google_ads/v25/services/smart_campaign_suggest_service_pb.rb new file mode 100644 index 000000000..398a90ec9 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/smart_campaign_suggest_service_pb.rb @@ -0,0 +1,42 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/services/smart_campaign_suggest_service.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/common/ad_type_infos_pb' +require 'google/ads/google_ads/v25/common/criteria_pb' +require 'google/ads/google_ads/v25/resources/keyword_theme_constant_pb' +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' + + +descriptor_data = "\nFgoogle/ads/googleads/v25/services/smart_campaign_suggest_service.proto\x12!google.ads.googleads.v25.services\x1a\x33google/ads/googleads/v25/common/ad_type_infos.proto\x1a.google/ads/googleads/v25/common/criteria.proto\x1a?google/ads/googleads/v25/resources/keyword_theme_constant.proto\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\xf6\x01\n(SuggestSmartCampaignBudgetOptionsRequest\x12\x18\n\x0b\x63ustomer_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12=\n\x08\x63\x61mpaign\x18\x02 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!googleads.googleapis.com/CampaignH\x00\x12^\n\x0fsuggestion_info\x18\x03 \x01(\x0b\x32>.google.ads.googleads.v25.services.SmartCampaignSuggestionInfoB\x03\xe0\x41\x02H\x00\x42\x11\n\x0fsuggestion_data\"\xe5\x05\n\x1bSmartCampaignSuggestionInfo\x12\x16\n\tfinal_url\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\rlanguage_code\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12J\n\x0c\x61\x64_schedules\x18\x06 \x03(\x0b\x32/.google.ads.googleads.v25.common.AdScheduleInfoB\x03\xe0\x41\x01\x12N\n\x0ekeyword_themes\x18\x07 \x03(\x0b\x32\x31.google.ads.googleads.v25.common.KeywordThemeInfoB\x03\xe0\x41\x01\x12o\n\x10\x62usiness_context\x18\x08 \x01(\x0b\x32N.google.ads.googleads.v25.services.SmartCampaignSuggestionInfo.BusinessContextB\x03\xe0\x41\x01H\x00\x12(\n\x19\x62usiness_profile_location\x18\t \x01(\tB\x03\xe0\x41\x01H\x00\x12i\n\rlocation_list\x18\x04 \x01(\x0b\x32K.google.ads.googleads.v25.services.SmartCampaignSuggestionInfo.LocationListB\x03\xe0\x41\x01H\x01\x12H\n\tproximity\x18\x05 \x01(\x0b\x32..google.ads.googleads.v25.common.ProximityInfoB\x03\xe0\x41\x01H\x01\x1aU\n\x0cLocationList\x12\x45\n\tlocations\x18\x01 \x03(\x0b\x32-.google.ads.googleads.v25.common.LocationInfoB\x03\xe0\x41\x02\x1a-\n\x0f\x42usinessContext\x12\x1a\n\rbusiness_name\x18\x01 \x01(\tB\x03\xe0\x41\x01\x42\x12\n\x10\x62usiness_settingB\x0c\n\ngeo_target\"\xff\x04\n)SuggestSmartCampaignBudgetOptionsResponse\x12p\n\x03low\x18\x01 \x01(\x0b\x32Y.google.ads.googleads.v25.services.SuggestSmartCampaignBudgetOptionsResponse.BudgetOptionB\x03\xe0\x41\x01H\x00\x88\x01\x01\x12x\n\x0brecommended\x18\x02 \x01(\x0b\x32Y.google.ads.googleads.v25.services.SuggestSmartCampaignBudgetOptionsResponse.BudgetOptionB\x03\xe0\x41\x01H\x01\x88\x01\x01\x12q\n\x04high\x18\x03 \x01(\x0b\x32Y.google.ads.googleads.v25.services.SuggestSmartCampaignBudgetOptionsResponse.BudgetOptionB\x03\xe0\x41\x01H\x02\x88\x01\x01\x1a=\n\x07Metrics\x12\x18\n\x10min_daily_clicks\x18\x01 \x01(\x03\x12\x18\n\x10max_daily_clicks\x18\x02 \x01(\x03\x1a\x92\x01\n\x0c\x42udgetOption\x12\x1b\n\x13\x64\x61ily_amount_micros\x18\x01 \x01(\x03\x12\x65\n\x07metrics\x18\x02 \x01(\x0b\x32T.google.ads.googleads.v25.services.SuggestSmartCampaignBudgetOptionsResponse.MetricsB\x06\n\x04_lowB\x0e\n\x0c_recommendedB\x07\n\x05_high\"\x97\x01\n\x1dSuggestSmartCampaignAdRequest\x12\x18\n\x0b\x63ustomer_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\\\n\x0fsuggestion_info\x18\x02 \x01(\x0b\x32>.google.ads.googleads.v25.services.SmartCampaignSuggestionInfoB\x03\xe0\x41\x02\"l\n\x1eSuggestSmartCampaignAdResponse\x12J\n\x07\x61\x64_info\x18\x01 \x01(\x0b\x32\x34.google.ads.googleads.v25.common.SmartCampaignAdInfoB\x03\xe0\x41\x01\"\x95\x01\n\x1bSuggestKeywordThemesRequest\x12\x18\n\x0b\x63ustomer_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\\\n\x0fsuggestion_info\x18\x02 \x01(\x0b\x32>.google.ads.googleads.v25.services.SmartCampaignSuggestionInfoB\x03\xe0\x41\x02\"\xa5\x02\n\x1cSuggestKeywordThemesResponse\x12\x64\n\x0ekeyword_themes\x18\x02 \x03(\x0b\x32L.google.ads.googleads.v25.services.SuggestKeywordThemesResponse.KeywordTheme\x1a\x9e\x01\n\x0cKeywordTheme\x12Z\n\x16keyword_theme_constant\x18\x01 \x01(\x0b\x32\x38.google.ads.googleads.v25.resources.KeywordThemeConstantH\x00\x12!\n\x17\x66ree_form_keyword_theme\x18\x02 \x01(\tH\x00\x42\x0f\n\rkeyword_theme2\xea\x06\n\x1bSmartCampaignSuggestService\x12\x8b\x02\n!SuggestSmartCampaignBudgetOptions\x12K.google.ads.googleads.v25.services.SuggestSmartCampaignBudgetOptionsRequest\x1aL.google.ads.googleads.v25.services.SuggestSmartCampaignBudgetOptionsResponse\"K\x82\xd3\xe4\x93\x02\x45\"@/v25/customers/{customer_id=*}:suggestSmartCampaignBudgetOptions:\x01*\x12\xfd\x01\n\x16SuggestSmartCampaignAd\x12@.google.ads.googleads.v25.services.SuggestSmartCampaignAdRequest\x1a\x41.google.ads.googleads.v25.services.SuggestSmartCampaignAdResponse\"^\xda\x41\x1b\x63ustomer_id,suggestion_info\x82\xd3\xe4\x93\x02:\"5/v25/customers/{customer_id=*}:suggestSmartCampaignAd:\x01*\x12\xf5\x01\n\x14SuggestKeywordThemes\x12>.google.ads.googleads.v25.services.SuggestKeywordThemesRequest\x1a?.google.ads.googleads.v25.services.SuggestKeywordThemesResponse\"\\\xda\x41\x1b\x63ustomer_id,suggestion_info\x82\xd3\xe4\x93\x02\x38\"3/v25/customers/{customer_id=*}:suggestKeywordThemes:\x01*\x1a\x45\xca\x41\x18googleads.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/adwordsB\x8c\x02\n%com.google.ads.googleads.v25.servicesB SmartCampaignSuggestServiceProtoP\x01ZIgoogle.golang.org/genproto/googleapis/ads/googleads/v25/services;services\xa2\x02\x03GAA\xaa\x02!Google.Ads.GoogleAds.V25.Services\xca\x02!Google\\Ads\\GoogleAds\\V25\\Services\xea\x02%Google::Ads::GoogleAds::V25::Servicesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Services + SuggestSmartCampaignBudgetOptionsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.SuggestSmartCampaignBudgetOptionsRequest").msgclass + SmartCampaignSuggestionInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.SmartCampaignSuggestionInfo").msgclass + SmartCampaignSuggestionInfo::LocationList = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.SmartCampaignSuggestionInfo.LocationList").msgclass + SmartCampaignSuggestionInfo::BusinessContext = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.SmartCampaignSuggestionInfo.BusinessContext").msgclass + SuggestSmartCampaignBudgetOptionsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.SuggestSmartCampaignBudgetOptionsResponse").msgclass + SuggestSmartCampaignBudgetOptionsResponse::Metrics = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.SuggestSmartCampaignBudgetOptionsResponse.Metrics").msgclass + SuggestSmartCampaignBudgetOptionsResponse::BudgetOption = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.SuggestSmartCampaignBudgetOptionsResponse.BudgetOption").msgclass + SuggestSmartCampaignAdRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.SuggestSmartCampaignAdRequest").msgclass + SuggestSmartCampaignAdResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.SuggestSmartCampaignAdResponse").msgclass + SuggestKeywordThemesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.SuggestKeywordThemesRequest").msgclass + SuggestKeywordThemesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.SuggestKeywordThemesResponse").msgclass + SuggestKeywordThemesResponse::KeywordTheme = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.SuggestKeywordThemesResponse.KeywordTheme").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/smart_campaign_suggest_service_services_pb.rb b/lib/google/ads/google_ads/v25/services/smart_campaign_suggest_service_services_pb.rb new file mode 100644 index 000000000..4dc1c19c7 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/smart_campaign_suggest_service_services_pb.rb @@ -0,0 +1,52 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/ads/googleads/v25/services/smart_campaign_suggest_service.proto for package 'Google.Ads.GoogleAds.V25.Services' +# Original file comments: +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +require 'grpc' +require 'google/ads/google_ads/v25/services/smart_campaign_suggest_service_pb' + +module Google + module Ads + module GoogleAds + module V25 + module Services + module SmartCampaignSuggestService + # Service to get suggestions for Smart Campaigns. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.ads.googleads.v25.services.SmartCampaignSuggestService' + + # Returns BudgetOption suggestions. + rpc :SuggestSmartCampaignBudgetOptions, ::Google::Ads::GoogleAds::V25::Services::SuggestSmartCampaignBudgetOptionsRequest, ::Google::Ads::GoogleAds::V25::Services::SuggestSmartCampaignBudgetOptionsResponse + # Suggests a Smart campaign ad compatible with the Ad family of resources, + # based on data points such as targeting and the business to advertise. + rpc :SuggestSmartCampaignAd, ::Google::Ads::GoogleAds::V25::Services::SuggestSmartCampaignAdRequest, ::Google::Ads::GoogleAds::V25::Services::SuggestSmartCampaignAdResponse + # Suggests keyword themes to advertise on. + rpc :SuggestKeywordThemes, ::Google::Ads::GoogleAds::V25::Services::SuggestKeywordThemesRequest, ::Google::Ads::GoogleAds::V25::Services::SuggestKeywordThemesResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/third_party_app_analytics_link_service.rb b/lib/google/ads/google_ads/v25/services/third_party_app_analytics_link_service.rb new file mode 100644 index 000000000..ec6cf9124 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/third_party_app_analytics_link_service.rb @@ -0,0 +1,52 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/ads/google_ads/version" + +require "google/ads/google_ads/v25/services/third_party_app_analytics_link_service/credentials" +require "google/ads/google_ads/v25/services/third_party_app_analytics_link_service/paths" +require "google/ads/google_ads/v25/services/third_party_app_analytics_link_service/client" + +module Google + module Ads + module GoogleAds + module V25 + module Services + ## + # This service allows management of links between Google Ads and third party + # app analytics. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/ads/google_ads/v25/services/third_party_app_analytics_link_service" + # client = ::Google::Ads::GoogleAds::V25::Services::ThirdPartyAppAnalyticsLinkService::Client.new + # + module ThirdPartyAppAnalyticsLinkService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "third_party_app_analytics_link_service", "helpers.rb" +require "google/ads/google_ads/v25/services/third_party_app_analytics_link_service/helpers" if ::File.file? helper_path diff --git a/lib/google/ads/google_ads/v25/services/third_party_app_analytics_link_service/client.rb b/lib/google/ads/google_ads/v25/services/third_party_app_analytics_link_service/client.rb new file mode 100644 index 000000000..78b98f4d1 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/third_party_app_analytics_link_service/client.rb @@ -0,0 +1,488 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# require "google/ads/google_ads/error" +require "google/ads/google_ads/v25/services/third_party_app_analytics_link_service_pb" + +module Google + module Ads + module GoogleAds + module V25 + module Services + module ThirdPartyAppAnalyticsLinkService + ## + # Client for the ThirdPartyAppAnalyticsLinkService service. + # + # This service allows management of links between Google Ads and third party + # app analytics. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "googleads.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :third_party_app_analytics_link_service_stub + + ## + # Configure the ThirdPartyAppAnalyticsLinkService Client class. + # + # See {::Google::Ads::GoogleAds::V25::Services::ThirdPartyAppAnalyticsLinkService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all ThirdPartyAppAnalyticsLinkService clients + # ::Google::Ads::GoogleAds::V25::Services::ThirdPartyAppAnalyticsLinkService::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + default_config = Client::Configuration.new + + default_config.timeout = 14_400.0 + default_config.retry_policy = { + initial_delay: 5.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the ThirdPartyAppAnalyticsLinkService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Ads::GoogleAds::V25::Services::ThirdPartyAppAnalyticsLinkService::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @third_party_app_analytics_link_service_stub.universe_domain + end + + ## + # Create a new ThirdPartyAppAnalyticsLinkService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Ads::GoogleAds::V25::Services::ThirdPartyAppAnalyticsLinkService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Ads::GoogleAds::V25::Services::ThirdPartyAppAnalyticsLinkService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the ThirdPartyAppAnalyticsLinkService client. + # @yieldparam config [Client::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/ads/google_ads/v25/services/third_party_app_analytics_link_service_services_pb" + + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @third_party_app_analytics_link_service_stub = ::Gapic::ServiceStub.new( + ::Google::Ads::GoogleAds::V25::Services::ThirdPartyAppAnalyticsLinkService::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool, + logger: @config.logger + ) + + @third_party_app_analytics_link_service_stub.stub_logger&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @third_party_app_analytics_link_service_stub.logger + end + + # Service calls + + ## + # Regenerate ThirdPartyAppAnalyticsLink.shareable_link_id that should be + # provided to the third party when setting up app analytics. + # + # List of thrown errors: + # [AuthenticationError]() + # [AuthorizationError]() + # [HeaderError]() + # [InternalError]() + # [QuotaError]() + # [RequestError]() + # + # @overload regenerate_shareable_link_id(request, options = nil) + # Pass arguments to `regenerate_shareable_link_id` via a request object, either of type + # {::Google::Ads::GoogleAds::V25::Services::RegenerateShareableLinkIdRequest} or an equivalent Hash. + # + # @param request [::Google::Ads::GoogleAds::V25::Services::RegenerateShareableLinkIdRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload regenerate_shareable_link_id(resource_name: nil) + # Pass arguments to `regenerate_shareable_link_id` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param resource_name [::String] + # Resource name of the third party app analytics link. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Ads::GoogleAds::V25::Services::RegenerateShareableLinkIdResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Ads::GoogleAds::V25::Services::RegenerateShareableLinkIdResponse] + # + # @raise [Google::Ads::GoogleAds::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/ads/google_ads/v25/services" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Ads::GoogleAds::V25::Services::ThirdPartyAppAnalyticsLinkService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Ads::GoogleAds::V25::Services::RegenerateShareableLinkIdRequest.new + # + # # Call the regenerate_shareable_link_id method. + # result = client.regenerate_shareable_link_id request + # + # # The returned object is of type Google::Ads::GoogleAds::V25::Services::RegenerateShareableLinkIdResponse. + # p result + # + def regenerate_shareable_link_id request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::GoogleAds::V25::Services::RegenerateShareableLinkIdRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.regenerate_shareable_link_id.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Ads::GoogleAds::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.resource_name + header_params["resource_name"] = request.resource_name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.regenerate_shareable_link_id.timeout, + metadata: metadata, + retry_policy: @config.rpcs.regenerate_shareable_link_id.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @third_party_app_analytics_link_service_stub.call_rpc :regenerate_shareable_link_id, request, + options: options do |response, operation| + yield response, operation if block_given? + end + # rescue GRPC::BadStatus => grpc_error + # raise Google::Ads::GoogleAds::Error.new grpc_error.message + end + + ## + # Configuration class for the ThirdPartyAppAnalyticsLinkService API. + # + # This class represents the configuration for ThirdPartyAppAnalyticsLinkService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Ads::GoogleAds::V25::Services::ThirdPartyAppAnalyticsLinkService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # regenerate_shareable_link_id to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Ads::GoogleAds::V25::Services::ThirdPartyAppAnalyticsLinkService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.regenerate_shareable_link_id.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Ads::GoogleAds::V25::Services::ThirdPartyAppAnalyticsLinkService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.regenerate_shareable_link_id.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Ads::GoogleAds::V25::Services::ThirdPartyAppAnalyticsLinkService::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "googleads.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, + ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the ThirdPartyAppAnalyticsLinkService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `regenerate_shareable_link_id` + # @return [::Gapic::Config::Method] + # + attr_reader :regenerate_shareable_link_id + + # @private + def initialize parent_rpcs = nil + regenerate_shareable_link_id_config = parent_rpcs.regenerate_shareable_link_id if parent_rpcs.respond_to? :regenerate_shareable_link_id + @regenerate_shareable_link_id = ::Gapic::Config::Method.new regenerate_shareable_link_id_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/third_party_app_analytics_link_service/credentials.rb b/lib/google/ads/google_ads/v25/services/third_party_app_analytics_link_service/credentials.rb new file mode 100644 index 000000000..bebaac155 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/third_party_app_analytics_link_service/credentials.rb @@ -0,0 +1,38 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Ads + module GoogleAds + module V25 + module Services + module ThirdPartyAppAnalyticsLinkService + # Credentials for the ThirdPartyAppAnalyticsLinkService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/adwords" + ] + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/third_party_app_analytics_link_service/paths.rb b/lib/google/ads/google_ads/v25/services/third_party_app_analytics_link_service/paths.rb new file mode 100644 index 000000000..1483f4db9 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/third_party_app_analytics_link_service/paths.rb @@ -0,0 +1,52 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Ads + module GoogleAds + module V25 + module Services + module ThirdPartyAppAnalyticsLinkService + # Path helper methods for the ThirdPartyAppAnalyticsLinkService API. + module Paths + ## + # Create a fully-qualified ThirdPartyAppAnalyticsLink resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/thirdPartyAppAnalyticsLinks/{customer_link_id}` + # + # @param customer_id [String] + # @param customer_link_id [String] + # + # @return [::String] + def third_party_app_analytics_link_path customer_id:, customer_link_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/thirdPartyAppAnalyticsLinks/#{customer_link_id}" + end + + extend self + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/third_party_app_analytics_link_service_pb.rb b/lib/google/ads/google_ads/v25/services/third_party_app_analytics_link_service_pb.rb new file mode 100644 index 000000000..89bedd8bf --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/third_party_app_analytics_link_service_pb.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/services/third_party_app_analytics_link_service.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/resource_pb' + + +descriptor_data = "\nNgoogle/ads/googleads/v25/services/third_party_app_analytics_link_service.proto\x12!google.ads.googleads.v25.services\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x19google/api/resource.proto\"s\n RegenerateShareableLinkIdRequest\x12O\n\rresource_name\x18\x01 \x01(\tB8\xfa\x41\x35\n3googleads.googleapis.com/ThirdPartyAppAnalyticsLink\"#\n!RegenerateShareableLinkIdResponse2\xf8\x02\n!ThirdPartyAppAnalyticsLinkService\x12\x8b\x02\n\x19RegenerateShareableLinkId\x12\x43.google.ads.googleads.v25.services.RegenerateShareableLinkIdRequest\x1a\x44.google.ads.googleads.v25.services.RegenerateShareableLinkIdResponse\"c\x82\xd3\xe4\x93\x02]\"X/v25/{resource_name=customers/*/thirdPartyAppAnalyticsLinks/*}:regenerateShareableLinkId:\x01*\x1a\x45\xca\x41\x18googleads.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/adwordsB\x92\x02\n%com.google.ads.googleads.v25.servicesB&ThirdPartyAppAnalyticsLinkServiceProtoP\x01ZIgoogle.golang.org/genproto/googleapis/ads/googleads/v25/services;services\xa2\x02\x03GAA\xaa\x02!Google.Ads.GoogleAds.V25.Services\xca\x02!Google\\Ads\\GoogleAds\\V25\\Services\xea\x02%Google::Ads::GoogleAds::V25::Servicesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Services + RegenerateShareableLinkIdRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.RegenerateShareableLinkIdRequest").msgclass + RegenerateShareableLinkIdResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.RegenerateShareableLinkIdResponse").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/third_party_app_analytics_link_service_services_pb.rb b/lib/google/ads/google_ads/v25/services/third_party_app_analytics_link_service_services_pb.rb new file mode 100644 index 000000000..c1ba53d42 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/third_party_app_analytics_link_service_services_pb.rb @@ -0,0 +1,57 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/ads/googleads/v25/services/third_party_app_analytics_link_service.proto for package 'Google.Ads.GoogleAds.V25.Services' +# Original file comments: +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +require 'grpc' +require 'google/ads/google_ads/v25/services/third_party_app_analytics_link_service_pb' + +module Google + module Ads + module GoogleAds + module V25 + module Services + module ThirdPartyAppAnalyticsLinkService + # This service allows management of links between Google Ads and third party + # app analytics. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.ads.googleads.v25.services.ThirdPartyAppAnalyticsLinkService' + + # Regenerate ThirdPartyAppAnalyticsLink.shareable_link_id that should be + # provided to the third party when setting up app analytics. + # + # List of thrown errors: + # [AuthenticationError]() + # [AuthorizationError]() + # [HeaderError]() + # [InternalError]() + # [QuotaError]() + # [RequestError]() + rpc :RegenerateShareableLinkId, ::Google::Ads::GoogleAds::V25::Services::RegenerateShareableLinkIdRequest, ::Google::Ads::GoogleAds::V25::Services::RegenerateShareableLinkIdResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/travel_asset_suggestion_service.rb b/lib/google/ads/google_ads/v25/services/travel_asset_suggestion_service.rb new file mode 100644 index 000000000..015852cf8 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/travel_asset_suggestion_service.rb @@ -0,0 +1,50 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/ads/google_ads/version" + +require "google/ads/google_ads/v25/services/travel_asset_suggestion_service/credentials" +require "google/ads/google_ads/v25/services/travel_asset_suggestion_service/client" + +module Google + module Ads + module GoogleAds + module V25 + module Services + ## + # Service to retrieve Travel asset suggestions. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/ads/google_ads/v25/services/travel_asset_suggestion_service" + # client = ::Google::Ads::GoogleAds::V25::Services::TravelAssetSuggestionService::Client.new + # + module TravelAssetSuggestionService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "travel_asset_suggestion_service", "helpers.rb" +require "google/ads/google_ads/v25/services/travel_asset_suggestion_service/helpers" if ::File.file? helper_path diff --git a/lib/google/ads/google_ads/v25/services/travel_asset_suggestion_service/client.rb b/lib/google/ads/google_ads/v25/services/travel_asset_suggestion_service/client.rb new file mode 100644 index 000000000..c423cf02b --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/travel_asset_suggestion_service/client.rb @@ -0,0 +1,487 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# require "google/ads/google_ads/error" +require "google/ads/google_ads/v25/services/travel_asset_suggestion_service_pb" + +module Google + module Ads + module GoogleAds + module V25 + module Services + module TravelAssetSuggestionService + ## + # Client for the TravelAssetSuggestionService service. + # + # Service to retrieve Travel asset suggestions. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "googleads.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :travel_asset_suggestion_service_stub + + ## + # Configure the TravelAssetSuggestionService Client class. + # + # See {::Google::Ads::GoogleAds::V25::Services::TravelAssetSuggestionService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all TravelAssetSuggestionService clients + # ::Google::Ads::GoogleAds::V25::Services::TravelAssetSuggestionService::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + default_config = Client::Configuration.new + + default_config.timeout = 14_400.0 + default_config.retry_policy = { + initial_delay: 5.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the TravelAssetSuggestionService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Ads::GoogleAds::V25::Services::TravelAssetSuggestionService::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @travel_asset_suggestion_service_stub.universe_domain + end + + ## + # Create a new TravelAssetSuggestionService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Ads::GoogleAds::V25::Services::TravelAssetSuggestionService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Ads::GoogleAds::V25::Services::TravelAssetSuggestionService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the TravelAssetSuggestionService client. + # @yieldparam config [Client::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/ads/google_ads/v25/services/travel_asset_suggestion_service_services_pb" + + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @travel_asset_suggestion_service_stub = ::Gapic::ServiceStub.new( + ::Google::Ads::GoogleAds::V25::Services::TravelAssetSuggestionService::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool, + logger: @config.logger + ) + + @travel_asset_suggestion_service_stub.stub_logger&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @travel_asset_suggestion_service_stub.logger + end + + # Service calls + + ## + # Returns Travel Asset suggestions. Asset + # suggestions are returned on a best-effort basis. There are no guarantees + # that all possible asset types will be returned for any given hotel + # property. + # + # @overload suggest_travel_assets(request, options = nil) + # Pass arguments to `suggest_travel_assets` via a request object, either of type + # {::Google::Ads::GoogleAds::V25::Services::SuggestTravelAssetsRequest} or an equivalent Hash. + # + # @param request [::Google::Ads::GoogleAds::V25::Services::SuggestTravelAssetsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload suggest_travel_assets(customer_id: nil, language_option: nil, place_ids: nil) + # Pass arguments to `suggest_travel_assets` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param customer_id [::String] + # Required. The ID of the customer. + # @param language_option [::String] + # Required. The language specifications in BCP 47 format (for example, en-US, + # zh-CN, etc.) for the asset suggestions. Text will be in this language. + # Usually matches one of the campaign target languages. + # @param place_ids [::Array<::String>] + # The Google Maps Place IDs of hotels for which assets are requested. See + # https://developers.google.com/places/web-service/place-id for more + # information. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Ads::GoogleAds::V25::Services::SuggestTravelAssetsResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Ads::GoogleAds::V25::Services::SuggestTravelAssetsResponse] + # + # @raise [Google::Ads::GoogleAds::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/ads/google_ads/v25/services" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Ads::GoogleAds::V25::Services::TravelAssetSuggestionService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Ads::GoogleAds::V25::Services::SuggestTravelAssetsRequest.new + # + # # Call the suggest_travel_assets method. + # result = client.suggest_travel_assets request + # + # # The returned object is of type Google::Ads::GoogleAds::V25::Services::SuggestTravelAssetsResponse. + # p result + # + def suggest_travel_assets request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::GoogleAds::V25::Services::SuggestTravelAssetsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.suggest_travel_assets.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Ads::GoogleAds::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.customer_id + header_params["customer_id"] = request.customer_id + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.suggest_travel_assets.timeout, + metadata: metadata, + retry_policy: @config.rpcs.suggest_travel_assets.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @travel_asset_suggestion_service_stub.call_rpc :suggest_travel_assets, request, + options: options do |response, operation| + yield response, operation if block_given? + end + # rescue GRPC::BadStatus => grpc_error + # raise Google::Ads::GoogleAds::Error.new grpc_error.message + end + + ## + # Configuration class for the TravelAssetSuggestionService API. + # + # This class represents the configuration for TravelAssetSuggestionService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Ads::GoogleAds::V25::Services::TravelAssetSuggestionService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # suggest_travel_assets to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Ads::GoogleAds::V25::Services::TravelAssetSuggestionService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.suggest_travel_assets.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Ads::GoogleAds::V25::Services::TravelAssetSuggestionService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.suggest_travel_assets.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Ads::GoogleAds::V25::Services::TravelAssetSuggestionService::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "googleads.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, + ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the TravelAssetSuggestionService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `suggest_travel_assets` + # @return [::Gapic::Config::Method] + # + attr_reader :suggest_travel_assets + + # @private + def initialize parent_rpcs = nil + suggest_travel_assets_config = parent_rpcs.suggest_travel_assets if parent_rpcs.respond_to? :suggest_travel_assets + @suggest_travel_assets = ::Gapic::Config::Method.new suggest_travel_assets_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/travel_asset_suggestion_service/credentials.rb b/lib/google/ads/google_ads/v25/services/travel_asset_suggestion_service/credentials.rb new file mode 100644 index 000000000..df117e36f --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/travel_asset_suggestion_service/credentials.rb @@ -0,0 +1,38 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Ads + module GoogleAds + module V25 + module Services + module TravelAssetSuggestionService + # Credentials for the TravelAssetSuggestionService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/adwords" + ] + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/travel_asset_suggestion_service_pb.rb b/lib/google/ads/google_ads/v25/services/travel_asset_suggestion_service_pb.rb new file mode 100644 index 000000000..dbbea7bd0 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/travel_asset_suggestion_service_pb.rb @@ -0,0 +1,34 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/services/travel_asset_suggestion_service.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/enums/asset_field_type_pb' +require 'google/ads/google_ads/v25/enums/call_to_action_type_pb' +require 'google/ads/google_ads/v25/enums/hotel_asset_suggestion_status_pb' +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' + + +descriptor_data = "\nGgoogle/ads/googleads/v25/services/travel_asset_suggestion_service.proto\x12!google.ads.googleads.v25.services\x1a\x35google/ads/googleads/v25/enums/asset_field_type.proto\x1a\x38google/ads/googleads/v25/enums/call_to_action_type.proto\x1a\x42google/ads/googleads/v25/enums/hotel_asset_suggestion_status.proto\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\"g\n\x1aSuggestTravelAssetsRequest\x12\x18\n\x0b\x63ustomer_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x1c\n\x0flanguage_option\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x11\n\tplace_ids\x18\x04 \x03(\t\"w\n\x1bSuggestTravelAssetsResponse\x12X\n\x17hotel_asset_suggestions\x18\x01 \x03(\x0b\x32\x37.google.ads.googleads.v25.services.HotelAssetSuggestion\"\xab\x03\n\x14HotelAssetSuggestion\x12\x10\n\x08place_id\x18\x01 \x01(\t\x12\x11\n\tfinal_url\x18\x02 \x01(\t\x12\x12\n\nhotel_name\x18\x03 \x01(\t\x12]\n\x0e\x63\x61ll_to_action\x18\x04 \x01(\x0e\x32\x45.google.ads.googleads.v25.enums.CallToActionTypeEnum.CallToActionType\x12\x46\n\x0btext_assets\x18\x05 \x03(\x0b\x32\x31.google.ads.googleads.v25.services.HotelTextAsset\x12H\n\x0cimage_assets\x18\x06 \x03(\x0b\x32\x32.google.ads.googleads.v25.services.HotelImageAsset\x12i\n\x06status\x18\x07 \x01(\x0e\x32Y.google.ads.googleads.v25.enums.HotelAssetSuggestionStatusEnum.HotelAssetSuggestionStatus\"{\n\x0eHotelTextAsset\x12\x0c\n\x04text\x18\x01 \x01(\t\x12[\n\x10\x61sset_field_type\x18\x02 \x01(\x0e\x32\x41.google.ads.googleads.v25.enums.AssetFieldTypeEnum.AssetFieldType\"{\n\x0fHotelImageAsset\x12\x0b\n\x03uri\x18\x01 \x01(\t\x12[\n\x10\x61sset_field_type\x18\x02 \x01(\x0e\x32\x41.google.ads.googleads.v25.enums.AssetFieldTypeEnum.AssetFieldType2\xd9\x02\n\x1cTravelAssetSuggestionService\x12\xf1\x01\n\x13SuggestTravelAssets\x12=.google.ads.googleads.v25.services.SuggestTravelAssetsRequest\x1a>.google.ads.googleads.v25.services.SuggestTravelAssetsResponse\"[\xda\x41\x1b\x63ustomer_id,language_option\x82\xd3\xe4\x93\x02\x37\"2/v25/customers/{customer_id=*}:suggestTravelAssets:\x01*\x1a\x45\xca\x41\x18googleads.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/adwordsB\x8d\x02\n%com.google.ads.googleads.v25.servicesB!TravelAssetSuggestionServiceProtoP\x01ZIgoogle.golang.org/genproto/googleapis/ads/googleads/v25/services;services\xa2\x02\x03GAA\xaa\x02!Google.Ads.GoogleAds.V25.Services\xca\x02!Google\\Ads\\GoogleAds\\V25\\Services\xea\x02%Google::Ads::GoogleAds::V25::Servicesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Services + SuggestTravelAssetsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.SuggestTravelAssetsRequest").msgclass + SuggestTravelAssetsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.SuggestTravelAssetsResponse").msgclass + HotelAssetSuggestion = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.HotelAssetSuggestion").msgclass + HotelTextAsset = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.HotelTextAsset").msgclass + HotelImageAsset = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.HotelImageAsset").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/travel_asset_suggestion_service_services_pb.rb b/lib/google/ads/google_ads/v25/services/travel_asset_suggestion_service_services_pb.rb new file mode 100644 index 000000000..3c641d37e --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/travel_asset_suggestion_service_services_pb.rb @@ -0,0 +1,50 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/ads/googleads/v25/services/travel_asset_suggestion_service.proto for package 'Google.Ads.GoogleAds.V25.Services' +# Original file comments: +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +require 'grpc' +require 'google/ads/google_ads/v25/services/travel_asset_suggestion_service_pb' + +module Google + module Ads + module GoogleAds + module V25 + module Services + module TravelAssetSuggestionService + # Service to retrieve Travel asset suggestions. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.ads.googleads.v25.services.TravelAssetSuggestionService' + + # Returns Travel Asset suggestions. Asset + # suggestions are returned on a best-effort basis. There are no guarantees + # that all possible asset types will be returned for any given hotel + # property. + rpc :SuggestTravelAssets, ::Google::Ads::GoogleAds::V25::Services::SuggestTravelAssetsRequest, ::Google::Ads::GoogleAds::V25::Services::SuggestTravelAssetsResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/user_data_service.rb b/lib/google/ads/google_ads/v25/services/user_data_service.rb new file mode 100644 index 000000000..c41b1ca50 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/user_data_service.rb @@ -0,0 +1,55 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/ads/google_ads/version" + +require "google/ads/google_ads/v25/services/user_data_service/credentials" +require "google/ads/google_ads/v25/services/user_data_service/client" + +module Google + module Ads + module GoogleAds + module V25 + module Services + ## + # Service to manage user data uploads. + # Any uploads made to a Customer Match list through this service will be + # eligible for matching as per the customer matching process. See + # https://support.google.com/google-ads/answer/7474263. However, the uploads + # made through this service will not be visible under the 'Segment members' + # section for the Customer Match List in the Google Ads UI. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/ads/google_ads/v25/services/user_data_service" + # client = ::Google::Ads::GoogleAds::V25::Services::UserDataService::Client.new + # + module UserDataService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "user_data_service", "helpers.rb" +require "google/ads/google_ads/v25/services/user_data_service/helpers" if ::File.file? helper_path diff --git a/lib/google/ads/google_ads/v25/services/user_data_service/client.rb b/lib/google/ads/google_ads/v25/services/user_data_service/client.rb new file mode 100644 index 000000000..d7702f8c0 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/user_data_service/client.rb @@ -0,0 +1,497 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# require "google/ads/google_ads/error" +require "google/ads/google_ads/v25/services/user_data_service_pb" + +module Google + module Ads + module GoogleAds + module V25 + module Services + module UserDataService + ## + # Client for the UserDataService service. + # + # Service to manage user data uploads. + # Any uploads made to a Customer Match list through this service will be + # eligible for matching as per the customer matching process. See + # https://support.google.com/google-ads/answer/7474263. However, the uploads + # made through this service will not be visible under the 'Segment members' + # section for the Customer Match List in the Google Ads UI. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "googleads.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :user_data_service_stub + + ## + # Configure the UserDataService Client class. + # + # See {::Google::Ads::GoogleAds::V25::Services::UserDataService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all UserDataService clients + # ::Google::Ads::GoogleAds::V25::Services::UserDataService::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + default_config = Client::Configuration.new + + default_config.timeout = 14_400.0 + default_config.retry_policy = { + initial_delay: 5.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the UserDataService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Ads::GoogleAds::V25::Services::UserDataService::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @user_data_service_stub.universe_domain + end + + ## + # Create a new UserDataService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Ads::GoogleAds::V25::Services::UserDataService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Ads::GoogleAds::V25::Services::UserDataService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the UserDataService client. + # @yieldparam config [Client::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/ads/google_ads/v25/services/user_data_service_services_pb" + + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @user_data_service_stub = ::Gapic::ServiceStub.new( + ::Google::Ads::GoogleAds::V25::Services::UserDataService::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool, + logger: @config.logger + ) + + @user_data_service_stub.stub_logger&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @user_data_service_stub.logger + end + + # Service calls + + ## + # Uploads the given user data. + # + # List of thrown errors: + # [AuthenticationError]() + # [AuthorizationError]() + # [CollectionSizeError]() + # [FieldError]() + # [HeaderError]() + # [InternalError]() + # [MutateError]() + # [OfflineUserDataJobError]() + # [QuotaError]() + # [RequestError]() + # [UserDataError]() + # + # @overload upload_user_data(request, options = nil) + # Pass arguments to `upload_user_data` via a request object, either of type + # {::Google::Ads::GoogleAds::V25::Services::UploadUserDataRequest} or an equivalent Hash. + # + # @param request [::Google::Ads::GoogleAds::V25::Services::UploadUserDataRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload upload_user_data(customer_id: nil, operations: nil, customer_match_user_list_metadata: nil) + # Pass arguments to `upload_user_data` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param customer_id [::String] + # Required. The ID of the customer for which to update the user data. + # @param operations [::Array<::Google::Ads::GoogleAds::V25::Services::UserDataOperation, ::Hash>] + # Required. The list of operations to be done. + # @param customer_match_user_list_metadata [::Google::Ads::GoogleAds::V25::Common::CustomerMatchUserListMetadata, ::Hash] + # Metadata for data updates to a Customer Match user list. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Ads::GoogleAds::V25::Services::UploadUserDataResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Ads::GoogleAds::V25::Services::UploadUserDataResponse] + # + # @raise [Google::Ads::GoogleAds::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/ads/google_ads/v25/services" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Ads::GoogleAds::V25::Services::UserDataService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Ads::GoogleAds::V25::Services::UploadUserDataRequest.new + # + # # Call the upload_user_data method. + # result = client.upload_user_data request + # + # # The returned object is of type Google::Ads::GoogleAds::V25::Services::UploadUserDataResponse. + # p result + # + def upload_user_data request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::GoogleAds::V25::Services::UploadUserDataRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.upload_user_data.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Ads::GoogleAds::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.customer_id + header_params["customer_id"] = request.customer_id + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.upload_user_data.timeout, + metadata: metadata, + retry_policy: @config.rpcs.upload_user_data.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @user_data_service_stub.call_rpc :upload_user_data, request, options: options do |response, operation| + yield response, operation if block_given? + end + # rescue GRPC::BadStatus => grpc_error + # raise Google::Ads::GoogleAds::Error.new grpc_error.message + end + + ## + # Configuration class for the UserDataService API. + # + # This class represents the configuration for UserDataService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Ads::GoogleAds::V25::Services::UserDataService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # upload_user_data to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Ads::GoogleAds::V25::Services::UserDataService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.upload_user_data.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Ads::GoogleAds::V25::Services::UserDataService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.upload_user_data.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Ads::GoogleAds::V25::Services::UserDataService::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "googleads.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, + ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the UserDataService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `upload_user_data` + # @return [::Gapic::Config::Method] + # + attr_reader :upload_user_data + + # @private + def initialize parent_rpcs = nil + upload_user_data_config = parent_rpcs.upload_user_data if parent_rpcs.respond_to? :upload_user_data + @upload_user_data = ::Gapic::Config::Method.new upload_user_data_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/user_data_service/credentials.rb b/lib/google/ads/google_ads/v25/services/user_data_service/credentials.rb new file mode 100644 index 000000000..41430d84a --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/user_data_service/credentials.rb @@ -0,0 +1,38 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Ads + module GoogleAds + module V25 + module Services + module UserDataService + # Credentials for the UserDataService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/adwords" + ] + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/user_data_service_pb.rb b/lib/google/ads/google_ads/v25/services/user_data_service_pb.rb new file mode 100644 index 000000000..276424ca4 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/user_data_service_pb.rb @@ -0,0 +1,30 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/services/user_data_service.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/common/offline_user_data_pb' +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' + + +descriptor_data = "\n9google/ads/googleads/v25/services/user_data_service.proto\x12!google.ads.googleads.v25.services\x1a\x37google/ads/googleads/v25/common/offline_user_data.proto\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\"\xf9\x01\n\x15UploadUserDataRequest\x12\x18\n\x0b\x63ustomer_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12M\n\noperations\x18\x03 \x03(\x0b\x32\x34.google.ads.googleads.v25.services.UserDataOperationB\x03\xe0\x41\x02\x12k\n!customer_match_user_list_metadata\x18\x02 \x01(\x0b\x32>.google.ads.googleads.v25.common.CustomerMatchUserListMetadataH\x00\x42\n\n\x08metadata\"\x9a\x01\n\x11UserDataOperation\x12;\n\x06\x63reate\x18\x01 \x01(\x0b\x32).google.ads.googleads.v25.common.UserDataH\x00\x12;\n\x06remove\x18\x02 \x01(\x0b\x32).google.ads.googleads.v25.common.UserDataH\x00\x42\x0b\n\toperation\"\x92\x01\n\x16UploadUserDataResponse\x12\x1d\n\x10upload_date_time\x18\x03 \x01(\tH\x00\x88\x01\x01\x12&\n\x19received_operations_count\x18\x04 \x01(\x05H\x01\x88\x01\x01\x42\x13\n\x11_upload_date_timeB\x1c\n\x1a_received_operations_count2\x9a\x02\n\x0fUserDataService\x12\xbf\x01\n\x0eUploadUserData\x12\x38.google.ads.googleads.v25.services.UploadUserDataRequest\x1a\x39.google.ads.googleads.v25.services.UploadUserDataResponse\"8\x82\xd3\xe4\x93\x02\x32\"-/v25/customers/{customer_id=*}:uploadUserData:\x01*\x1a\x45\xca\x41\x18googleads.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/adwordsB\x80\x02\n%com.google.ads.googleads.v25.servicesB\x14UserDataServiceProtoP\x01ZIgoogle.golang.org/genproto/googleapis/ads/googleads/v25/services;services\xa2\x02\x03GAA\xaa\x02!Google.Ads.GoogleAds.V25.Services\xca\x02!Google\\Ads\\GoogleAds\\V25\\Services\xea\x02%Google::Ads::GoogleAds::V25::Servicesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Services + UploadUserDataRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.UploadUserDataRequest").msgclass + UserDataOperation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.UserDataOperation").msgclass + UploadUserDataResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.UploadUserDataResponse").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/user_data_service_services_pb.rb b/lib/google/ads/google_ads/v25/services/user_data_service_services_pb.rb new file mode 100644 index 000000000..c31dd5d72 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/user_data_service_services_pb.rb @@ -0,0 +1,67 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/ads/googleads/v25/services/user_data_service.proto for package 'Google.Ads.GoogleAds.V25.Services' +# Original file comments: +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +require 'grpc' +require 'google/ads/google_ads/v25/services/user_data_service_pb' + +module Google + module Ads + module GoogleAds + module V25 + module Services + module UserDataService + # Proto file describing the UserDataService. + # + # Service to manage user data uploads. + # Any uploads made to a Customer Match list through this service will be + # eligible for matching as per the customer matching process. See + # https://support.google.com/google-ads/answer/7474263. However, the uploads + # made through this service will not be visible under the 'Segment members' + # section for the Customer Match List in the Google Ads UI. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.ads.googleads.v25.services.UserDataService' + + # Uploads the given user data. + # + # List of thrown errors: + # [AuthenticationError]() + # [AuthorizationError]() + # [CollectionSizeError]() + # [FieldError]() + # [HeaderError]() + # [InternalError]() + # [MutateError]() + # [OfflineUserDataJobError]() + # [QuotaError]() + # [RequestError]() + # [UserDataError]() + rpc :UploadUserData, ::Google::Ads::GoogleAds::V25::Services::UploadUserDataRequest, ::Google::Ads::GoogleAds::V25::Services::UploadUserDataResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/user_list_customer_type_service.rb b/lib/google/ads/google_ads/v25/services/user_list_customer_type_service.rb new file mode 100644 index 000000000..c1c72b3a2 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/user_list_customer_type_service.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/ads/google_ads/version" + +require "google/ads/google_ads/v25/services/user_list_customer_type_service/credentials" +require "google/ads/google_ads/v25/services/user_list_customer_type_service/paths" +require "google/ads/google_ads/v25/services/user_list_customer_type_service/client" + +module Google + module Ads + module GoogleAds + module V25 + module Services + ## + # Service to manage user list customer types. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/ads/google_ads/v25/services/user_list_customer_type_service" + # client = ::Google::Ads::GoogleAds::V25::Services::UserListCustomerTypeService::Client.new + # + module UserListCustomerTypeService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "user_list_customer_type_service", "helpers.rb" +require "google/ads/google_ads/v25/services/user_list_customer_type_service/helpers" if ::File.file? helper_path diff --git a/lib/google/ads/google_ads/v25/services/user_list_customer_type_service/client.rb b/lib/google/ads/google_ads/v25/services/user_list_customer_type_service/client.rb new file mode 100644 index 000000000..e73efa7a8 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/user_list_customer_type_service/client.rb @@ -0,0 +1,500 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# require "google/ads/google_ads/error" +require "google/ads/google_ads/v25/services/user_list_customer_type_service_pb" + +module Google + module Ads + module GoogleAds + module V25 + module Services + module UserListCustomerTypeService + ## + # Client for the UserListCustomerTypeService service. + # + # Service to manage user list customer types. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "googleads.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :user_list_customer_type_service_stub + + ## + # Configure the UserListCustomerTypeService Client class. + # + # See {::Google::Ads::GoogleAds::V25::Services::UserListCustomerTypeService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all UserListCustomerTypeService clients + # ::Google::Ads::GoogleAds::V25::Services::UserListCustomerTypeService::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + default_config = Client::Configuration.new + + default_config.timeout = 14_400.0 + default_config.retry_policy = { + initial_delay: 5.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the UserListCustomerTypeService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Ads::GoogleAds::V25::Services::UserListCustomerTypeService::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @user_list_customer_type_service_stub.universe_domain + end + + ## + # Create a new UserListCustomerTypeService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Ads::GoogleAds::V25::Services::UserListCustomerTypeService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Ads::GoogleAds::V25::Services::UserListCustomerTypeService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the UserListCustomerTypeService client. + # @yieldparam config [Client::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/ads/google_ads/v25/services/user_list_customer_type_service_services_pb" + + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @user_list_customer_type_service_stub = ::Gapic::ServiceStub.new( + ::Google::Ads::GoogleAds::V25::Services::UserListCustomerTypeService::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool, + logger: @config.logger + ) + + @user_list_customer_type_service_stub.stub_logger&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @user_list_customer_type_service_stub.logger + end + + # Service calls + + ## + # Attach or remove user list customer types. Operation statuses + # are returned. + # + # List of thrown errors: + # [AuthenticationError]() + # [AuthorizationError]() + # [UserListCustomerTypeError]() + # [HeaderError]() + # [InternalError]() + # [QuotaError]() + # [RequestError]() + # + # @overload mutate_user_list_customer_types(request, options = nil) + # Pass arguments to `mutate_user_list_customer_types` via a request object, either of type + # {::Google::Ads::GoogleAds::V25::Services::MutateUserListCustomerTypesRequest} or an equivalent Hash. + # + # @param request [::Google::Ads::GoogleAds::V25::Services::MutateUserListCustomerTypesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload mutate_user_list_customer_types(customer_id: nil, operations: nil, partial_failure: nil, validate_only: nil) + # Pass arguments to `mutate_user_list_customer_types` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param customer_id [::String] + # Required. The ID of the customer whose user list customer types are being + # modified. + # @param operations [::Array<::Google::Ads::GoogleAds::V25::Services::UserListCustomerTypeOperation, ::Hash>] + # Required. The list of operations to perform on the user list customer + # types. + # @param partial_failure [::Boolean] + # Optional. 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. + # @param validate_only [::Boolean] + # Optional. If true, the request is validated but not executed. Only errors + # are returned, not results. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Ads::GoogleAds::V25::Services::MutateUserListCustomerTypesResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Ads::GoogleAds::V25::Services::MutateUserListCustomerTypesResponse] + # + # @raise [Google::Ads::GoogleAds::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/ads/google_ads/v25/services" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Ads::GoogleAds::V25::Services::UserListCustomerTypeService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Ads::GoogleAds::V25::Services::MutateUserListCustomerTypesRequest.new + # + # # Call the mutate_user_list_customer_types method. + # result = client.mutate_user_list_customer_types request + # + # # The returned object is of type Google::Ads::GoogleAds::V25::Services::MutateUserListCustomerTypesResponse. + # p result + # + def mutate_user_list_customer_types request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::GoogleAds::V25::Services::MutateUserListCustomerTypesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.mutate_user_list_customer_types.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Ads::GoogleAds::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.customer_id + header_params["customer_id"] = request.customer_id + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.mutate_user_list_customer_types.timeout, + metadata: metadata, + retry_policy: @config.rpcs.mutate_user_list_customer_types.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @user_list_customer_type_service_stub.call_rpc :mutate_user_list_customer_types, request, + options: options do |response, operation| + yield response, operation if block_given? + end + # rescue GRPC::BadStatus => grpc_error + # raise Google::Ads::GoogleAds::Error.new grpc_error.message + end + + ## + # Configuration class for the UserListCustomerTypeService API. + # + # This class represents the configuration for UserListCustomerTypeService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Ads::GoogleAds::V25::Services::UserListCustomerTypeService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # mutate_user_list_customer_types to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Ads::GoogleAds::V25::Services::UserListCustomerTypeService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.mutate_user_list_customer_types.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Ads::GoogleAds::V25::Services::UserListCustomerTypeService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.mutate_user_list_customer_types.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Ads::GoogleAds::V25::Services::UserListCustomerTypeService::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "googleads.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, + ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the UserListCustomerTypeService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `mutate_user_list_customer_types` + # @return [::Gapic::Config::Method] + # + attr_reader :mutate_user_list_customer_types + + # @private + def initialize parent_rpcs = nil + mutate_user_list_customer_types_config = parent_rpcs.mutate_user_list_customer_types if parent_rpcs.respond_to? :mutate_user_list_customer_types + @mutate_user_list_customer_types = ::Gapic::Config::Method.new mutate_user_list_customer_types_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/user_list_customer_type_service/credentials.rb b/lib/google/ads/google_ads/v25/services/user_list_customer_type_service/credentials.rb new file mode 100644 index 000000000..66d239248 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/user_list_customer_type_service/credentials.rb @@ -0,0 +1,38 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Ads + module GoogleAds + module V25 + module Services + module UserListCustomerTypeService + # Credentials for the UserListCustomerTypeService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/adwords" + ] + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/user_list_customer_type_service/paths.rb b/lib/google/ads/google_ads/v25/services/user_list_customer_type_service/paths.rb new file mode 100644 index 000000000..0c39be1d0 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/user_list_customer_type_service/paths.rb @@ -0,0 +1,71 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Ads + module GoogleAds + module V25 + module Services + module UserListCustomerTypeService + # Path helper methods for the UserListCustomerTypeService API. + module Paths + ## + # Create a fully-qualified UserList resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/userLists/{user_list_id}` + # + # @param customer_id [String] + # @param user_list_id [String] + # + # @return [::String] + def user_list_path customer_id:, user_list_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/userLists/#{user_list_id}" + end + + ## + # Create a fully-qualified UserListCustomerType resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/userListCustomerTypes/{user_list_id}~{semantic_label}` + # + # @param customer_id [String] + # @param user_list_id [String] + # @param semantic_label [String] + # + # @return [::String] + def user_list_customer_type_path customer_id:, user_list_id:, semantic_label: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + raise ::ArgumentError, "user_list_id cannot contain /" if user_list_id.to_s.include? "/" + + "customers/#{customer_id}/userListCustomerTypes/#{user_list_id}~#{semantic_label}" + end + + extend self + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/user_list_customer_type_service_pb.rb b/lib/google/ads/google_ads/v25/services/user_list_customer_type_service_pb.rb new file mode 100644 index 000000000..1feba0bb0 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/user_list_customer_type_service_pb.rb @@ -0,0 +1,33 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/services/user_list_customer_type_service.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/resources/user_list_customer_type_pb' +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/rpc/status_pb' + + +descriptor_data = "\nGgoogle/ads/googleads/v25/services/user_list_customer_type_service.proto\x12!google.ads.googleads.v25.services\x1a@google/ads/googleads/v25/resources/user_list_customer_type.proto\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x17google/rpc/status.proto\"\xd3\x01\n\"MutateUserListCustomerTypesRequest\x12\x18\n\x0b\x63ustomer_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12Y\n\noperations\x18\x02 \x03(\x0b\x32@.google.ads.googleads.v25.services.UserListCustomerTypeOperationB\x03\xe0\x41\x02\x12\x1c\n\x0fpartial_failure\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\x12\x1a\n\rvalidate_only\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"\xbe\x01\n\x1dUserListCustomerTypeOperation\x12J\n\x06\x63reate\x18\x01 \x01(\x0b\x32\x38.google.ads.googleads.v25.resources.UserListCustomerTypeH\x00\x12\x44\n\x06remove\x18\x02 \x01(\tB2\xfa\x41/\n-googleads.googleapis.com/UserListCustomerTypeH\x00\x42\x0b\n\toperation\"\xae\x01\n#MutateUserListCustomerTypesResponse\x12\x31\n\x15partial_failure_error\x18\x01 \x01(\x0b\x32\x12.google.rpc.Status\x12T\n\x07results\x18\x02 \x03(\x0b\x32\x43.google.ads.googleads.v25.services.MutateUserListCustomerTypeResult\"m\n MutateUserListCustomerTypeResult\x12I\n\rresource_name\x18\x01 \x01(\tB2\xfa\x41/\n-googleads.googleapis.com/UserListCustomerType2\xf4\x02\n\x1bUserListCustomerTypeService\x12\x8d\x02\n\x1bMutateUserListCustomerTypes\x12\x45.google.ads.googleads.v25.services.MutateUserListCustomerTypesRequest\x1a\x46.google.ads.googleads.v25.services.MutateUserListCustomerTypesResponse\"_\xda\x41\x16\x63ustomer_id,operations\x82\xd3\xe4\x93\x02@\";/v25/customers/{customer_id=*}/userListCustomerTypes:mutate:\x01*\x1a\x45\xca\x41\x18googleads.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/adwordsB\x8c\x02\n%com.google.ads.googleads.v25.servicesB UserListCustomerTypeServiceProtoP\x01ZIgoogle.golang.org/genproto/googleapis/ads/googleads/v25/services;services\xa2\x02\x03GAA\xaa\x02!Google.Ads.GoogleAds.V25.Services\xca\x02!Google\\Ads\\GoogleAds\\V25\\Services\xea\x02%Google::Ads::GoogleAds::V25::Servicesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Services + MutateUserListCustomerTypesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.MutateUserListCustomerTypesRequest").msgclass + UserListCustomerTypeOperation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.UserListCustomerTypeOperation").msgclass + MutateUserListCustomerTypesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.MutateUserListCustomerTypesResponse").msgclass + MutateUserListCustomerTypeResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.MutateUserListCustomerTypeResult").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/user_list_customer_type_service_services_pb.rb b/lib/google/ads/google_ads/v25/services/user_list_customer_type_service_services_pb.rb new file mode 100644 index 000000000..e54b722f2 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/user_list_customer_type_service_services_pb.rb @@ -0,0 +1,59 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/ads/googleads/v25/services/user_list_customer_type_service.proto for package 'Google.Ads.GoogleAds.V25.Services' +# Original file comments: +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +require 'grpc' +require 'google/ads/google_ads/v25/services/user_list_customer_type_service_pb' + +module Google + module Ads + module GoogleAds + module V25 + module Services + module UserListCustomerTypeService + # Proto file describing the UserListCustomerType service. + # + # Service to manage user list customer types. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.ads.googleads.v25.services.UserListCustomerTypeService' + + # Attach or remove user list customer types. Operation statuses + # are returned. + # + # List of thrown errors: + # [AuthenticationError]() + # [AuthorizationError]() + # [UserListCustomerTypeError]() + # [HeaderError]() + # [InternalError]() + # [QuotaError]() + # [RequestError]() + rpc :MutateUserListCustomerTypes, ::Google::Ads::GoogleAds::V25::Services::MutateUserListCustomerTypesRequest, ::Google::Ads::GoogleAds::V25::Services::MutateUserListCustomerTypesResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/user_list_service.rb b/lib/google/ads/google_ads/v25/services/user_list_service.rb new file mode 100644 index 000000000..f16a097ec --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/user_list_service.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/ads/google_ads/version" + +require "google/ads/google_ads/v25/services/user_list_service/credentials" +require "google/ads/google_ads/v25/services/user_list_service/paths" +require "google/ads/google_ads/v25/services/user_list_service/client" + +module Google + module Ads + module GoogleAds + module V25 + module Services + ## + # Service to manage user lists. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/ads/google_ads/v25/services/user_list_service" + # client = ::Google::Ads::GoogleAds::V25::Services::UserListService::Client.new + # + module UserListService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "user_list_service", "helpers.rb" +require "google/ads/google_ads/v25/services/user_list_service/helpers" if ::File.file? helper_path diff --git a/lib/google/ads/google_ads/v25/services/user_list_service/client.rb b/lib/google/ads/google_ads/v25/services/user_list_service/client.rb new file mode 100644 index 000000000..4101c20d2 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/user_list_service/client.rb @@ -0,0 +1,509 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# require "google/ads/google_ads/error" +require "google/ads/google_ads/v25/services/user_list_service_pb" + +module Google + module Ads + module GoogleAds + module V25 + module Services + module UserListService + ## + # Client for the UserListService service. + # + # Service to manage user lists. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "googleads.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :user_list_service_stub + + ## + # Configure the UserListService Client class. + # + # See {::Google::Ads::GoogleAds::V25::Services::UserListService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all UserListService clients + # ::Google::Ads::GoogleAds::V25::Services::UserListService::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + default_config = Client::Configuration.new + + default_config.timeout = 14_400.0 + default_config.retry_policy = { + initial_delay: 5.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the UserListService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Ads::GoogleAds::V25::Services::UserListService::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @user_list_service_stub.universe_domain + end + + ## + # Create a new UserListService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Ads::GoogleAds::V25::Services::UserListService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Ads::GoogleAds::V25::Services::UserListService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the UserListService client. + # @yieldparam config [Client::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/ads/google_ads/v25/services/user_list_service_services_pb" + + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @user_list_service_stub = ::Gapic::ServiceStub.new( + ::Google::Ads::GoogleAds::V25::Services::UserListService::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool, + logger: @config.logger + ) + + @user_list_service_stub.stub_logger&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @user_list_service_stub.logger + end + + # Service calls + + ## + # Creates or updates user lists. Operation statuses are returned. + # + # List of thrown errors: + # [AuthenticationError]() + # [AuthorizationError]() + # [CollectionSizeError]() + # [DatabaseError]() + # [DistinctError]() + # [FieldError]() + # [FieldMaskError]() + # [HeaderError]() + # [InternalError]() + # [MutateError]() + # [NewResourceCreationError]() + # [NotAllowlistedError]() + # [NotEmptyError]() + # [OperationAccessDeniedError]() + # [QuotaError]() + # [RangeError]() + # [RequestError]() + # [StringFormatError]() + # [StringLengthError]() + # [UserListError]() + # + # @overload mutate_user_lists(request, options = nil) + # Pass arguments to `mutate_user_lists` via a request object, either of type + # {::Google::Ads::GoogleAds::V25::Services::MutateUserListsRequest} or an equivalent Hash. + # + # @param request [::Google::Ads::GoogleAds::V25::Services::MutateUserListsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload mutate_user_lists(customer_id: nil, operations: nil, partial_failure: nil, validate_only: nil) + # Pass arguments to `mutate_user_lists` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param customer_id [::String] + # Required. The ID of the customer whose user lists are being modified. + # @param operations [::Array<::Google::Ads::GoogleAds::V25::Services::UserListOperation, ::Hash>] + # Required. The list of operations to perform on individual user lists. + # @param partial_failure [::Boolean] + # 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. + # @param validate_only [::Boolean] + # If true, the request is validated but not executed. Only errors are + # returned, not results. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Ads::GoogleAds::V25::Services::MutateUserListsResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Ads::GoogleAds::V25::Services::MutateUserListsResponse] + # + # @raise [Google::Ads::GoogleAds::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/ads/google_ads/v25/services" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Ads::GoogleAds::V25::Services::UserListService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Ads::GoogleAds::V25::Services::MutateUserListsRequest.new + # + # # Call the mutate_user_lists method. + # result = client.mutate_user_lists request + # + # # The returned object is of type Google::Ads::GoogleAds::V25::Services::MutateUserListsResponse. + # p result + # + def mutate_user_lists request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::GoogleAds::V25::Services::MutateUserListsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.mutate_user_lists.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Ads::GoogleAds::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.customer_id + header_params["customer_id"] = request.customer_id + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.mutate_user_lists.timeout, + metadata: metadata, + retry_policy: @config.rpcs.mutate_user_lists.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @user_list_service_stub.call_rpc :mutate_user_lists, request, options: options do |response, operation| + yield response, operation if block_given? + end + # rescue GRPC::BadStatus => grpc_error + # raise Google::Ads::GoogleAds::Error.new grpc_error.message + end + + ## + # Configuration class for the UserListService API. + # + # This class represents the configuration for UserListService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Ads::GoogleAds::V25::Services::UserListService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # mutate_user_lists to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Ads::GoogleAds::V25::Services::UserListService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.mutate_user_lists.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Ads::GoogleAds::V25::Services::UserListService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.mutate_user_lists.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Ads::GoogleAds::V25::Services::UserListService::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "googleads.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, + ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the UserListService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `mutate_user_lists` + # @return [::Gapic::Config::Method] + # + attr_reader :mutate_user_lists + + # @private + def initialize parent_rpcs = nil + mutate_user_lists_config = parent_rpcs.mutate_user_lists if parent_rpcs.respond_to? :mutate_user_lists + @mutate_user_lists = ::Gapic::Config::Method.new mutate_user_lists_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/user_list_service/credentials.rb b/lib/google/ads/google_ads/v25/services/user_list_service/credentials.rb new file mode 100644 index 000000000..a18fd2ebe --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/user_list_service/credentials.rb @@ -0,0 +1,38 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Ads + module GoogleAds + module V25 + module Services + module UserListService + # Credentials for the UserListService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/adwords" + ] + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/user_list_service/paths.rb b/lib/google/ads/google_ads/v25/services/user_list_service/paths.rb new file mode 100644 index 000000000..5b52a4556 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/user_list_service/paths.rb @@ -0,0 +1,52 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Ads + module GoogleAds + module V25 + module Services + module UserListService + # Path helper methods for the UserListService API. + module Paths + ## + # Create a fully-qualified UserList resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/userLists/{user_list_id}` + # + # @param customer_id [String] + # @param user_list_id [String] + # + # @return [::String] + def user_list_path customer_id:, user_list_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/userLists/#{user_list_id}" + end + + extend self + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/user_list_service_pb.rb b/lib/google/ads/google_ads/v25/services/user_list_service_pb.rb new file mode 100644 index 000000000..25f20cec9 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/user_list_service_pb.rb @@ -0,0 +1,34 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/services/user_list_service.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/resources/user_list_pb' +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/field_mask_pb' +require 'google/rpc/status_pb' + + +descriptor_data = "\n9google/ads/googleads/v25/services/user_list_service.proto\x12!google.ads.googleads.v25.services\x1a\x32google/ads/googleads/v25/resources/user_list.proto\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\x1a\x17google/rpc/status.proto\"\xb1\x01\n\x16MutateUserListsRequest\x12\x18\n\x0b\x63ustomer_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12M\n\noperations\x18\x02 \x03(\x0b\x32\x34.google.ads.googleads.v25.services.UserListOperationB\x03\xe0\x41\x02\x12\x17\n\x0fpartial_failure\x18\x03 \x01(\x08\x12\x15\n\rvalidate_only\x18\x04 \x01(\x08\"\x8b\x02\n\x11UserListOperation\x12/\n\x0bupdate_mask\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\x12>\n\x06\x63reate\x18\x01 \x01(\x0b\x32,.google.ads.googleads.v25.resources.UserListH\x00\x12>\n\x06update\x18\x02 \x01(\x0b\x32,.google.ads.googleads.v25.resources.UserListH\x00\x12\x38\n\x06remove\x18\x03 \x01(\tB&\xfa\x41#\n!googleads.googleapis.com/UserListH\x00\x42\x0b\n\toperation\"\x96\x01\n\x17MutateUserListsResponse\x12\x31\n\x15partial_failure_error\x18\x03 \x01(\x0b\x32\x12.google.rpc.Status\x12H\n\x07results\x18\x02 \x03(\x0b\x32\x37.google.ads.googleads.v25.services.MutateUserListResult\"U\n\x14MutateUserListResult\x12=\n\rresource_name\x18\x01 \x01(\tB&\xfa\x41#\n!googleads.googleapis.com/UserList2\xb8\x02\n\x0fUserListService\x12\xdd\x01\n\x0fMutateUserLists\x12\x39.google.ads.googleads.v25.services.MutateUserListsRequest\x1a:.google.ads.googleads.v25.services.MutateUserListsResponse\"S\xda\x41\x16\x63ustomer_id,operations\x82\xd3\xe4\x93\x02\x34\"//v25/customers/{customer_id=*}/userLists:mutate:\x01*\x1a\x45\xca\x41\x18googleads.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/adwordsB\x80\x02\n%com.google.ads.googleads.v25.servicesB\x14UserListServiceProtoP\x01ZIgoogle.golang.org/genproto/googleapis/ads/googleads/v25/services;services\xa2\x02\x03GAA\xaa\x02!Google.Ads.GoogleAds.V25.Services\xca\x02!Google\\Ads\\GoogleAds\\V25\\Services\xea\x02%Google::Ads::GoogleAds::V25::Servicesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Services + MutateUserListsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.MutateUserListsRequest").msgclass + UserListOperation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.UserListOperation").msgclass + MutateUserListsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.MutateUserListsResponse").msgclass + MutateUserListResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.MutateUserListResult").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/user_list_service_services_pb.rb b/lib/google/ads/google_ads/v25/services/user_list_service_services_pb.rb new file mode 100644 index 000000000..5a33b4c50 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/user_list_service_services_pb.rb @@ -0,0 +1,71 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/ads/googleads/v25/services/user_list_service.proto for package 'Google.Ads.GoogleAds.V25.Services' +# Original file comments: +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +require 'grpc' +require 'google/ads/google_ads/v25/services/user_list_service_pb' + +module Google + module Ads + module GoogleAds + module V25 + module Services + module UserListService + # Proto file describing the User List service. + # + # Service to manage user lists. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.ads.googleads.v25.services.UserListService' + + # Creates or updates user lists. Operation statuses are returned. + # + # List of thrown errors: + # [AuthenticationError]() + # [AuthorizationError]() + # [CollectionSizeError]() + # [DatabaseError]() + # [DistinctError]() + # [FieldError]() + # [FieldMaskError]() + # [HeaderError]() + # [InternalError]() + # [MutateError]() + # [NewResourceCreationError]() + # [NotAllowlistedError]() + # [NotEmptyError]() + # [OperationAccessDeniedError]() + # [QuotaError]() + # [RangeError]() + # [RequestError]() + # [StringFormatError]() + # [StringLengthError]() + # [UserListError]() + rpc :MutateUserLists, ::Google::Ads::GoogleAds::V25::Services::MutateUserListsRequest, ::Google::Ads::GoogleAds::V25::Services::MutateUserListsResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/you_tube_video_upload_service.rb b/lib/google/ads/google_ads/v25/services/you_tube_video_upload_service.rb new file mode 100644 index 000000000..af4dfd836 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/you_tube_video_upload_service.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/ads/google_ads/version" + +require "google/ads/google_ads/v25/services/you_tube_video_upload_service/credentials" +require "google/ads/google_ads/v25/services/you_tube_video_upload_service/paths" +require "google/ads/google_ads/v25/services/you_tube_video_upload_service/client" + +module Google + module Ads + module GoogleAds + module V25 + module Services + ## + # Service to manage YouTube video uploads. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/ads/google_ads/v25/services/you_tube_video_upload_service" + # client = ::Google::Ads::GoogleAds::V25::Services::YouTubeVideoUploadService::Client.new + # + module YouTubeVideoUploadService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "you_tube_video_upload_service", "helpers.rb" +require "google/ads/google_ads/v25/services/you_tube_video_upload_service/helpers" if ::File.file? helper_path diff --git a/lib/google/ads/google_ads/v25/services/you_tube_video_upload_service/client.rb b/lib/google/ads/google_ads/v25/services/you_tube_video_upload_service/client.rb new file mode 100644 index 000000000..788933d6b --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/you_tube_video_upload_service/client.rb @@ -0,0 +1,678 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# require "google/ads/google_ads/error" +require "google/ads/google_ads/v25/services/youtube_video_upload_service_pb" + +module Google + module Ads + module GoogleAds + module V25 + module Services + module YouTubeVideoUploadService + ## + # Client for the YouTubeVideoUploadService service. + # + # Service to manage YouTube video uploads. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "googleads.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :you_tube_video_upload_service_stub + + ## + # Configure the YouTubeVideoUploadService Client class. + # + # See {::Google::Ads::GoogleAds::V25::Services::YouTubeVideoUploadService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all YouTubeVideoUploadService clients + # ::Google::Ads::GoogleAds::V25::Services::YouTubeVideoUploadService::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + default_config = Client::Configuration.new + + default_config.timeout = 14_400.0 + default_config.retry_policy = { + initial_delay: 5.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the YouTubeVideoUploadService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Ads::GoogleAds::V25::Services::YouTubeVideoUploadService::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @you_tube_video_upload_service_stub.universe_domain + end + + ## + # Create a new YouTubeVideoUploadService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Ads::GoogleAds::V25::Services::YouTubeVideoUploadService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Ads::GoogleAds::V25::Services::YouTubeVideoUploadService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the YouTubeVideoUploadService client. + # @yieldparam config [Client::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/ads/google_ads/v25/services/youtube_video_upload_service_services_pb" + + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @you_tube_video_upload_service_stub = ::Gapic::ServiceStub.new( + ::Google::Ads::GoogleAds::V25::Services::YouTubeVideoUploadService::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool, + logger: @config.logger + ) + + @you_tube_video_upload_service_stub.stub_logger&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @you_tube_video_upload_service_stub.logger + end + + # Service calls + + ## + # Uploads a video to Google-managed or advertiser owned (brand) YouTube + # channel. + # + # @overload create_you_tube_video_upload(request, options = nil) + # Pass arguments to `create_you_tube_video_upload` via a request object, either of type + # {::Google::Ads::GoogleAds::V25::Services::CreateYouTubeVideoUploadRequest} or an equivalent Hash. + # + # @param request [::Google::Ads::GoogleAds::V25::Services::CreateYouTubeVideoUploadRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_you_tube_video_upload(customer_id: nil, you_tube_video_upload: nil) + # Pass arguments to `create_you_tube_video_upload` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param customer_id [::String] + # Required. The customer ID requesting the upload. Required. + # @param you_tube_video_upload [::Google::Ads::GoogleAds::V25::Resources::YouTubeVideoUpload, ::Hash] + # Required. The initial details of the video to upload. Required. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Ads::GoogleAds::V25::Services::CreateYouTubeVideoUploadResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Ads::GoogleAds::V25::Services::CreateYouTubeVideoUploadResponse] + # + # @raise [Google::Ads::GoogleAds::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/ads/google_ads/v25/services" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Ads::GoogleAds::V25::Services::YouTubeVideoUploadService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Ads::GoogleAds::V25::Services::CreateYouTubeVideoUploadRequest.new + # + # # Call the create_you_tube_video_upload method. + # result = client.create_you_tube_video_upload request + # + # # The returned object is of type Google::Ads::GoogleAds::V25::Services::CreateYouTubeVideoUploadResponse. + # p result + # + def create_you_tube_video_upload request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::GoogleAds::V25::Services::CreateYouTubeVideoUploadRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_you_tube_video_upload.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Ads::GoogleAds::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.customer_id + header_params["customer_id"] = request.customer_id + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_you_tube_video_upload.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_you_tube_video_upload.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @you_tube_video_upload_service_stub.call_rpc :create_you_tube_video_upload, request, + options: options do |response, operation| + yield response, operation if block_given? + end + # rescue GRPC::BadStatus => grpc_error + # raise Google::Ads::GoogleAds::Error.new grpc_error.message + end + + ## + # Updates YouTube video's metadata, but only for videos uploaded using this + # API. + # + # @overload update_you_tube_video_upload(request, options = nil) + # Pass arguments to `update_you_tube_video_upload` via a request object, either of type + # {::Google::Ads::GoogleAds::V25::Services::UpdateYouTubeVideoUploadRequest} or an equivalent Hash. + # + # @param request [::Google::Ads::GoogleAds::V25::Services::UpdateYouTubeVideoUploadRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_you_tube_video_upload(customer_id: nil, you_tube_video_upload: nil, update_mask: nil) + # Pass arguments to `update_you_tube_video_upload` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param customer_id [::String] + # Required. The customer ID requesting the YouTube video upload update. + # Required. + # @param you_tube_video_upload [::Google::Ads::GoogleAds::V25::Resources::YouTubeVideoUpload, ::Hash] + # Required. The YouTube video upload resource to be updated. It's expected to + # have a valid resource name. Required. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. FieldMask that determines which resource fields are modified in + # an update. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Ads::GoogleAds::V25::Services::UpdateYouTubeVideoUploadResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Ads::GoogleAds::V25::Services::UpdateYouTubeVideoUploadResponse] + # + # @raise [Google::Ads::GoogleAds::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/ads/google_ads/v25/services" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Ads::GoogleAds::V25::Services::YouTubeVideoUploadService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Ads::GoogleAds::V25::Services::UpdateYouTubeVideoUploadRequest.new + # + # # Call the update_you_tube_video_upload method. + # result = client.update_you_tube_video_upload request + # + # # The returned object is of type Google::Ads::GoogleAds::V25::Services::UpdateYouTubeVideoUploadResponse. + # p result + # + def update_you_tube_video_upload request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::GoogleAds::V25::Services::UpdateYouTubeVideoUploadRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_you_tube_video_upload.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Ads::GoogleAds::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.customer_id + header_params["customer_id"] = request.customer_id + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_you_tube_video_upload.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_you_tube_video_upload.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @you_tube_video_upload_service_stub.call_rpc :update_you_tube_video_upload, request, + options: options do |response, operation| + yield response, operation if block_given? + end + # rescue GRPC::BadStatus => grpc_error + # raise Google::Ads::GoogleAds::Error.new grpc_error.message + end + + ## + # Removes YouTube videos uploaded using this API. + # + # @overload remove_you_tube_video_upload(request, options = nil) + # Pass arguments to `remove_you_tube_video_upload` via a request object, either of type + # {::Google::Ads::GoogleAds::V25::Services::RemoveYouTubeVideoUploadRequest} or an equivalent Hash. + # + # @param request [::Google::Ads::GoogleAds::V25::Services::RemoveYouTubeVideoUploadRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload remove_you_tube_video_upload(customer_id: nil, resource_names: nil) + # Pass arguments to `remove_you_tube_video_upload` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param customer_id [::String] + # Required. The customer ID requesting the YouTube video upload deletion. + # Required. + # @param resource_names [::Array<::String>] + # The resource names of the YouTube video uploads to be removed. Required. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Ads::GoogleAds::V25::Services::RemoveYouTubeVideoUploadResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Ads::GoogleAds::V25::Services::RemoveYouTubeVideoUploadResponse] + # + # @raise [Google::Ads::GoogleAds::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/ads/google_ads/v25/services" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Ads::GoogleAds::V25::Services::YouTubeVideoUploadService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Ads::GoogleAds::V25::Services::RemoveYouTubeVideoUploadRequest.new + # + # # Call the remove_you_tube_video_upload method. + # result = client.remove_you_tube_video_upload request + # + # # The returned object is of type Google::Ads::GoogleAds::V25::Services::RemoveYouTubeVideoUploadResponse. + # p result + # + def remove_you_tube_video_upload request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Ads::GoogleAds::V25::Services::RemoveYouTubeVideoUploadRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.remove_you_tube_video_upload.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Ads::GoogleAds::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.customer_id + header_params["customer_id"] = request.customer_id + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.remove_you_tube_video_upload.timeout, + metadata: metadata, + retry_policy: @config.rpcs.remove_you_tube_video_upload.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @you_tube_video_upload_service_stub.call_rpc :remove_you_tube_video_upload, request, + options: options do |response, operation| + yield response, operation if block_given? + end + # rescue GRPC::BadStatus => grpc_error + # raise Google::Ads::GoogleAds::Error.new grpc_error.message + end + + ## + # Configuration class for the YouTubeVideoUploadService API. + # + # This class represents the configuration for YouTubeVideoUploadService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Ads::GoogleAds::V25::Services::YouTubeVideoUploadService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # create_you_tube_video_upload to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Ads::GoogleAds::V25::Services::YouTubeVideoUploadService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.create_you_tube_video_upload.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Ads::GoogleAds::V25::Services::YouTubeVideoUploadService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.create_you_tube_video_upload.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Ads::GoogleAds::V25::Services::YouTubeVideoUploadService::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "googleads.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, + ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the YouTubeVideoUploadService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `create_you_tube_video_upload` + # @return [::Gapic::Config::Method] + # + attr_reader :create_you_tube_video_upload + ## + # RPC-specific configuration for `update_you_tube_video_upload` + # @return [::Gapic::Config::Method] + # + attr_reader :update_you_tube_video_upload + ## + # RPC-specific configuration for `remove_you_tube_video_upload` + # @return [::Gapic::Config::Method] + # + attr_reader :remove_you_tube_video_upload + + # @private + def initialize parent_rpcs = nil + create_you_tube_video_upload_config = parent_rpcs.create_you_tube_video_upload if parent_rpcs.respond_to? :create_you_tube_video_upload + @create_you_tube_video_upload = ::Gapic::Config::Method.new create_you_tube_video_upload_config + update_you_tube_video_upload_config = parent_rpcs.update_you_tube_video_upload if parent_rpcs.respond_to? :update_you_tube_video_upload + @update_you_tube_video_upload = ::Gapic::Config::Method.new update_you_tube_video_upload_config + remove_you_tube_video_upload_config = parent_rpcs.remove_you_tube_video_upload if parent_rpcs.respond_to? :remove_you_tube_video_upload + @remove_you_tube_video_upload = ::Gapic::Config::Method.new remove_you_tube_video_upload_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/you_tube_video_upload_service/credentials.rb b/lib/google/ads/google_ads/v25/services/you_tube_video_upload_service/credentials.rb new file mode 100644 index 000000000..a2273edf9 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/you_tube_video_upload_service/credentials.rb @@ -0,0 +1,38 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Ads + module GoogleAds + module V25 + module Services + module YouTubeVideoUploadService + # Credentials for the YouTubeVideoUploadService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/adwords" + ] + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/you_tube_video_upload_service/paths.rb b/lib/google/ads/google_ads/v25/services/you_tube_video_upload_service/paths.rb new file mode 100644 index 000000000..df2a392a5 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/you_tube_video_upload_service/paths.rb @@ -0,0 +1,52 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Ads + module GoogleAds + module V25 + module Services + module YouTubeVideoUploadService + # Path helper methods for the YouTubeVideoUploadService API. + module Paths + ## + # Create a fully-qualified YouTubeVideoUpload resource string. + # + # The resource will be in the following format: + # + # `customers/{customer_id}/youTubeVideoUploads/{video_upload_id}` + # + # @param customer_id [String] + # @param video_upload_id [String] + # + # @return [::String] + def you_tube_video_upload_path customer_id:, video_upload_id: + raise ::ArgumentError, "customer_id cannot contain /" if customer_id.to_s.include? "/" + + "customers/#{customer_id}/youTubeVideoUploads/#{video_upload_id}" + end + + extend self + end + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/youtube_video_upload_service_pb.rb b/lib/google/ads/google_ads/v25/services/youtube_video_upload_service_pb.rb new file mode 100644 index 000000000..ea655dc36 --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/youtube_video_upload_service_pb.rb @@ -0,0 +1,35 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/ads/googleads/v25/services/youtube_video_upload_service.proto + +require 'google/protobuf' + +require 'google/ads/google_ads/v25/resources/youtube_video_upload_pb' +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/field_mask_pb' + + +descriptor_data = "\nDgoogle/ads/googleads/v25/services/youtube_video_upload_service.proto\x12!google.ads.googleads.v25.services\x1a=google/ads/googleads/v25/resources/youtube_video_upload.proto\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\"\x97\x01\n\x1f\x43reateYouTubeVideoUploadRequest\x12\x18\n\x0b\x63ustomer_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12Z\n\x15you_tube_video_upload\x18\x02 \x01(\x0b\x32\x36.google.ads.googleads.v25.resources.YouTubeVideoUploadB\x03\xe0\x41\x02\"k\n CreateYouTubeVideoUploadResponse\x12G\n\rresource_name\x18\x01 \x01(\tB0\xfa\x41-\n+googleads.googleapis.com/YouTubeVideoUpload\"\xcd\x01\n\x1fUpdateYouTubeVideoUploadRequest\x12\x18\n\x0b\x63ustomer_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12Z\n\x15you_tube_video_upload\x18\x02 \x01(\x0b\x32\x36.google.ads.googleads.v25.resources.YouTubeVideoUploadB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"k\n UpdateYouTubeVideoUploadResponse\x12G\n\rresource_name\x18\x01 \x01(\tB0\xfa\x41-\n+googleads.googleapis.com/YouTubeVideoUpload\"S\n\x1fRemoveYouTubeVideoUploadRequest\x12\x18\n\x0b\x63ustomer_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x16\n\x0eresource_names\x18\x02 \x03(\t\":\n RemoveYouTubeVideoUploadResponse\x12\x16\n\x0eresource_names\x18\x01 \x03(\t2\x88\x07\n\x19YouTubeVideoUploadService\x12\x8d\x02\n\x18\x43reateYouTubeVideoUpload\x12\x42.google.ads.googleads.v25.services.CreateYouTubeVideoUploadRequest\x1a\x43.google.ads.googleads.v25.services.CreateYouTubeVideoUploadResponse\"h\xda\x41!customer_id,you_tube_video_upload\x82\xd3\xe4\x93\x02>\"9/v25/customers/{customer_id=*}/youTubeVideoUploads:create:\x01*\x12\x99\x02\n\x18UpdateYouTubeVideoUpload\x12\x42.google.ads.googleads.v25.services.UpdateYouTubeVideoUploadRequest\x1a\x43.google.ads.googleads.v25.services.UpdateYouTubeVideoUploadResponse\"t\xda\x41-customer_id,you_tube_video_upload,update_mask\x82\xd3\xe4\x93\x02>\"9/v25/customers/{customer_id=*}/youTubeVideoUploads:update:\x01*\x12\xf7\x01\n\x18RemoveYouTubeVideoUpload\x12\x42.google.ads.googleads.v25.services.RemoveYouTubeVideoUploadRequest\x1a\x43.google.ads.googleads.v25.services.RemoveYouTubeVideoUploadResponse\"R\xda\x41\x0b\x63ustomer_id\x82\xd3\xe4\x93\x02>\"9/v25/customers/{customer_id=*}/youTubeVideoUploads:remove:\x01*\x1a\x45\xca\x41\x18googleads.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/adwordsB\x8a\x02\n%com.google.ads.googleads.v25.servicesB\x1eYoutubeVideoUploadServiceProtoP\x01ZIgoogle.golang.org/genproto/googleapis/ads/googleads/v25/services;services\xa2\x02\x03GAA\xaa\x02!Google.Ads.GoogleAds.V25.Services\xca\x02!Google\\Ads\\GoogleAds\\V25\\Services\xea\x02%Google::Ads::GoogleAds::V25::Servicesb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Ads + module GoogleAds + module V25 + module Services + CreateYouTubeVideoUploadRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.CreateYouTubeVideoUploadRequest").msgclass + CreateYouTubeVideoUploadResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.CreateYouTubeVideoUploadResponse").msgclass + UpdateYouTubeVideoUploadRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.UpdateYouTubeVideoUploadRequest").msgclass + UpdateYouTubeVideoUploadResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.UpdateYouTubeVideoUploadResponse").msgclass + RemoveYouTubeVideoUploadRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.RemoveYouTubeVideoUploadRequest").msgclass + RemoveYouTubeVideoUploadResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v25.services.RemoveYouTubeVideoUploadResponse").msgclass + end + end + end + end +end diff --git a/lib/google/ads/google_ads/v25/services/youtube_video_upload_service_services_pb.rb b/lib/google/ads/google_ads/v25/services/youtube_video_upload_service_services_pb.rb new file mode 100644 index 000000000..8c3bd685c --- /dev/null +++ b/lib/google/ads/google_ads/v25/services/youtube_video_upload_service_services_pb.rb @@ -0,0 +1,55 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/ads/googleads/v25/services/youtube_video_upload_service.proto for package 'Google.Ads.GoogleAds.V25.Services' +# Original file comments: +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +require 'grpc' +require 'google/ads/google_ads/v25/services/youtube_video_upload_service_pb' + +module Google + module Ads + module GoogleAds + module V25 + module Services + module YouTubeVideoUploadService + # Proto file describing the YouTubeVideoUpload service. + # + # Service to manage YouTube video uploads. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.ads.googleads.v25.services.YouTubeVideoUploadService' + + # Uploads a video to Google-managed or advertiser owned (brand) YouTube + # channel. + rpc :CreateYouTubeVideoUpload, ::Google::Ads::GoogleAds::V25::Services::CreateYouTubeVideoUploadRequest, ::Google::Ads::GoogleAds::V25::Services::CreateYouTubeVideoUploadResponse + # Updates YouTube video's metadata, but only for videos uploaded using this + # API. + rpc :UpdateYouTubeVideoUpload, ::Google::Ads::GoogleAds::V25::Services::UpdateYouTubeVideoUploadRequest, ::Google::Ads::GoogleAds::V25::Services::UpdateYouTubeVideoUploadResponse + # Removes YouTube videos uploaded using this API. + rpc :RemoveYouTubeVideoUpload, ::Google::Ads::GoogleAds::V25::Services::RemoveYouTubeVideoUploadRequest, ::Google::Ads::GoogleAds::V25::Services::RemoveYouTubeVideoUploadResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/lib/google/ads/google_ads/version.rb b/lib/google/ads/google_ads/version.rb index 9d2dcb7f0..b29bf36d0 100644 --- a/lib/google/ads/google_ads/version.rb +++ b/lib/google/ads/google_ads/version.rb @@ -20,7 +20,7 @@ module Google module Ads module GoogleAds CLIENT_LIB_NAME = 'gccl'.freeze - CLIENT_LIB_VERSION = '42.0.0'.freeze + CLIENT_LIB_VERSION = '43.0.0'.freeze VERSION = CLIENT_LIB_VERSION end end diff --git a/test/test_errors.rb b/test/test_errors.rb index bfad17397..4958561a8 100644 --- a/test/test_errors.rb +++ b/test/test_errors.rb @@ -56,7 +56,7 @@ def test_code_version_validation def test_blank_code error = build_error - error.error_code = Google::Ads::GoogleAds::V24::Errors::ErrorCode.new + error.error_code = Google::Ads::GoogleAds::V25::Errors::ErrorCode.new error_code = Google::Ads::GoogleAds::Errors.code(error) assert_equal({}, error_code) @@ -71,16 +71,16 @@ def test_inspect end def build_error - Google::Ads::GoogleAds::V24::Errors::GoogleAdsError.new.tap do |error| - location = Google::Ads::GoogleAds::V24::Errors::ErrorLocation.new - path1 = Google::Ads::GoogleAds::V24::Errors::ErrorLocation::FieldPathElement.new + Google::Ads::GoogleAds::V25::Errors::GoogleAdsError.new.tap do |error| + location = Google::Ads::GoogleAds::V25::Errors::ErrorLocation.new + path1 = Google::Ads::GoogleAds::V25::Errors::ErrorLocation::FieldPathElement.new path1.field_name = 'operations' path1.index = 1 - path2 = Google::Ads::GoogleAds::V24::Errors::ErrorLocation::FieldPathElement.new + path2 = Google::Ads::GoogleAds::V25::Errors::ErrorLocation::FieldPathElement.new path2.field_name = 'create' - path3 = Google::Ads::GoogleAds::V24::Errors::ErrorLocation::FieldPathElement.new + path3 = Google::Ads::GoogleAds::V25::Errors::ErrorLocation::FieldPathElement.new path3.field_name = 'amount_micros' - error_code = Google::Ads::GoogleAds::V24::Errors::ErrorCode.new + error_code = Google::Ads::GoogleAds::V25::Errors::ErrorCode.new error_code.range_error = :TOO_LOW location.field_path_elements.push path1 location.field_path_elements.push path2 diff --git a/test/test_field_mask_util.rb b/test/test_field_mask_util.rb index 17e11dd93..856b38f6d 100644 --- a/test/test_field_mask_util.rb +++ b/test/test_field_mask_util.rb @@ -22,12 +22,12 @@ require 'google/protobuf/wrappers_pb' require 'google/ads/google_ads' require 'google/ads/google_ads/field_mask_util' -require 'google/ads/google_ads/v24/resources/campaign_pb' -require 'google/ads/google_ads/v24/resources/ad_pb' +require 'google/ads/google_ads/v25/resources/campaign_pb' +require 'google/ads/google_ads/v25/resources/ad_pb' class TestFieldMaskUtil < Minitest::Test def test_change_from_previous_value() - test_object = Google::Ads::GoogleAds::V24::Resources::Campaign.new + test_object = Google::Ads::GoogleAds::V25::Resources::Campaign.new test_object.name = 'test name' test_object.id = 1234 @@ -45,7 +45,7 @@ def test_change_from_client() # No setup. end - test_object = Google::Ads::GoogleAds::V24::Resources::Campaign.new + test_object = Google::Ads::GoogleAds::V25::Resources::Campaign.new test_object.name = 'test name' test_object.id = 1234 @@ -59,7 +59,7 @@ def test_change_from_client() end def test_change_from_no_value() - test_object = Google::Ads::GoogleAds::V24::Resources::Campaign.new + test_object = Google::Ads::GoogleAds::V25::Resources::Campaign.new mask = Google::Ads::GoogleAds::FieldMaskUtil.with test_object do test_object.name = 'new string' @@ -71,9 +71,9 @@ def test_change_from_no_value() end def test_change_to_null_value() - test_object = Google::Ads::GoogleAds::V24::Resources::Campaign.new + test_object = Google::Ads::GoogleAds::V25::Resources::Campaign.new - test_object.network_settings = Google::Ads::GoogleAds::V24::Resources::Campaign::NetworkSettings.new + test_object.network_settings = Google::Ads::GoogleAds::V25::Resources::Campaign::NetworkSettings.new mask = Google::Ads::GoogleAds::FieldMaskUtil.with test_object do test_object.network_settings = nil @@ -83,7 +83,7 @@ def test_change_to_null_value() end def test_no_change_to_value() - test_object = Google::Ads::GoogleAds::V24::Resources::Campaign.new + test_object = Google::Ads::GoogleAds::V25::Resources::Campaign.new test_name = 'test name' test_object.name = test_name @@ -96,7 +96,7 @@ def test_no_change_to_value() end def test_repeated_field_addition() - test_object = Google::Ads::GoogleAds::V24::Resources::Ad.new + test_object = Google::Ads::GoogleAds::V25::Resources::Ad.new test_object.final_urls << 'url 1' @@ -108,7 +108,7 @@ def test_repeated_field_addition() end def test_repeated_field_removal() - test_object = Google::Ads::GoogleAds::V24::Resources::Ad.new + test_object = Google::Ads::GoogleAds::V25::Resources::Ad.new test_object.final_urls << 'url 1' @@ -120,14 +120,14 @@ def test_repeated_field_removal() end def test_nested_field_changed() - test_object = Google::Ads::GoogleAds::V24::Resources::Ad.new + test_object = Google::Ads::GoogleAds::V25::Resources::Ad.new - text_ad = Google::Ads::GoogleAds::V24::Common::TextAdInfo.new + text_ad = Google::Ads::GoogleAds::V25::Common::TextAdInfo.new text_ad.headline = 'headline' test_object.text_ad = text_ad mask = Google::Ads::GoogleAds::FieldMaskUtil.with test_object do - new_text_ad = Google::Ads::GoogleAds::V24::Common::TextAdInfo.new + new_text_ad = Google::Ads::GoogleAds::V25::Common::TextAdInfo.new new_text_ad.headline = 'new headline' test_object.text_ad = new_text_ad end @@ -136,14 +136,14 @@ def test_nested_field_changed() end def test_nested_field_unchanged() - test_object = Google::Ads::GoogleAds::V24::Resources::Ad.new + test_object = Google::Ads::GoogleAds::V25::Resources::Ad.new - text_ad = Google::Ads::GoogleAds::V24::Common::TextAdInfo.new + text_ad = Google::Ads::GoogleAds::V25::Common::TextAdInfo.new text_ad.headline = 'headline' test_object.text_ad = text_ad mask = Google::Ads::GoogleAds::FieldMaskUtil.with test_object do - new_text_ad = Google::Ads::GoogleAds::V24::Common::TextAdInfo.new + new_text_ad = Google::Ads::GoogleAds::V25::Common::TextAdInfo.new new_text_ad.headline = 'headline' test_object.text_ad = new_text_ad end @@ -152,11 +152,11 @@ def test_nested_field_unchanged() end def test_nested_fields_for_update_from_nil() - test_object = Google::Ads::GoogleAds::V24::Resources::Campaign.new + test_object = Google::Ads::GoogleAds::V25::Resources::Campaign.new test_object.name = 'Name' nested_object = - Google::Ads::GoogleAds::V24::Resources::Campaign::NetworkSettings.new + Google::Ads::GoogleAds::V25::Resources::Campaign::NetworkSettings.new nested_object.target_search_network = true test_object.network_settings = nested_object @@ -169,13 +169,13 @@ def test_nested_fields_for_update_from_nil() end def test_nested_fields_for_update() - test_object = Google::Ads::GoogleAds::V24::Resources::Campaign.new + test_object = Google::Ads::GoogleAds::V25::Resources::Campaign.new mask = Google::Ads::GoogleAds::FieldMaskUtil.with test_object do test_object.name = 'Name' nested_object = - Google::Ads::GoogleAds::V24::Resources::Campaign::NetworkSettings.new + Google::Ads::GoogleAds::V25::Resources::Campaign::NetworkSettings.new nested_object.target_search_network = true test_object.network_settings = nested_object end @@ -187,10 +187,10 @@ def test_nested_fields_for_update() end def test_empty_top_level_field() - test_object = Google::Ads::GoogleAds::V24::Resources::Campaign.new + test_object = Google::Ads::GoogleAds::V25::Resources::Campaign.new mask = Google::Ads::GoogleAds::FieldMaskUtil.with test_object do - test_object.maximize_conversions = Google::Ads::GoogleAds::V24::Common::MaximizeConversions.new + test_object.maximize_conversions = Google::Ads::GoogleAds::V25::Common::MaximizeConversions.new end assert_equal( diff --git a/test/test_google_ads.rb b/test/test_google_ads.rb index 1e2c9d326..bcfe65116 100644 --- a/test/test_google_ads.rb +++ b/test/test_google_ads.rb @@ -23,7 +23,7 @@ class TestGoogleAds < Minitest::Test def test_valid_version() - assert_equal(true, Google::Ads::GoogleAds.valid_version?(:V24)) + assert_equal(true, Google::Ads::GoogleAds.valid_version?(:V25)) assert_equal(false, Google::Ads::GoogleAds.valid_version?(:ABCD)) end end diff --git a/test/test_google_ads_client.rb b/test/test_google_ads_client.rb index b8027fad6..1113b82ba 100644 --- a/test/test_google_ads_client.rb +++ b/test/test_google_ads_client.rb @@ -21,7 +21,7 @@ require 'google/ads/google_ads/google_ads_client' -require 'google/ads/google_ads/v24/services/offline_user_data_job_service_pb' +require 'google/ads/google_ads/v25/services/offline_user_data_job_service_pb' module Google module Ads @@ -50,13 +50,13 @@ def test_initialize_no_config end def test_decode_partial_failure_error - response_with_pfe = Google::Ads::GoogleAds::V24::Services::AddOfflineUserDataJobOperationsResponse.new( + response_with_pfe = Google::Ads::GoogleAds::V25::Services::AddOfflineUserDataJobOperationsResponse.new( partial_failure_error: Google::Rpc::Status.new( code: 13, message: "Multiple errors in ‘details’. First error: A required field was not specified or is an empty string., at operations[0].create.type", details: [ Google::Protobuf::Any.new( - type_url: "type.googleapis.com/google.ads.googleads.v24.errors.GoogleAdsFailure", + type_url: "type.googleapis.com/google.ads.googleads.v25.errors.GoogleAdsFailure", value: "\nh\n\x03\xB0\x05\x06\x129A required field was not specified or is an empty string.\x1A\x02*\x00\"\"\x12\x0E\n\noperations\x12\x00\x12\b\n\x06create\x12\x06\n\x04type\n=\n\x02P\x02\x12\x1FAn internal error has occurred.\x1A\x02*\x00\"\x12\x12\x10\n\noperations\x12\x02\b\x01".b ) ] @@ -70,17 +70,17 @@ def test_decode_partial_failure_error errors = client.decode_partial_failure_error( response_with_pfe.partial_failure_error, ) - assert_equal errors[0].class, Google::Ads::GoogleAds::V24::Errors::GoogleAdsFailure + assert_equal errors[0].class, Google::Ads::GoogleAds::V25::Errors::GoogleAdsFailure end def test_decode_warning - response_with_warning = Google::Ads::GoogleAds::V24::Services::AddOfflineUserDataJobOperationsResponse.new( + response_with_warning = Google::Ads::GoogleAds::V25::Services::AddOfflineUserDataJobOperationsResponse.new( warning: Google::Rpc::Status.new( code: 13, message: "Multiple errors in ‘details’. First error: A required field was not specified or is an empty string., at operations[0].create.type", details: [ Google::Protobuf::Any.new( - type_url: "type.googleapis.com/google.ads.googleads.v24.errors.GoogleAdsFailure", + type_url: "type.googleapis.com/google.ads.googleads.v25.errors.GoogleAdsFailure", value: "\nh\n\x03\xB0\x05\x06\x129A required field was not specified or is an empty string.\x1A\x02*\x00\"\"\x12\x0E\n\noperations\x12\x00\x12\b\n\x06create\x12\x06\n\x04type\n=\n\x02P\x02\x12\x1FAn internal error has occurred.\x1A\x02*\x00\"\x12\x12\x10\n\noperations\x12\x02\b\x01".b ) ] @@ -94,7 +94,7 @@ def test_decode_warning errors = client.decode_warning( response_with_warning.warning, ) - assert_equal errors[0].class, Google::Ads::GoogleAds::V24::Errors::GoogleAdsFailure + assert_equal errors[0].class, Google::Ads::GoogleAds::V25::Errors::GoogleAdsFailure end def test_config @@ -132,7 +132,7 @@ def test_service # No setup. end - service = client.service.v24.campaign + service = client.service.v25.campaign assert(service.respond_to?(:mutate_campaigns)) end @@ -141,7 +141,7 @@ def test_service_with_login_customer_id_set config.login_customer_id = 1234567890 end - service = client.service.v24.campaign + service = client.service.v25.campaign assert(service.respond_to?(:mutate_campaigns)) end @@ -151,7 +151,7 @@ def test_service_with_invalid_login_customer_id_set end assert_raises do - service = client.service.v24.campaign + service = client.service.v25.campaign end end diff --git a/test/test_logging_interceptor.rb b/test/test_logging_interceptor.rb index 9a0f67848..ea2e11c24 100644 --- a/test/test_logging_interceptor.rb +++ b/test/test_logging_interceptor.rb @@ -20,14 +20,16 @@ require 'minitest/autorun' require 'google/ads/google_ads' require 'google/ads/google_ads/interceptors/logging_interceptor' -require 'google/ads/google_ads/v24/services/campaign_service_services_pb' -require 'google/ads/google_ads/v24/services/customer_user_access_service_services_pb' -require 'google/ads/google_ads/v24/services/customer_user_access_invitation_service_services_pb' -require 'google/ads/google_ads/v24/services/google_ads_service_services_pb' -require 'google/ads/google_ads/v24/services/customer_service_services_pb' -require 'google/ads/google_ads/v24/resources/customer_user_access_pb' -require 'google/ads/google_ads/v24/resources/customer_user_access_invitation_pb' -require 'google/ads/google_ads/v24/resources/change_event_pb' +require 'google/ads/google_ads/v25/services/campaign_service_services_pb' +require 'google/ads/google_ads/v25/services/customer_user_access_service_services_pb' +require 'google/ads/google_ads/v25/services/customer_user_access_invitation_service_services_pb' +require 'google/ads/google_ads/v25/services/google_ads_service_services_pb' +require 'google/ads/google_ads/v25/services/customer_service_services_pb' +require 'google/ads/google_ads/v25/resources/customer_user_access_pb' +require 'google/ads/google_ads/v25/resources/customer_user_access_invitation_pb' +require 'google/ads/google_ads/v25/resources/change_event_pb' +require 'google/ads/google_ads/v24/resources/local_services_lead_pb' +require 'google/ads/google_ads/v25/resources/local_services_lead_pb' class TestLoggingInterceptor < Minitest::Test attr_reader :sio @@ -133,13 +135,13 @@ def test_logging_interceptor_logs_response assert_includes(sio.read, JSON.dump("some data")) end - def test_logging_interceptor_logs_some_error_details_if_v24_error + def test_logging_interceptor_logs_some_error_details_if_v25_error li.request_response( request: make_small_request, call: make_fake_call, method: :doesnt_matter, ) do - raise make_realistic_error("v24") + raise make_realistic_error("v25") end rescue GRPC::InvalidArgument sio.rewind @@ -194,7 +196,7 @@ def test_logging_interceptor_sanitizes_customer_user_access_response call: make_fake_call, method: :doesnt_matter ) do - Google::Ads::GoogleAds::V24::Resources::CustomerUserAccess.new( + Google::Ads::GoogleAds::V25::Resources::CustomerUserAccess.new( email_address: email_address, inviter_user_email_address: inviter_user, ) @@ -210,9 +212,9 @@ def test_logging_interceptor_sanitizes_customer_user_access_response def test_logging_interceptor_sanitizes_customer_user_access_mutate email_address = "abcdefghijkl" inviter_user = "zyxwvutsr" - request = Google::Ads::GoogleAds::V24::Services::MutateCustomerUserAccessRequest.new( - operation: Google::Ads::GoogleAds::V24::Services::CustomerUserAccessOperation.new( - update: Google::Ads::GoogleAds::V24::Resources::CustomerUserAccess.new( + request = Google::Ads::GoogleAds::V25::Services::MutateCustomerUserAccessRequest.new( + operation: Google::Ads::GoogleAds::V25::Services::CustomerUserAccessOperation.new( + update: Google::Ads::GoogleAds::V25::Resources::CustomerUserAccess.new( email_address: email_address, inviter_user_email_address: inviter_user, ) @@ -239,7 +241,7 @@ def test_logging_interceptor_sanitizes_customer_user_access_invitation_response call: make_fake_call, method: :doesnt_matter ) do - Google::Ads::GoogleAds::V24::Resources::CustomerUserAccessInvitation.new( + Google::Ads::GoogleAds::V25::Resources::CustomerUserAccessInvitation.new( email_address: email_address, ) end @@ -252,9 +254,9 @@ def test_logging_interceptor_sanitizes_customer_user_access_invitation_response def test_logging_interceptor_sanitizes_customer_user_access_invitation_mutate email_address = "abcdefghijkl" - request = Google::Ads::GoogleAds::V24::Services::MutateCustomerUserAccessInvitationRequest.new( - operation: Google::Ads::GoogleAds::V24::Services::CustomerUserAccessInvitationOperation.new( - create: Google::Ads::GoogleAds::V24::Resources::CustomerUserAccessInvitation.new( + request = Google::Ads::GoogleAds::V25::Services::MutateCustomerUserAccessInvitationRequest.new( + operation: Google::Ads::GoogleAds::V25::Services::CustomerUserAccessInvitationOperation.new( + create: Google::Ads::GoogleAds::V25::Resources::CustomerUserAccessInvitation.new( email_address: email_address, ) ) @@ -272,8 +274,10 @@ def test_logging_interceptor_sanitizes_customer_user_access_invitation_mutate assert_includes(data, "REDACTED") end - def test_logging_interceptor_sanitizes_local_services_lead_contact_details_email + def test_logging_interceptor_sanitizes_local_services_lead_contact_details_email_v24 email_address = "abcdefghijkl" + phone_number = "123456789" + consumer_name = "John Doe" li.request_response( request: make_request, call: make_fake_call, @@ -283,6 +287,8 @@ def test_logging_interceptor_sanitizes_local_services_lead_contact_details_email contact_details: Google::Ads::GoogleAds::V24:: Resources::ContactDetails.new( email: email_address, + phone_number: phone_number, + consumer_name: consumer_name, ), ) end @@ -290,6 +296,35 @@ def test_logging_interceptor_sanitizes_local_services_lead_contact_details_email sio.rewind data = sio.read assert(!data.include?(email_address), "Failed to remove email address.") + assert(!data.include?(phone_number), "Failed to remove phone number.") + assert(!data.include?(consumer_name), "Failed to remove consumer name.") + assert_includes(data, "REDACTED") + end + + def test_logging_interceptor_sanitizes_local_services_lead_contact_details_email + phone_number = "123456789" + phone_number_extension = "222" + consumer_name = "John Doe" + li.request_response( + request: make_request, + call: make_fake_call, + method: :doesnt_matter + ) do + Google::Ads::GoogleAds::V25::Resources::LocalServicesLead.new( + contact_details: Google::Ads::GoogleAds::V25:: + Resources::ContactDetails.new( + phone_number: phone_number, + phone_number_extension: phone_number_extension, + consumer_name: consumer_name, + ), + ) + end + + sio.rewind + data = sio.read + assert(!data.include?(phone_number), "Failed to remove phone number.") + assert(!data.include?(phone_number_extension), "Failed to remove phone number extension.") + assert(!data.include?(consumer_name), "Failed to remove consumer name.") assert_includes(data, "REDACTED") end @@ -300,8 +335,8 @@ def test_logging_interceptor_sanitizes_local_services_lead_contact_details_phone call: make_fake_call, method: :doesnt_matter ) do - Google::Ads::GoogleAds::V24::Resources::LocalServicesLead.new( - contact_details: Google::Ads::GoogleAds::V24:: + Google::Ads::GoogleAds::V25::Resources::LocalServicesLead.new( + contact_details: Google::Ads::GoogleAds::V25:: Resources::ContactDetails.new( phone_number: phone_number, ), @@ -321,8 +356,8 @@ def test_logging_interceptor_sanitizes_local_services_lead_contact_details_consu call: make_fake_call, method: :doesnt_matter ) do - Google::Ads::GoogleAds::V24::Resources::LocalServicesLead.new( - contact_details: Google::Ads::GoogleAds::V24:: + Google::Ads::GoogleAds::V25::Resources::LocalServicesLead.new( + contact_details: Google::Ads::GoogleAds::V25:: Resources::ContactDetails.new( consumer_name: consumer_name, ), @@ -342,8 +377,8 @@ def test_logging_interceptor_sanitizes_local_services_lead_conversation_text call: make_fake_call, method: :doesnt_matter ) do - Google::Ads::GoogleAds::V24::Resources::LocalServicesLeadConversation.new( - message_details: Google::Ads::GoogleAds::V24:: + Google::Ads::GoogleAds::V25::Resources::LocalServicesLeadConversation.new( + message_details: Google::Ads::GoogleAds::V25:: Resources::MessageDetails.new( text: text, ), @@ -359,7 +394,7 @@ def test_logging_interceptor_sanitizes_local_services_lead_conversation_text def test_logging_interceptor_sanitizes_customer_client_create_request email_address = "abcdefghijkl" li.request_response( - request: Google::Ads::GoogleAds::V24::Services::CreateCustomerClientRequest.new( + request: Google::Ads::GoogleAds::V25::Services::CreateCustomerClientRequest.new( email_address: email_address, ), call: make_fake_call, @@ -375,7 +410,7 @@ def test_logging_interceptor_sanitizes_customer_client_create_request def test_logging_interceptor_sanitizes_search_request li.request_response( - request: Google::Ads::GoogleAds::V24::Services::SearchGoogleAdsRequest.new( + request: Google::Ads::GoogleAds::V25::Services::SearchGoogleAdsRequest.new( query: "SELECT change_event.user_email FROM change_event", ), call: make_fake_call, @@ -391,7 +426,7 @@ def test_logging_interceptor_sanitizes_search_request def test_logging_interceptor_sanitizes_search_stream_request li.request_response( - request: Google::Ads::GoogleAds::V24::Services::SearchGoogleAdsStreamRequest.new( + request: Google::Ads::GoogleAds::V25::Services::SearchGoogleAdsStreamRequest.new( query: "SELECT change_event.user_email FROM change_event", ), call: make_fake_call, @@ -414,7 +449,7 @@ def test_logging_interceptor_sanitizes_search_response call: make_fake_call, method: :doesnt_matter ) do - Google::Ads::GoogleAds::V24::Services::SearchGoogleAdsResponse.new( + Google::Ads::GoogleAds::V25::Services::SearchGoogleAdsResponse.new( field_mask: Google::Protobuf::FieldMask.new( paths: [ "customer_user_access.email_address", @@ -423,12 +458,12 @@ def test_logging_interceptor_sanitizes_search_response ] ), results: [ - Google::Ads::GoogleAds::V24::Services::GoogleAdsRow.new( - customer_user_access: Google::Ads::GoogleAds::V24::Resources::CustomerUserAccess.new( + Google::Ads::GoogleAds::V25::Services::GoogleAdsRow.new( + customer_user_access: Google::Ads::GoogleAds::V25::Resources::CustomerUserAccess.new( email_address: email_address, inviter_user_email_address: inviter_user, ), - change_event: Google::Ads::GoogleAds::V24::Resources::ChangeEvent.new( + change_event: Google::Ads::GoogleAds::V25::Resources::ChangeEvent.new( user_email: user_email, ), ) @@ -454,7 +489,7 @@ def test_logging_interceptor_sanitizes_search_stream_response method: :doesnt_matter ) do [ - Google::Ads::GoogleAds::V24::Services::SearchGoogleAdsStreamResponse.new( + Google::Ads::GoogleAds::V25::Services::SearchGoogleAdsStreamResponse.new( field_mask: Google::Protobuf::FieldMask.new( paths: [ "customer_user_access.email_address", @@ -463,12 +498,12 @@ def test_logging_interceptor_sanitizes_search_stream_response ] ), results: [ - Google::Ads::GoogleAds::V24::Services::GoogleAdsRow.new( - customer_user_access: Google::Ads::GoogleAds::V24::Resources::CustomerUserAccess.new( + Google::Ads::GoogleAds::V25::Services::GoogleAdsRow.new( + customer_user_access: Google::Ads::GoogleAds::V25::Resources::CustomerUserAccess.new( email_address: email_address, inviter_user_email_address: inviter_user, ), - change_event: Google::Ads::GoogleAds::V24::Resources::ChangeEvent.new( + change_event: Google::Ads::GoogleAds::V25::Resources::ChangeEvent.new( user_email: user_email, ), ) @@ -509,14 +544,14 @@ def make_request_with_no_customer_id end def make_realistic_response_with_partial_error - Google::Ads::GoogleAds::V24::Services::MutateCampaignsResponse.new( + Google::Ads::GoogleAds::V25::Services::MutateCampaignsResponse.new( results: [], partial_failure_error: Google::Rpc::Status.new( code: 13, message: "Multiple errors in ‘details’. First error: A required field was not specified or is an empty string., at operations[0].create.type", details: [ Google::Protobuf::Any.new( - type_url: "type.googleapis.com/google.ads.googleads.v24.errors.GoogleAdsFailure", + type_url: "type.googleapis.com/google.ads.googleads.v25.errors.GoogleAdsFailure", value: "\nh\n\x03\xB0\x05\x06\x129A required field was not specified or is an empty string.\x1A\x02*\x00\"\"\x12\x0E\n\noperations\x12\x00\x12\b\n\x06create\x12\x06\n\x04type\n=\n\x02P\x02\x12\x1FAn internal error has occurred.\x1A\x02*\x00\"\x12\x12\x10\n\noperations\x12\x02\b\x01".b ) ] @@ -525,11 +560,11 @@ def make_realistic_response_with_partial_error end def make_small_request(customer_id: "123") - Google::Ads::GoogleAds::V24::Services::MutateCampaignsRequest.new( + Google::Ads::GoogleAds::V25::Services::MutateCampaignsRequest.new( customer_id: customer_id, operations: [ - Google::Ads::GoogleAds::V24::Services::CampaignOperation.new( - create: Google::Ads::GoogleAds::V24::Resources::Campaign.new( + Google::Ads::GoogleAds::V25::Services::CampaignOperation.new( + create: Google::Ads::GoogleAds::V25::Resources::Campaign.new( name: "test campaign" ) ) @@ -546,17 +581,17 @@ def make_realistic_error(version) def make_error_metadata(version) { - "google.rpc.debuginfo-bin" => "\x12\xA9\x02[ORIGINAL ERROR] generic::invalid_argument: Invalid customer ID 'INSERT_CUSTOMER_ID_HERE'. [google.rpc.error_details_ext] { details { type_url: \"type.googleapis.com/google.ads.googleads.v24.errors.GoogleAdsFailure\" value: \"\\n4\\n\\002\\010\\020\\022.Invalid customer ID \\'INSERT_CUSTOMER_ID_HERE\\'.\" } }", + "google.rpc.debuginfo-bin" => "\x12\xA9\x02[ORIGINAL ERROR] generic::invalid_argument: Invalid customer ID 'INSERT_CUSTOMER_ID_HERE'. [google.rpc.error_details_ext] { details { type_url: \"type.googleapis.com/google.ads.googleads.v25.errors.GoogleAdsFailure\" value: \"\\n4\\n\\002\\010\\020\\022.Invalid customer ID \\'INSERT_CUSTOMER_ID_HERE\\'.\" } }", "request-id" =>"btwmoTYjaQE1UwVZnDCGAA", } end def make_request(customer_id: "123123123") - Google::Ads::GoogleAds::V24::Services::MutateCampaignsRequest.new( + Google::Ads::GoogleAds::V25::Services::MutateCampaignsRequest.new( customer_id: customer_id, operations: [ - Google::Ads::GoogleAds::V24::Services::CampaignOperation.new( - create: Google::Ads::GoogleAds::V24::Resources::Campaign.new( + Google::Ads::GoogleAds::V25::Services::CampaignOperation.new( + create: Google::Ads::GoogleAds::V25::Resources::Campaign.new( name: "test campaign" ) ) diff --git a/test/test_lookup_util.rb b/test/test_lookup_util.rb index a3885a8f7..f6e384545 100644 --- a/test/test_lookup_util.rb +++ b/test/test_lookup_util.rb @@ -35,8 +35,8 @@ class TestLookupUtil < Minitest::Test def test_path_instantiation lookup_util = Google::Ads::GoogleAds::LookupUtil.new - util = lookup_util.path_lookup_util(:V24) - assert_instance_of(Google::Ads::GoogleAds::Utils::V24::PathLookupUtil, util) + util = lookup_util.path_lookup_util(:V25) + assert_instance_of(Google::Ads::GoogleAds::Utils::V25::PathLookupUtil, util) assert_raises do util = client.proto_lookup_util(:ABCD) end diff --git a/test/test_object_creation.rb b/test/test_object_creation.rb index fec016afb..6bf8eab4c 100644 --- a/test/test_object_creation.rb +++ b/test/test_object_creation.rb @@ -26,8 +26,8 @@ def test_resource_creation_default() client = Google::Ads::GoogleAds::GoogleAdsClient.new do |config| # No config needed. end - campaign_op = client.operation.v24.create_resource.campaign - assert_instance_of(Google::Ads::GoogleAds::V24::Resources::Campaign, campaign_op.create) + campaign_op = client.operation.v25.create_resource.campaign + assert_instance_of(Google::Ads::GoogleAds::V25::Resources::Campaign, campaign_op.create) end def test_resource_creation_from_existing_object() @@ -59,18 +59,18 @@ def test_operation_creation_default() client = Google::Ads::GoogleAds::GoogleAdsClient.new do |config| # No config needed. end - mutate_op = client.operation.v24.mutate - assert_instance_of(Google::Ads::GoogleAds::V24::Services::MutateOperation, mutate_op) + mutate_op = client.operation.v25.mutate + assert_instance_of(Google::Ads::GoogleAds::V25::Services::MutateOperation, mutate_op) end def test_operation_creation_using_block() client = Google::Ads::GoogleAds::GoogleAdsClient.new do |config| # No config needed. end - mutate_op = client.operation.v24.mutate do |op| - op.campaign_operation = client.operation.v24.create_resource.campaign + mutate_op = client.operation.v25.mutate do |op| + op.campaign_operation = client.operation.v25.create_resource.campaign end - assert_instance_of(Google::Ads::GoogleAds::V24::Services::MutateOperation, mutate_op) - assert_instance_of(Google::Ads::GoogleAds::V24::Services::CampaignOperation, mutate_op.campaign_operation) + assert_instance_of(Google::Ads::GoogleAds::V25::Services::MutateOperation, mutate_op) + assert_instance_of(Google::Ads::GoogleAds::V25::Services::CampaignOperation, mutate_op.campaign_operation) end end diff --git a/test/test_path_lookup_util.rb b/test/test_path_lookup_util.rb index 69e066e5c..19b1c0adc 100644 --- a/test/test_path_lookup_util.rb +++ b/test/test_path_lookup_util.rb @@ -20,11 +20,11 @@ require 'minitest/autorun' require 'google/ads/google_ads' -require 'google/ads/google_ads/utils/v24/path_lookup_util' +require 'google/ads/google_ads/utils/v25/path_lookup_util' class TestPathLookupUtil < Minitest::Test def test_basic_path_lookups - util = Google::Ads::GoogleAds::Utils::V24::PathLookupUtil.new + util = Google::Ads::GoogleAds::Utils::V25::PathLookupUtil.new expected = 'customers/123456' assert_equal(expected, util.customer(123456)) @@ -37,7 +37,7 @@ def test_basic_path_lookups end def test_malformed_path_input - util = Google::Ads::GoogleAds::Utils::V24::PathLookupUtil.new + util = Google::Ads::GoogleAds::Utils::V25::PathLookupUtil.new assert_raises ArgumentError do util.campaign(nil, nil) diff --git a/test/test_service_wrapper.rb b/test/test_service_wrapper.rb index b3a7ae4cd..02f9e6f94 100644 --- a/test/test_service_wrapper.rb +++ b/test/test_service_wrapper.rb @@ -19,7 +19,7 @@ require 'google/ads/google_ads/service_wrapper' require 'google/ads/google_ads/deprecation' -require 'google/ads/google_ads/v24/services/google_ads_service_pb' +require 'google/ads/google_ads/v25/services/google_ads_service_pb' class TestServiceWrapper < Minitest::Test class FakeService @@ -35,7 +35,7 @@ def setup @service = FakeService.new @service_wrapper = Google::Ads::GoogleAds::ServiceWrapper.new( service: @service, - rpc_inputs: {search: Google::Ads::GoogleAds::V24::Services::SearchGoogleAdsRequest}, + rpc_inputs: {search: Google::Ads::GoogleAds::V25::Services::SearchGoogleAdsRequest}, deprecation: Google::Ads::GoogleAds::Deprecation.new(false, false), ) end @@ -112,6 +112,6 @@ def test_service_call_new_style_shortcut end def make_search_request(options) - Google::Ads::GoogleAds::V24::Services::SearchGoogleAdsRequest.new(options) + Google::Ads::GoogleAds::V25::Services::SearchGoogleAdsRequest.new(options) end end