geo_target_constant_service.proto 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. // Copyright 2022 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. syntax = "proto3";
  15. package google.ads.googleads.v12.services;
  16. import "google/ads/googleads/v12/resources/geo_target_constant.proto";
  17. import "google/api/annotations.proto";
  18. import "google/api/client.proto";
  19. option csharp_namespace = "Google.Ads.GoogleAds.V12.Services";
  20. option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v12/services;services";
  21. option java_multiple_files = true;
  22. option java_outer_classname = "GeoTargetConstantServiceProto";
  23. option java_package = "com.google.ads.googleads.v12.services";
  24. option objc_class_prefix = "GAA";
  25. option php_namespace = "Google\\Ads\\GoogleAds\\V12\\Services";
  26. option ruby_package = "Google::Ads::GoogleAds::V12::Services";
  27. // Proto file describing the Geo target constant service.
  28. // Service to fetch geo target constants.
  29. service GeoTargetConstantService {
  30. option (google.api.default_host) = "googleads.googleapis.com";
  31. option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/adwords";
  32. // Returns GeoTargetConstant suggestions by location name or by resource name.
  33. //
  34. // List of thrown errors:
  35. // [AuthenticationError]()
  36. // [AuthorizationError]()
  37. // [GeoTargetConstantSuggestionError]()
  38. // [HeaderError]()
  39. // [InternalError]()
  40. // [QuotaError]()
  41. // [RequestError]()
  42. rpc SuggestGeoTargetConstants(SuggestGeoTargetConstantsRequest) returns (SuggestGeoTargetConstantsResponse) {
  43. option (google.api.http) = {
  44. post: "/v12/geoTargetConstants:suggest"
  45. body: "*"
  46. };
  47. }
  48. }
  49. // Request message for
  50. // [GeoTargetConstantService.SuggestGeoTargetConstants][google.ads.googleads.v12.services.GeoTargetConstantService.SuggestGeoTargetConstants].
  51. message SuggestGeoTargetConstantsRequest {
  52. // A list of location names.
  53. message LocationNames {
  54. // A list of location names.
  55. repeated string names = 2;
  56. }
  57. // A list of geo target constant resource names.
  58. message GeoTargets {
  59. // A list of geo target constant resource names.
  60. repeated string geo_target_constants = 2;
  61. }
  62. // If possible, returned geo targets are translated using this locale. If not,
  63. // en is used by default. This is also used as a hint for returned geo
  64. // targets.
  65. optional string locale = 6;
  66. // Returned geo targets are restricted to this country code.
  67. optional string country_code = 7;
  68. // Required. A selector of geo target constants.
  69. oneof query {
  70. // The location names to search by. At most 25 names can be set.
  71. LocationNames location_names = 1;
  72. // The geo target constant resource names to filter by.
  73. GeoTargets geo_targets = 2;
  74. }
  75. }
  76. // Response message for [GeoTargetConstantService.SuggestGeoTargetConstants][google.ads.googleads.v12.services.GeoTargetConstantService.SuggestGeoTargetConstants].
  77. message SuggestGeoTargetConstantsResponse {
  78. // Geo target constant suggestions.
  79. repeated GeoTargetConstantSuggestion geo_target_constant_suggestions = 1;
  80. }
  81. // A geo target constant suggestion.
  82. message GeoTargetConstantSuggestion {
  83. // The language this GeoTargetConstantSuggestion is currently translated to.
  84. // It affects the name of geo target fields. For example, if locale=en, then
  85. // name=Spain. If locale=es, then name=España. The default locale will be
  86. // returned if no translation exists for the locale in the request.
  87. optional string locale = 6;
  88. // Approximate user population that will be targeted, rounded to the
  89. // nearest 100.
  90. optional int64 reach = 7;
  91. // If the request searched by location name, this is the location name that
  92. // matched the geo target.
  93. optional string search_term = 8;
  94. // The GeoTargetConstant result.
  95. google.ads.googleads.v12.resources.GeoTargetConstant geo_target_constant = 4;
  96. // The list of parents of the geo target constant.
  97. repeated google.ads.googleads.v12.resources.GeoTargetConstant geo_target_constant_parents = 5;
  98. }