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.searchads360.v0.services; 18 19import "google/ads/searchads360/v0/resources/search_ads360_field.proto"; 20import "google/api/annotations.proto"; 21import "google/api/client.proto"; 22import "google/api/field_behavior.proto"; 23import "google/api/resource.proto"; 24 25option csharp_namespace = "Google.Ads.SearchAds360.V0.Services"; 26option go_package = "google.golang.org/genproto/googleapis/ads/searchads360/v0/services;services"; 27option java_multiple_files = true; 28option java_outer_classname = "SearchAds360FieldServiceProto"; 29option java_package = "com.google.ads.searchads360.v0.services"; 30option objc_class_prefix = "GASA360"; 31option php_namespace = "Google\\Ads\\SearchAds360\\V0\\Services"; 32option ruby_package = "Google::Ads::SearchAds360::V0::Services"; 33 34// Proto file describing the SearchAds360FieldService. 35 36// Service to fetch Search Ads 360 API fields. 37service SearchAds360FieldService { 38 option (google.api.default_host) = "searchads360.googleapis.com"; 39 option (google.api.oauth_scopes) = 40 "https://www.googleapis.com/auth/doubleclicksearch"; 41 42 // Returns just the requested field. 43 // 44 // List of thrown errors: 45 // [AuthenticationError]() 46 // [AuthorizationError]() 47 // [HeaderError]() 48 // [InternalError]() 49 // [QuotaError]() 50 // [RequestError]() 51 rpc GetSearchAds360Field(GetSearchAds360FieldRequest) 52 returns (google.ads.searchads360.v0.resources.SearchAds360Field) { 53 option (google.api.http) = { 54 get: "/v0/{resource_name=searchAds360Fields/*}" 55 }; 56 option (google.api.method_signature) = "resource_name"; 57 } 58 59 // Returns all fields that match the search 60 // [query](/search-ads/reporting/concepts/field-service#use_a_query_to_get_field_details). 61 // 62 // List of thrown errors: 63 // [AuthenticationError]() 64 // [AuthorizationError]() 65 // [HeaderError]() 66 // [InternalError]() 67 // [QueryError]() 68 // [QuotaError]() 69 // [RequestError]() 70 rpc SearchSearchAds360Fields(SearchSearchAds360FieldsRequest) 71 returns (SearchSearchAds360FieldsResponse) { 72 option (google.api.http) = { 73 post: "/v0/searchAds360Fields:search" 74 body: "*" 75 }; 76 option (google.api.method_signature) = "query"; 77 } 78} 79 80// Request message for 81// [SearchAds360FieldService.GetSearchAds360Field][google.ads.searchads360.v0.services.SearchAds360FieldService.GetSearchAds360Field]. 82message GetSearchAds360FieldRequest { 83 // Required. The resource name of the field to get. 84 string resource_name = 1 [ 85 (google.api.field_behavior) = REQUIRED, 86 (google.api.resource_reference) = { 87 type: "searchads360.googleapis.com/SearchAds360Field" 88 } 89 ]; 90} 91 92// Request message for 93// [SearchAds360FieldService.SearchSearchAds360Fields][google.ads.searchads360.v0.services.SearchAds360FieldService.SearchSearchAds360Fields]. 94message SearchSearchAds360FieldsRequest { 95 // Required. The query string. 96 string query = 1 [(google.api.field_behavior) = REQUIRED]; 97 98 // Token of the page to retrieve. If not specified, the first page of 99 // results will be returned. Use the value obtained from `next_page_token` 100 // in the previous response in order to request the next page of results. 101 string page_token = 2; 102 103 // Number of elements to retrieve in a single page. 104 // When too large a page is requested, the server may decide to further 105 // limit the number of returned resources. 106 int32 page_size = 3; 107} 108 109// Response message for 110// [SearchAds360FieldService.SearchSearchAds360Fields][google.ads.searchads360.v0.services.SearchAds360FieldService.SearchSearchAds360Fields]. 111message SearchSearchAds360FieldsResponse { 112 // The list of fields that matched the query. 113 repeated google.ads.searchads360.v0.resources.SearchAds360Field results = 1; 114 115 // Pagination token used to retrieve the next page of results. Pass the 116 // content of this string as the `page_token` attribute of the next request. 117 // `next_page_token` is not returned for the last page. 118 string next_page_token = 2; 119 120 // Total number of results that match the query ignoring the LIMIT clause. 121 int64 total_results_count = 3; 122} 123