|
| 1 | +// Copyright 2025 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 | + |
| 15 | +syntax = "proto3"; |
| 16 | + |
| 17 | +package google.ads.admanager.v1; |
| 18 | + |
| 19 | +import "google/ads/admanager/v1/ad_review_center_ad_enums.proto"; |
| 20 | +import "google/ads/admanager/v1/ad_review_center_ad_messages.proto"; |
| 21 | +import "google/api/annotations.proto"; |
| 22 | +import "google/api/client.proto"; |
| 23 | +import "google/api/field_behavior.proto"; |
| 24 | +import "google/api/resource.proto"; |
| 25 | +import "google/longrunning/operations.proto"; |
| 26 | +import "google/rpc/status.proto"; |
| 27 | +import "google/type/interval.proto"; |
| 28 | + |
| 29 | +option csharp_namespace = "Google.Ads.AdManager.V1"; |
| 30 | +option go_package = "google.golang.org/genproto/googleapis/ads/admanager/v1;admanager"; |
| 31 | +option java_multiple_files = true; |
| 32 | +option java_outer_classname = "AdReviewCenterAdServiceProto"; |
| 33 | +option java_package = "com.google.ads.admanager.v1"; |
| 34 | +option php_namespace = "Google\\Ads\\AdManager\\V1"; |
| 35 | +option ruby_package = "Google::Ads::AdManager::V1"; |
| 36 | + |
| 37 | +// Provides methods for handling AdReviewCenterAd objects. |
| 38 | +service AdReviewCenterAdService { |
| 39 | + option (google.api.default_host) = "admanager.googleapis.com"; |
| 40 | + option (google.api.oauth_scopes) = |
| 41 | + "https://www.googleapis.com/auth/admanager"; |
| 42 | + |
| 43 | + // API to search for AdReviewCenterAds. |
| 44 | + rpc SearchAdReviewCenterAds(SearchAdReviewCenterAdsRequest) |
| 45 | + returns (SearchAdReviewCenterAdsResponse) { |
| 46 | + option (google.api.http) = { |
| 47 | + get: "/v1/{parent=networks/*/webProperties/*}/adReviewCenterAds:search" |
| 48 | + }; |
| 49 | + option (google.api.method_signature) = "parent"; |
| 50 | + } |
| 51 | + |
| 52 | + // API to batch allow AdReviewCenterAds. |
| 53 | + // This method supports partial success. Some operations may succeed while |
| 54 | + // others fail. Callers should check the failedRequests field in the response |
| 55 | + // to determine which operations failed. |
| 56 | + rpc BatchAllowAdReviewCenterAds(BatchAllowAdReviewCenterAdsRequest) |
| 57 | + returns (google.longrunning.Operation) { |
| 58 | + option (google.api.http) = { |
| 59 | + post: "/v1/{parent=networks/*/webProperties/*}/adReviewCenterAds:batchAllow" |
| 60 | + body: "*" |
| 61 | + }; |
| 62 | + option (google.api.method_signature) = "parent"; |
| 63 | + option (google.longrunning.operation_info) = { |
| 64 | + response_type: "BatchAllowAdReviewCenterAdsResponse" |
| 65 | + metadata_type: "BatchAdReviewCenterAdsOperationMetadata" |
| 66 | + }; |
| 67 | + } |
| 68 | + |
| 69 | + // API to batch block AdReviewCenterAds. |
| 70 | + // This method supports partial success. Some operations may succeed while |
| 71 | + // others fail. Callers should check the failedRequests field in the response |
| 72 | + // to determine which operations failed. |
| 73 | + rpc BatchBlockAdReviewCenterAds(BatchBlockAdReviewCenterAdsRequest) |
| 74 | + returns (google.longrunning.Operation) { |
| 75 | + option (google.api.http) = { |
| 76 | + post: "/v1/{parent=networks/*/webProperties/*}/adReviewCenterAds:batchBlock" |
| 77 | + body: "*" |
| 78 | + }; |
| 79 | + option (google.api.method_signature) = "parent"; |
| 80 | + option (google.longrunning.operation_info) = { |
| 81 | + response_type: "BatchBlockAdReviewCenterAdsResponse" |
| 82 | + metadata_type: "BatchAdReviewCenterAdsOperationMetadata" |
| 83 | + }; |
| 84 | + } |
| 85 | +} |
| 86 | + |
| 87 | +// Request object for `SearchAdReviewCenterAds` method. |
| 88 | +message SearchAdReviewCenterAdsRequest { |
| 89 | + // Required. The parent, which owns this collection of AdReviewCenterAds. |
| 90 | + // Format: networks/{network_code}/webProperties/{web_property_code} |
| 91 | + // |
| 92 | + // Since a network can only have a single web property of each |
| 93 | + // `ExchangeSyndicationProduct`, you can use the |
| 94 | + // `ExchangeSyndicationProduct` as an alias for the web property code: |
| 95 | + // |
| 96 | + // `networks/{network_code}/webProperties/display` |
| 97 | + // |
| 98 | + // `networks/{network_code}/webProperties/videoAndAudio` |
| 99 | + // |
| 100 | + // `networks/{network_code}/webProperties/mobileApp` |
| 101 | + // |
| 102 | + // `networks/{network_code}/webProperties/games` |
| 103 | + string parent = 1 [ |
| 104 | + (google.api.field_behavior) = REQUIRED, |
| 105 | + (google.api.resource_reference) = { |
| 106 | + type: "admanager.googleapis.com/WebProperty" |
| 107 | + } |
| 108 | + ]; |
| 109 | + |
| 110 | + // Optional. The maximum number of AdReviewCenterAds to return. The service |
| 111 | + // may return fewer than this value. If unspecified, at most 50 |
| 112 | + // AdReviewCenterAds will be returned. The maximum value is 1000; values |
| 113 | + // greater than 1000 will be coerced to 1000. |
| 114 | + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; |
| 115 | + |
| 116 | + // Optional. The page token to fetch the next page of AdReviewCenterAds. This |
| 117 | + // is the value returned from a previous Search request, or empty. |
| 118 | + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; |
| 119 | + |
| 120 | + // Required. Only return ads with the given status. |
| 121 | + AdReviewCenterAdStatusEnum.AdReviewCenterAdStatus status = 4 |
| 122 | + [(google.api.field_behavior) = REQUIRED]; |
| 123 | + |
| 124 | + // Optional. If provided, only return ads with the given AdReviewCenterAd IDs. |
| 125 | + repeated string ad_review_center_ad_id = 5 |
| 126 | + [(google.api.field_behavior) = OPTIONAL]; |
| 127 | + |
| 128 | + // Optional. If provided, only return ads that served within the given date |
| 129 | + // range (inclusive). The date range must be within the last 30 days. If not |
| 130 | + // provided, the date range will be the last 30 days. |
| 131 | + google.type.Interval date_time_range = 6 |
| 132 | + [(google.api.field_behavior) = OPTIONAL]; |
| 133 | + |
| 134 | + // Optional. If provided, restrict the search to AdReviewCenterAds associated |
| 135 | + // with the text (including any text on the ad or in the destination URL). If |
| 136 | + // more than one value is provided, the search will combine them in a logical |
| 137 | + // AND. For example, ['car', 'blue'] will match ads that contain both "car" |
| 138 | + // and "blue", but not an ad that only contains "car". |
| 139 | + repeated string search_text = 7 [(google.api.field_behavior) = OPTIONAL]; |
| 140 | + |
| 141 | + // Optional. If provided, restrict the search to creatives belonging to one of |
| 142 | + // the given Adx buyer account IDs. Only applicable to RTB creatives. Adx |
| 143 | + // buyer account IDs can be found via the ProgrammaticBuyerService. |
| 144 | + repeated int64 buyer_account_id = 8 [(google.api.field_behavior) = OPTIONAL]; |
| 145 | +} |
| 146 | + |
| 147 | +// Response object for `SearchAdReviewCenterAds` method. |
| 148 | +message SearchAdReviewCenterAdsResponse { |
| 149 | + // The AdReviewCenterAds that match the search request. |
| 150 | + repeated AdReviewCenterAd ad_review_center_ads = 1; |
| 151 | + |
| 152 | + // A token, which can be sent as `page_token` to retrieve the next page. |
| 153 | + // If this field is omitted, there are no subsequent pages. |
| 154 | + string next_page_token = 2; |
| 155 | +} |
| 156 | + |
| 157 | +// Request object for `BatchAllowAdReviewCenterAds` method. |
| 158 | +message BatchAllowAdReviewCenterAdsRequest { |
| 159 | + // Required. The parent, which owns this collection of AdReviewCenterAds. |
| 160 | + // Format: networks/{network_code}/webProperties/{web_property_code} |
| 161 | + // |
| 162 | + // Since a network can only have a single web property of each |
| 163 | + // `ExchangeSyndicationProduct`, you can use the |
| 164 | + // `ExchangeSyndicationProduct` as an alias for the web property code: |
| 165 | + // |
| 166 | + // `networks/{network_code}/webProperties/display` |
| 167 | + // |
| 168 | + // `networks/{network_code}/webProperties/videoAndAudio` |
| 169 | + // |
| 170 | + // `networks/{network_code}/webProperties/mobileApp` |
| 171 | + // |
| 172 | + // `networks/{network_code}/webProperties/games` |
| 173 | + string parent = 1 [ |
| 174 | + (google.api.field_behavior) = REQUIRED, |
| 175 | + (google.api.resource_reference) = { |
| 176 | + type: "admanager.googleapis.com/WebProperty" |
| 177 | + } |
| 178 | + ]; |
| 179 | + |
| 180 | + // Required. The resource names of the `AdReviewCenterAd`s to allow. |
| 181 | + // Format: |
| 182 | + // `networks/{network_code}/webProperties/{web_property_code}/adReviewCenterAds/{ad_review_center_ad_id}` |
| 183 | + repeated string names = 2 [ |
| 184 | + (google.api.field_behavior) = REQUIRED, |
| 185 | + (google.api.resource_reference) = { |
| 186 | + type: "admanager.googleapis.com/AdReviewCenterAd" |
| 187 | + } |
| 188 | + ]; |
| 189 | +} |
| 190 | + |
| 191 | +// Response object for `BatchAllowAdReviewCenterAds` method. |
| 192 | +message BatchAllowAdReviewCenterAdsResponse {} |
| 193 | + |
| 194 | +// Request object for `BatchBlockAdReviewCenterAds` method. |
| 195 | +message BatchBlockAdReviewCenterAdsRequest { |
| 196 | + // Required. The parent, which owns this collection of AdReviewCenterAds. |
| 197 | + // Format: networks/{network_code}/webProperties/{web_property_code} |
| 198 | + // |
| 199 | + // Since a network can only have a single web property of each |
| 200 | + // `ExchangeSyndicationProduct`, you can use the |
| 201 | + // `ExchangeSyndicationProduct` as an alias for the web property code: |
| 202 | + // |
| 203 | + // `networks/{network_code}/webProperties/display` |
| 204 | + // |
| 205 | + // `networks/{network_code}/webProperties/videoAndAudio` |
| 206 | + // |
| 207 | + // `networks/{network_code}/webProperties/mobileApp` |
| 208 | + // |
| 209 | + // `networks/{network_code}/webProperties/games` |
| 210 | + string parent = 1 [ |
| 211 | + (google.api.field_behavior) = REQUIRED, |
| 212 | + (google.api.resource_reference) = { |
| 213 | + type: "admanager.googleapis.com/WebProperty" |
| 214 | + } |
| 215 | + ]; |
| 216 | + |
| 217 | + // Required. The resource names of the `AdReviewCenterAd`s to block. |
| 218 | + // Format: |
| 219 | + // `networks/{network_code}/webProperties/{web_property_code}/adReviewCenterAds/{ad_review_center_ad_id}` |
| 220 | + repeated string names = 2 [ |
| 221 | + (google.api.field_behavior) = REQUIRED, |
| 222 | + (google.api.resource_reference) = { |
| 223 | + type: "admanager.googleapis.com/AdReviewCenterAd" |
| 224 | + } |
| 225 | + ]; |
| 226 | +} |
| 227 | + |
| 228 | +// Response object for `BatchBlockAdReviewCenterAds` method. |
| 229 | +message BatchBlockAdReviewCenterAdsResponse {} |
| 230 | + |
| 231 | +// Metadata object for `BatchAllowAdReviewCenterAds` and |
| 232 | +// `BatchBlockAdReviewCenterAds` methods. |
| 233 | +message BatchAdReviewCenterAdsOperationMetadata { |
| 234 | + // The status of each failed request, keyed by the index of the corresponding |
| 235 | + // request in the batch request. |
| 236 | + map<int32, google.rpc.Status> failed_requests = 1; |
| 237 | +} |
0 commit comments