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/ads/admanager/v1/placement_enums.proto"; 20import "google/api/annotations.proto"; 21import "google/api/client.proto"; 22import "google/api/field_behavior.proto"; 23import "google/api/resource.proto"; 24import "google/protobuf/timestamp.proto"; 25 26option csharp_namespace = "Google.Ads.AdManager.V1"; 27option go_package = "google.golang.org/genproto/googleapis/ads/admanager/v1;admanager"; 28option java_multiple_files = true; 29option java_outer_classname = "PlacementServiceProto"; 30option java_package = "com.google.ads.admanager.v1"; 31option objc_class_prefix = "GAA"; 32option php_namespace = "Google\\Ads\\AdManager\\V1"; 33 34// Provides methods for handling `Placement` objects. 35service PlacementService { 36 option (google.api.default_host) = "admanager.googleapis.com"; 37 38 // API to retrieve a `Placement` object. 39 rpc GetPlacement(GetPlacementRequest) returns (Placement) { 40 option (google.api.http) = { 41 get: "/v1/{name=networks/*/placements/*}" 42 }; 43 option (google.api.method_signature) = "name"; 44 } 45 46 // API to retrieve a list of `Placement` objects. 47 rpc ListPlacements(ListPlacementsRequest) returns (ListPlacementsResponse) { 48 option (google.api.http) = { 49 get: "/v1/{parent=networks/*}/placements" 50 }; 51 option (google.api.method_signature) = "parent"; 52 } 53} 54 55// The `Placement` resource. 56message Placement { 57 option (google.api.resource) = { 58 type: "admanager.googleapis.com/Placement" 59 pattern: "networks/{network_code}/placements/{placement}" 60 plural: "placements" 61 singular: "placement" 62 }; 63 64 // Identifier. The resource name of the `Placement`. 65 // Format: `networks/{network_code}/placements/{placement_id}` 66 string name = 1 [(google.api.field_behavior) = IDENTIFIER]; 67 68 // Output only. `Placement` ID. 69 int64 placement_id = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; 70 71 // Required. The display name of the placement. Its maximum length is 255 72 // characters. 73 string display_name = 3 [(google.api.field_behavior) = REQUIRED]; 74 75 // Optional. A description of the Placement. This value is optional and its 76 // maximum length is 65,535 characters. 77 string description = 4 [(google.api.field_behavior) = OPTIONAL]; 78 79 // Output only. A string used to uniquely identify the Placement for purposes 80 // of serving the ad. This attribute is read-only and is assigned by Google 81 // when a placement is created. 82 string placement_code = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; 83 84 // Output only. The status of the Placement. This attribute is read-only. 85 PlacementStatusEnum.PlacementStatus status = 6 86 [(google.api.field_behavior) = OUTPUT_ONLY]; 87 88 // Optional. The resource names of AdUnits that constitute the Placement. 89 // Format: "networks/{network_code}/adUnits/{ad_unit_id}" 90 repeated string targeted_ad_units = 7 [ 91 (google.api.field_behavior) = OPTIONAL, 92 (google.api.resource_reference) = { 93 type: "admanager.googleapis.com/AdUnit" 94 } 95 ]; 96 97 // Output only. The instant this Placement was last modified. 98 google.protobuf.Timestamp update_time = 9 99 [(google.api.field_behavior) = OUTPUT_ONLY]; 100} 101 102// Request object for `GetPlacement` method. 103message GetPlacementRequest { 104 // Required. The resource name of the Placement. 105 // Format: `networks/{network_code}/placements/{placement_id}` 106 string name = 1 [ 107 (google.api.field_behavior) = REQUIRED, 108 (google.api.resource_reference) = { 109 type: "admanager.googleapis.com/Placement" 110 } 111 ]; 112} 113 114// Request object for `ListPlacements` method. 115message ListPlacementsRequest { 116 // Required. The parent, which owns this collection of Placements. 117 // Format: `networks/{network_code}` 118 string parent = 1 [ 119 (google.api.field_behavior) = REQUIRED, 120 (google.api.resource_reference) = { 121 type: "admanager.googleapis.com/Network" 122 } 123 ]; 124 125 // Optional. The maximum number of `Placements` to return. The service may 126 // return fewer than this value. If unspecified, at most 50 `Placements` will 127 // be returned. The maximum value is 1000; values above 1000 will be coerced 128 // to 1000. 129 int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; 130 131 // Optional. A page token, received from a previous `ListPlacements` call. 132 // Provide this to retrieve the subsequent page. 133 // 134 // When paginating, all other parameters provided to `ListPlacements` must 135 // match the call that provided the page token. 136 string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; 137 138 // Optional. Expression to filter the response. 139 // See syntax details at 140 // https://developers.google.com/ad-manager/api/beta/filters 141 string filter = 4 [(google.api.field_behavior) = OPTIONAL]; 142 143 // Optional. Expression to specify sorting order. 144 // See syntax details at 145 // https://developers.google.com/ad-manager/api/beta/filters#order 146 string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; 147 148 // Optional. Number of individual resources to skip while paginating. 149 int32 skip = 6 [(google.api.field_behavior) = OPTIONAL]; 150} 151 152// Response object for `ListPlacementsRequest` containing matching `Placement` 153// objects. 154message ListPlacementsResponse { 155 // The `Placement` objects from the specified network. 156 repeated Placement placements = 1; 157 158 // A token, which can be sent as `page_token` to retrieve the next page. 159 // If this field is omitted, there are no subsequent pages. 160 string next_page_token = 2; 161 162 // Total number of `Placement` objects. 163 // If a filter was included in the request, this reflects the total number 164 // after the filtering is applied. 165 // 166 // `total_size` will not be calculated in the response unless it has been 167 // included in a response field mask. The response field mask can be provided 168 // to the method by using the URL parameter `$fields` or `fields`, or by using 169 // the HTTP/gRPC header `X-Goog-FieldMask`. 170 // 171 // For more information, see 172 // https://developers.google.com/ad-manager/api/beta/field-masks 173 int32 total_size = 3; 174} 175