google_ads_field_service.proto 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  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.v10.services;
  16. import "google/ads/googleads/v10/resources/google_ads_field.proto";
  17. import "google/api/annotations.proto";
  18. import "google/api/client.proto";
  19. import "google/api/field_behavior.proto";
  20. import "google/api/resource.proto";
  21. option csharp_namespace = "Google.Ads.GoogleAds.V10.Services";
  22. option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v10/services;services";
  23. option java_multiple_files = true;
  24. option java_outer_classname = "GoogleAdsFieldServiceProto";
  25. option java_package = "com.google.ads.googleads.v10.services";
  26. option objc_class_prefix = "GAA";
  27. option php_namespace = "Google\\Ads\\GoogleAds\\V10\\Services";
  28. option ruby_package = "Google::Ads::GoogleAds::V10::Services";
  29. // Proto file describing the GoogleAdsFieldService.
  30. // Service to fetch Google Ads API fields.
  31. service GoogleAdsFieldService {
  32. option (google.api.default_host) = "googleads.googleapis.com";
  33. option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/adwords";
  34. // Returns just the requested field.
  35. //
  36. // List of thrown errors:
  37. // [AuthenticationError]()
  38. // [AuthorizationError]()
  39. // [HeaderError]()
  40. // [InternalError]()
  41. // [QuotaError]()
  42. // [RequestError]()
  43. rpc GetGoogleAdsField(GetGoogleAdsFieldRequest) returns (google.ads.googleads.v10.resources.GoogleAdsField) {
  44. option (google.api.http) = {
  45. get: "/v10/{resource_name=googleAdsFields/*}"
  46. };
  47. option (google.api.method_signature) = "resource_name";
  48. }
  49. // Returns all fields that match the search query.
  50. //
  51. // List of thrown errors:
  52. // [AuthenticationError]()
  53. // [AuthorizationError]()
  54. // [HeaderError]()
  55. // [InternalError]()
  56. // [QueryError]()
  57. // [QuotaError]()
  58. // [RequestError]()
  59. rpc SearchGoogleAdsFields(SearchGoogleAdsFieldsRequest) returns (SearchGoogleAdsFieldsResponse) {
  60. option (google.api.http) = {
  61. post: "/v10/googleAdsFields:search"
  62. body: "*"
  63. };
  64. option (google.api.method_signature) = "query";
  65. }
  66. }
  67. // Request message for [GoogleAdsFieldService.GetGoogleAdsField][google.ads.googleads.v10.services.GoogleAdsFieldService.GetGoogleAdsField].
  68. message GetGoogleAdsFieldRequest {
  69. // Required. The resource name of the field to get.
  70. string resource_name = 1 [
  71. (google.api.field_behavior) = REQUIRED,
  72. (google.api.resource_reference) = {
  73. type: "googleads.googleapis.com/GoogleAdsField"
  74. }
  75. ];
  76. }
  77. // Request message for [GoogleAdsFieldService.SearchGoogleAdsFields][google.ads.googleads.v10.services.GoogleAdsFieldService.SearchGoogleAdsFields].
  78. message SearchGoogleAdsFieldsRequest {
  79. // Required. The query string.
  80. string query = 1 [(google.api.field_behavior) = REQUIRED];
  81. // Token of the page to retrieve. If not specified, the first page of
  82. // results will be returned. Use the value obtained from `next_page_token`
  83. // in the previous response in order to request the next page of results.
  84. string page_token = 2;
  85. // Number of elements to retrieve in a single page.
  86. // When too large a page is requested, the server may decide to further
  87. // limit the number of returned resources.
  88. int32 page_size = 3;
  89. }
  90. // Response message for [GoogleAdsFieldService.SearchGoogleAdsFields][google.ads.googleads.v10.services.GoogleAdsFieldService.SearchGoogleAdsFields].
  91. message SearchGoogleAdsFieldsResponse {
  92. // The list of fields that matched the query.
  93. repeated google.ads.googleads.v10.resources.GoogleAdsField results = 1;
  94. // Pagination token used to retrieve the next page of results. Pass the
  95. // content of this string as the `page_token` attribute of the next request.
  96. // `next_page_token` is not returned for the last page.
  97. string next_page_token = 2;
  98. // Total number of results that match the query ignoring the LIMIT clause.
  99. int64 total_results_count = 3;
  100. }