1 // Copyright 2018 Google LLC.
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
7 // http://www.apache.org/licenses/LICENSE-2.0
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.
18 package google.ads.googleads.v0.services;
20 import "google/ads/googleads/v0/resources/geo_target_constant.proto";
21 import "google/api/annotations.proto";
22 import "google/protobuf/wrappers.proto";
24 option csharp_namespace = "Google.Ads.GoogleAds.V0.Services";
25 option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/services;services";
26 option java_multiple_files = true;
27 option java_outer_classname = "GeoTargetConstantServiceProto";
28 option java_package = "com.google.ads.googleads.v0.services";
29 option objc_class_prefix = "GAA";
30 option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Services";
31 option ruby_package = "Google::Ads::GoogleAds::V0::Services";
33 // Proto file describing the Geo target constant service.
35 // Service to fetch geo target constants.
36 service GeoTargetConstantService {
37 // Returns the requested geo target constant in full detail.
38 rpc GetGeoTargetConstant(GetGeoTargetConstantRequest)
39 returns (google.ads.googleads.v0.resources.GeoTargetConstant) {
40 option (google.api.http) = {
41 get: "/v0/{resource_name=geoTargetConstants/*}"
45 // Returns GeoTargetConstant suggestions by location name or by resource name.
46 rpc SuggestGeoTargetConstants(SuggestGeoTargetConstantsRequest)
47 returns (SuggestGeoTargetConstantsResponse) {
48 option (google.api.http) = {
49 post: "/v0/geoTargetConstants:suggest"
55 // Request message for
56 // [GeoTargetConstantService.GetGeoTargetConstant][google.ads.googleads.v0.services.GeoTargetConstantService.GetGeoTargetConstant].
57 message GetGeoTargetConstantRequest {
58 // The resource name of the geo target constant to fetch.
59 string resource_name = 1;
62 // Request message for
63 // [GeoTargetConstantService.SuggestGeoTargetConstantsRequest][].
64 message SuggestGeoTargetConstantsRequest {
65 // A list of location names.
66 message LocationNames {
67 // A list of location names.
68 repeated google.protobuf.StringValue names = 1;
71 // A list of geo target constant resource names.
73 // A list of geo target constant resource names.
74 repeated google.protobuf.StringValue geo_target_constants = 1;
77 // If possible, returned geo targets are translated using this locale. If not,
78 // en is used by default. This is also used as a hint for returned geo
80 google.protobuf.StringValue locale = 3;
82 // Returned geo targets are restricted to this country code.
83 google.protobuf.StringValue country_code = 5;
85 // Required. A selector of geo target constants.
87 // The location names to search by. At most 25 names can be set.
88 LocationNames location_names = 1;
90 // The geo target constant resource names to filter by.
91 GeoTargets geo_targets = 2;
95 // Response message for
96 // [GeoTargetConstantService.SuggestGeoTargetConstants][google.ads.googleads.v0.services.GeoTargetConstantService.SuggestGeoTargetConstants]
97 message SuggestGeoTargetConstantsResponse {
98 // Geo target constant suggestions.
99 repeated GeoTargetConstantSuggestion geo_target_constant_suggestions = 1;
102 // A geo target constant suggestion.
103 message GeoTargetConstantSuggestion {
104 // The language this GeoTargetConstantSuggestion is currently translated to.
105 // It affects the name of geo target fields. For example, if locale=en, then
106 // name=Spain. If locale=es, then name=EspaƱa. The default locale will be
107 // returned if no translation exists for the locale in the request.
108 google.protobuf.StringValue locale = 1;
110 // Approximate user population that will be targeted, rounded to the
112 google.protobuf.Int64Value reach = 2;
114 // If the request searched by location name, this is the location name that
115 // matched the geo target.
116 google.protobuf.StringValue search_term = 3;
118 // The GeoTargetConstant result.
119 google.ads.googleads.v0.resources.GeoTargetConstant geo_target_constant = 4;
121 // The list of parents of the geo target constant.
122 repeated google.ads.googleads.v0.resources.GeoTargetConstant
123 geo_target_constant_parents = 5;