1// Copyright 2023 Google LLC 2// 3// Licensed under the Apache License, Version 2.0 (the "License"); 4// you may not use this file except in compliance with the License. 5// You may obtain a copy of the License at 6// 7// http://www.apache.org/licenses/LICENSE-2.0 8// 9// Unless required by applicable law or agreed to in writing, software 10// distributed under the License is distributed on an "AS IS" BASIS, 11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12// See the License for the specific language governing permissions and 13// limitations under the License. 14 15syntax = "proto3"; 16 17package google.ads.googleads.v14.services; 18 19import "google/ads/googleads/v14/resources/geo_target_constant.proto"; 20import "google/api/annotations.proto"; 21import "google/api/client.proto"; 22 23option csharp_namespace = "Google.Ads.GoogleAds.V14.Services"; 24option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v14/services;services"; 25option java_multiple_files = true; 26option java_outer_classname = "GeoTargetConstantServiceProto"; 27option java_package = "com.google.ads.googleads.v14.services"; 28option objc_class_prefix = "GAA"; 29option php_namespace = "Google\\Ads\\GoogleAds\\V14\\Services"; 30option ruby_package = "Google::Ads::GoogleAds::V14::Services"; 31 32// Proto file describing the Geo target constant service. 33 34// Service to fetch geo target constants. 35service GeoTargetConstantService { 36 option (google.api.default_host) = "googleads.googleapis.com"; 37 option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/adwords"; 38 39 // Returns GeoTargetConstant suggestions by location name or by resource name. 40 // 41 // List of thrown errors: 42 // [AuthenticationError]() 43 // [AuthorizationError]() 44 // [GeoTargetConstantSuggestionError]() 45 // [HeaderError]() 46 // [InternalError]() 47 // [QuotaError]() 48 // [RequestError]() 49 rpc SuggestGeoTargetConstants(SuggestGeoTargetConstantsRequest) 50 returns (SuggestGeoTargetConstantsResponse) { 51 option (google.api.http) = { 52 post: "/v14/geoTargetConstants:suggest" 53 body: "*" 54 }; 55 } 56} 57 58// Request message for 59// [GeoTargetConstantService.SuggestGeoTargetConstants][google.ads.googleads.v14.services.GeoTargetConstantService.SuggestGeoTargetConstants]. 60message SuggestGeoTargetConstantsRequest { 61 // A list of location names. 62 message LocationNames { 63 // A list of location names. 64 repeated string names = 2; 65 } 66 67 // A list of geo target constant resource names. 68 message GeoTargets { 69 // A list of geo target constant resource names. 70 repeated string geo_target_constants = 2; 71 } 72 73 // If possible, returned geo targets are translated using this locale. If not, 74 // en is used by default. This is also used as a hint for returned geo 75 // targets. 76 optional string locale = 6; 77 78 // Returned geo targets are restricted to this country code. 79 optional string country_code = 7; 80 81 // Required. A selector of geo target constants. 82 oneof query { 83 // The location names to search by. At most 25 names can be set. 84 LocationNames location_names = 1; 85 86 // The geo target constant resource names to filter by. 87 GeoTargets geo_targets = 2; 88 } 89} 90 91// Response message for 92// [GeoTargetConstantService.SuggestGeoTargetConstants][google.ads.googleads.v14.services.GeoTargetConstantService.SuggestGeoTargetConstants]. 93message SuggestGeoTargetConstantsResponse { 94 // Geo target constant suggestions. 95 repeated GeoTargetConstantSuggestion geo_target_constant_suggestions = 1; 96} 97 98// A geo target constant suggestion. 99message GeoTargetConstantSuggestion { 100 // The language this GeoTargetConstantSuggestion is currently translated to. 101 // It affects the name of geo target fields. For example, if locale=en, then 102 // name=Spain. If locale=es, then name=España. The default locale will be 103 // returned if no translation exists for the locale in the request. 104 optional string locale = 6; 105 106 // Approximate user population that will be targeted, rounded to the 107 // nearest 100. 108 optional int64 reach = 7; 109 110 // If the request searched by location name, this is the location name that 111 // matched the geo target. 112 optional string search_term = 8; 113 114 // The GeoTargetConstant result. 115 google.ads.googleads.v14.resources.GeoTargetConstant geo_target_constant = 4; 116 117 // The list of parents of the geo target constant. 118 repeated google.ads.googleads.v14.resources.GeoTargetConstant 119 geo_target_constant_parents = 5; 120} 121