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/custom_targeting_value_enums.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.AdManager.V1"; 26option go_package = "google.golang.org/genproto/googleapis/ads/admanager/v1;admanager"; 27option java_multiple_files = true; 28option java_outer_classname = "CustomTargetingValueServiceProto"; 29option java_package = "com.google.ads.admanager.v1"; 30option objc_class_prefix = "GAA"; 31option php_namespace = "Google\\Ads\\AdManager\\V1"; 32 33// Provides methods for handling `CustomTargetingValue` objects. 34service CustomTargetingValueService { 35 option (google.api.default_host) = "admanager.googleapis.com"; 36 37 // API to retrieve a `CustomTargetingValue` object. 38 rpc GetCustomTargetingValue(GetCustomTargetingValueRequest) 39 returns (CustomTargetingValue) { 40 option (google.api.http) = { 41 get: "/v1/{name=networks/*/customTargetingKeys/*/customTargetingValues/*}" 42 }; 43 option (google.api.method_signature) = "name"; 44 } 45 46 // API to retrieve a list of `CustomTargetingValue` objects. 47 rpc ListCustomTargetingValues(ListCustomTargetingValuesRequest) 48 returns (ListCustomTargetingValuesResponse) { 49 option (google.api.http) = { 50 get: "/v1/{parent=networks/*/customTargetingKeys/*}/customTargetingValues" 51 }; 52 option (google.api.method_signature) = "parent"; 53 } 54} 55 56// The `CustomTargetingValue` resource. 57message CustomTargetingValue { 58 option (google.api.resource) = { 59 type: "admanager.googleapis.com/CustomTargetingValue" 60 pattern: "networks/{network_code}/customTargetingKeys/{custom_targeting_key}/customTargetingValues/{custom_targeting_value}" 61 plural: "customTargetingValues" 62 singular: "customTargetingValue" 63 }; 64 65 // Identifier. The resource name of the `CustomTargetingValue`. 66 // Format: 67 // `networks/{network_code}/customTargetingKeys/{custom_targeting_key_id}/customTargetingValues/{custom_targeting_value_id}` 68 string name = 1 [(google.api.field_behavior) = IDENTIFIER]; 69 70 // Immutable. Name of the `CustomTargetingValue`. Values can contain up to 40 71 // characters each. You can use alphanumeric characters and symbols other than 72 // the following: ", ', =, !, +, #, *, ~, ;, ^, (, ), <, >, [, ]. Values are 73 // not data-specific; all values are treated as string. For example, instead 74 // of using "age>=18 AND <=34", try "18-34" 75 string ad_tag_name = 4 [(google.api.field_behavior) = IMMUTABLE]; 76 77 // Optional. Descriptive name for the `CustomTargetingValue`. 78 string display_name = 5 [(google.api.field_behavior) = OPTIONAL]; 79 80 // Required. The way in which the CustomTargetingValue.name strings will be 81 // matched. 82 CustomTargetingValueMatchTypeEnum.CustomTargetingValueMatchType match_type = 6 83 [(google.api.field_behavior) = REQUIRED]; 84 85 // Output only. Status of the `CustomTargetingValue`. 86 CustomTargetingValueStatusEnum.CustomTargetingValueStatus status = 7 87 [(google.api.field_behavior) = OUTPUT_ONLY]; 88} 89 90// Request object for `GetCustomTargetingValue` method. 91message GetCustomTargetingValueRequest { 92 // Required. The resource name of the CustomTargetingValue. 93 // Format: 94 // `networks/{network_code}/customTargetingKeys/{custom_targeting_key_id}/customTargetingValues/{custom_targeting_value_id}` 95 string name = 1 [ 96 (google.api.field_behavior) = REQUIRED, 97 (google.api.resource_reference) = { 98 type: "admanager.googleapis.com/CustomTargetingValue" 99 } 100 ]; 101} 102 103// Request object for `ListCustomTargetingValues` method. 104message ListCustomTargetingValuesRequest { 105 // Required. The parent, which owns this collection of CustomTargetingValues. 106 // Format: 107 // `networks/{network_code}/customTargetingKeys/{custom_targeting_key_id}` 108 string parent = 1 [ 109 (google.api.field_behavior) = REQUIRED, 110 (google.api.resource_reference) = { 111 type: "admanager.googleapis.com/CustomTargetingKey" 112 } 113 ]; 114 115 // Optional. The maximum number of `CustomTargetingValues` to return. The 116 // service may return fewer than this value. If unspecified, at most 50 117 // `CustomTargetingValues` will be returned. The maximum value is 1000; values 118 // above 1000 will be coerced to 1000. 119 int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; 120 121 // Optional. A page token, received from a previous 122 // `ListCustomTargetingValues` call. Provide this to retrieve the subsequent 123 // page. 124 // 125 // When paginating, all other parameters provided to 126 // `ListCustomTargetingValues` must match the call that provided the page 127 // token. 128 string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; 129 130 // Optional. Expression to filter the response. 131 // See syntax details at 132 // https://developers.google.com/ad-manager/api/beta/filters 133 string filter = 4 [(google.api.field_behavior) = OPTIONAL]; 134 135 // Optional. Expression to specify sorting order. 136 // See syntax details at 137 // https://developers.google.com/ad-manager/api/beta/filters#order 138 string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; 139 140 // Optional. Number of individual resources to skip while paginating. 141 int32 skip = 6 [(google.api.field_behavior) = OPTIONAL]; 142} 143 144// Response object for `ListCustomTargetingValuesRequest` containing matching 145// `CustomTargetingValue` objects. 146message ListCustomTargetingValuesResponse { 147 // The `CustomTargetingValue` objects from the specified network. 148 repeated CustomTargetingValue custom_targeting_values = 1; 149 150 // A token, which can be sent as `page_token` to retrieve the next page. 151 // If this field is omitted, there are no subsequent pages. 152 string next_page_token = 2; 153 154 // Total number of `CustomTargetingValue` objects. 155 // If a filter was included in the request, this reflects the total number 156 // after the filtering is applied. 157 // 158 // `total_size` will not be calculated in the response unless it has been 159 // included in a response field mask. The response field mask can be provided 160 // to the method by using the URL parameter `$fields` or `fields`, or by using 161 // the HTTP/gRPC header `X-Goog-FieldMask`. 162 // 163 // For more information, see 164 // https://developers.google.com/ad-manager/api/beta/field-masks 165 int32 total_size = 3; 166} 167