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/ad_partner_declaration.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 = "CreativeServiceProto"; 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 Creative objects. 35service CreativeService { 36 option (google.api.default_host) = "admanager.googleapis.com"; 37 38 // API to retrieve a Creative object. 39 rpc GetCreative(GetCreativeRequest) returns (Creative) { 40 option (google.api.http) = { 41 get: "/v1/{name=networks/*/creatives/*}" 42 }; 43 option (google.api.method_signature) = "name"; 44 } 45 46 // API to retrieve a list of Creative objects. 47 rpc ListCreatives(ListCreativesRequest) returns (ListCreativesResponse) { 48 option (google.api.http) = { 49 get: "/v1/{parent=networks/*}/creatives" 50 }; 51 option (google.api.method_signature) = "parent"; 52 } 53} 54 55// The Creative resource. 56message Creative { 57 option (google.api.resource) = { 58 type: "admanager.googleapis.com/Creative" 59 pattern: "networks/{network_code}/creatives/{creative}" 60 plural: "creatives" 61 singular: "creative" 62 }; 63 64 // Identifier. The resource name of the Creative. 65 // Format: `networks/{network_code}/creatives/{creative_id}` 66 string name = 1 [(google.api.field_behavior) = IDENTIFIER]; 67 68 // Output only. `Creative` ID. 69 int64 creative_id = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; 70 71 // Optional. Display name of the `Creative`. This attribute has a maximum 72 // length of 255 characters. 73 string display_name = 8 [(google.api.field_behavior) = OPTIONAL]; 74 75 // Required. The resource name of the Company, which is of type 76 // Company.Type.ADVERTISER, to which this Creative belongs. Format: 77 // "networks/{network_code}/companies/{company_id}" 78 string advertiser = 2 [ 79 (google.api.field_behavior) = REQUIRED, 80 (google.api.resource_reference) = { 81 type: "admanager.googleapis.com/Company" 82 } 83 ]; 84 85 // Output only. The instant this Creative was last modified. 86 google.protobuf.Timestamp update_time = 3 87 [(google.api.field_behavior) = OUTPUT_ONLY]; 88 89 // Output only. The URL of the creative for previewing the media. 90 string preview_url = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; 91 92 // Output only. String representations of creative size. 93 // This field is temporarily available and will be deprecated when 94 // `Creative.size` becomes available. 95 string size_label = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; 96 97 // Optional. The Ad Partners associated with this creative. 98 // This is distinct from any associated companies that Google may detect 99 // programmatically. 100 AdPartnerDeclaration ad_partner_declaration = 6 101 [(google.api.field_behavior) = OPTIONAL]; 102} 103 104// Request object for GetCreative method. 105message GetCreativeRequest { 106 // Required. The resource name of the Creative. 107 // Format: `networks/{network_code}/creatives/{creative_id}` 108 string name = 1 [ 109 (google.api.field_behavior) = REQUIRED, 110 (google.api.resource_reference) = { 111 type: "admanager.googleapis.com/Creative" 112 } 113 ]; 114} 115 116// Request object for ListCreatives method. 117message ListCreativesRequest { 118 // Required. The parent, which owns this collection of Creatives. 119 // Format: networks/{network_code} 120 string parent = 1 [ 121 (google.api.field_behavior) = REQUIRED, 122 (google.api.resource_reference) = { 123 type: "admanager.googleapis.com/Network" 124 } 125 ]; 126 127 // Optional. The maximum number of Creatives to return. The service may return 128 // fewer than this value. If unspecified, at most 50 creatives will be 129 // returned. The maximum value is 1000; values above 1000 will be coerced to 130 // 1000. 131 int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; 132 133 // Optional. A page token, received from a previous `ListCreatives` call. 134 // Provide this to retrieve the subsequent page. 135 // 136 // When paginating, all other parameters provided to `ListCreatives` must 137 // match the call that provided the page token. 138 string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; 139 140 // Optional. Expression to filter the response. 141 // See syntax details at 142 // https://developers.google.com/ad-manager/api/beta/filters 143 string filter = 4 [(google.api.field_behavior) = OPTIONAL]; 144 145 // Optional. Expression to specify sorting order. 146 // See syntax details at 147 // https://developers.google.com/ad-manager/api/beta/filters#order 148 string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; 149 150 // Optional. Number of individual resources to skip while paginating. 151 int32 skip = 6 [(google.api.field_behavior) = OPTIONAL]; 152} 153 154// Response object for ListCreativesRequest containing matching Creative 155// resources. 156message ListCreativesResponse { 157 // The Creative from the specified network. 158 repeated Creative creatives = 1; 159 160 // A token, which can be sent as `page_token` to retrieve the next page. 161 // If this field is omitted, there are no subsequent pages. 162 string next_page_token = 2; 163 164 // Total number of Creatives. 165 // If a filter was included in the request, this reflects the total number 166 // after the filtering is applied. 167 // 168 // `total_size` will not be calculated in the response unless it has been 169 // included in a response field mask. The response field mask can be provided 170 // to the method by using the URL parameter `$fields` or `fields`, or by using 171 // the HTTP/gRPC header `X-Goog-FieldMask`. 172 // 173 // For more information, see 174 // https://developers.google.com/ad-manager/api/beta/field-masks 175 int32 total_size = 3; 176} 177