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.admanager.v1; 18 19import "google/api/annotations.proto"; 20import "google/api/client.proto"; 21import "google/api/field_behavior.proto"; 22import "google/api/resource.proto"; 23 24option csharp_namespace = "Google.Ads.AdManager.V1"; 25option go_package = "google.golang.org/genproto/googleapis/ads/admanager/v1;admanager"; 26option java_multiple_files = true; 27option java_outer_classname = "AdPartnerServiceProto"; 28option java_package = "com.google.ads.admanager.v1"; 29option objc_class_prefix = "GAA"; 30option php_namespace = "Google\\Ads\\AdManager\\V1"; 31 32// Provides methods for handling AdPartner objects. 33service AdPartnerService { 34 option (google.api.default_host) = "admanager.googleapis.com"; 35 36 // API to retrieve a AdPartner object. 37 rpc GetAdPartner(GetAdPartnerRequest) returns (AdPartner) { 38 option (google.api.http) = { 39 get: "/v1/{name=networks/*/adPartners/*}" 40 }; 41 option (google.api.method_signature) = "name"; 42 } 43 44 // API to retrieve a list of AdPartner objects. 45 rpc ListAdPartners(ListAdPartnersRequest) returns (ListAdPartnersResponse) { 46 option (google.api.http) = { 47 get: "/v1/{parent=networks/*}/adPartners" 48 }; 49 option (google.api.method_signature) = "parent"; 50 } 51} 52 53// The AdPartner resource. 54message AdPartner { 55 option (google.api.resource) = { 56 type: "admanager.googleapis.com/AdPartner" 57 pattern: "networks/{network_code}/adPartners/{ad_partner}" 58 plural: "adPartners" 59 singular: "adPartner" 60 }; 61 62 // Identifier. The resource name of the AdPartner. 63 // Format: `networks/{network_code}/adPartners/{ad_partner_id}` 64 string name = 1 [(google.api.field_behavior) = IDENTIFIER]; 65} 66 67// Request object for GetAdPartner method. 68message GetAdPartnerRequest { 69 // Required. The resource name of the AdPartner. 70 // Format: `networks/{network_code}/adPartners/{ad_partner_id}` 71 string name = 1 [ 72 (google.api.field_behavior) = REQUIRED, 73 (google.api.resource_reference) = { 74 type: "admanager.googleapis.com/AdPartner" 75 } 76 ]; 77} 78 79// Request object for ListAdPartners method. 80message ListAdPartnersRequest { 81 // Required. The parent, which owns this collection of AdPartners. 82 // Format: `networks/{network_code}` 83 string parent = 1 [ 84 (google.api.field_behavior) = REQUIRED, 85 (google.api.resource_reference) = { 86 type: "admanager.googleapis.com/Network" 87 } 88 ]; 89 90 // Optional. The maximum number of AdPartners to return. The service may 91 // return fewer than this value. If unspecified, at most 50 AdPartners will be 92 // returned. The maximum value is 1000; values above 1000 will be coerced to 93 // 1000. 94 int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; 95 96 // Optional. A page token, received from a previous `ListAdPartners` call. 97 // Provide this to retrieve the subsequent page. 98 // 99 // When paginating, all other parameters provided to `ListAdPartners` must 100 // match the call that provided the page token. 101 string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; 102 103 // Optional. Expression to filter the response. 104 // See syntax details at 105 // https://developers.google.com/ad-manager/api/beta/filters 106 string filter = 4 [(google.api.field_behavior) = OPTIONAL]; 107 108 // Optional. Expression to specify sorting order. 109 // See syntax details at 110 // https://developers.google.com/ad-manager/api/beta/filters#order 111 string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; 112 113 // Optional. Number of individual resources to skip while paginating. 114 int32 skip = 6 [(google.api.field_behavior) = OPTIONAL]; 115} 116 117// Response object for ListAdPartnersRequest containing matching AdPartner 118// resources. 119message ListAdPartnersResponse { 120 // The AdPartner from the specified network. 121 repeated AdPartner ad_partners = 1; 122 123 // A token, which can be sent as `page_token` to retrieve the next page. 124 // If this field is omitted, there are no subsequent pages. 125 string next_page_token = 2; 126 127 // Total number of AdPartners. 128 // If a filter was included in the request, this reflects the total number 129 // after the filtering is applied. 130 // 131 // `total_size` will not be calculated in the response unless it has been 132 // included in a response field mask. The response field mask can be provided 133 // to the method by using the URL parameter `$fields` or `fields`, or by using 134 // the HTTP/gRPC header `X-Goog-FieldMask`. 135 // 136 // For more information, see 137 // https://developers.google.com/ad-manager/api/beta/field-masks 138 int32 total_size = 3; 139} 140