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_key_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 = "CustomTargetingKeyServiceProto"; 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 `CustomTargetingKey` objects. 34service CustomTargetingKeyService { 35 option (google.api.default_host) = "admanager.googleapis.com"; 36 37 // API to retrieve a `CustomTargetingKey` object. 38 rpc GetCustomTargetingKey(GetCustomTargetingKeyRequest) 39 returns (CustomTargetingKey) { 40 option (google.api.http) = { 41 get: "/v1/{name=networks/*/customTargetingKeys/*}" 42 }; 43 option (google.api.method_signature) = "name"; 44 } 45 46 // API to retrieve a list of `CustomTargetingKey` objects. 47 rpc ListCustomTargetingKeys(ListCustomTargetingKeysRequest) 48 returns (ListCustomTargetingKeysResponse) { 49 option (google.api.http) = { 50 get: "/v1/{parent=networks/*}/customTargetingKeys" 51 }; 52 option (google.api.method_signature) = "parent"; 53 } 54} 55 56// The `CustomTargetingKey` resource. 57message CustomTargetingKey { 58 option (google.api.resource) = { 59 type: "admanager.googleapis.com/CustomTargetingKey" 60 pattern: "networks/{network_code}/customTargetingKeys/{custom_targeting_key}" 61 plural: "customTargetingKeys" 62 singular: "customTargetingKey" 63 }; 64 65 // Identifier. The resource name of the `CustomTargetingKey`. 66 // Format: 67 // `networks/{network_code}/customTargetingKeys/{custom_targeting_key_id}` 68 string name = 1 [(google.api.field_behavior) = IDENTIFIER]; 69 70 // Output only. `CustomTargetingKey` ID. 71 int64 custom_targeting_key_id = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; 72 73 // Immutable. Name of the key. Keys can contain up to 10 characters each. You 74 // can use alphanumeric characters and symbols other than the following: 75 // ", ', =, !, +, #, *, ~, ;, ^, (, ), <, >, [, ], the white space character. 76 string ad_tag_name = 3 [(google.api.field_behavior) = IMMUTABLE]; 77 78 // Optional. Descriptive name for the `CustomTargetingKey`. 79 string display_name = 4 [(google.api.field_behavior) = OPTIONAL]; 80 81 // Required. Indicates whether users will select from predefined values or 82 // create new targeting values, while specifying targeting criteria for a line 83 // item. 84 CustomTargetingKeyTypeEnum.CustomTargetingKeyType type = 5 85 [(google.api.field_behavior) = REQUIRED]; 86 87 // Output only. Status of the `CustomTargetingKey`. 88 CustomTargetingKeyStatusEnum.CustomTargetingKeyStatus status = 6 89 [(google.api.field_behavior) = OUTPUT_ONLY]; 90 91 // Required. Reportable state of the `CustomTargetingKey`. 92 CustomTargetingKeyReportableTypeEnum.CustomTargetingKeyReportableType 93 reportable_type = 7 [(google.api.field_behavior) = REQUIRED]; 94} 95 96// Request object for `GetCustomTargetingKey` method. 97message GetCustomTargetingKeyRequest { 98 // Required. The resource name of the CustomTargetingKey. 99 // Format: 100 // `networks/{network_code}/customTargetingKeys/{custom_targeting_key_id}` 101 string name = 1 [ 102 (google.api.field_behavior) = REQUIRED, 103 (google.api.resource_reference) = { 104 type: "admanager.googleapis.com/CustomTargetingKey" 105 } 106 ]; 107} 108 109// Request object for `ListCustomTargetingKeys` method. 110message ListCustomTargetingKeysRequest { 111 // Required. The parent, which owns this collection of CustomTargetingKeys. 112 // Format: `networks/{network_code}` 113 string parent = 1 [ 114 (google.api.field_behavior) = REQUIRED, 115 (google.api.resource_reference) = { 116 type: "admanager.googleapis.com/Network" 117 } 118 ]; 119 120 // Optional. The maximum number of `CustomTargetingKeys` to return. The 121 // service may return fewer than this value. If unspecified, at most 50 122 // `CustomTargetingKeys` will be returned. The maximum value is 1000; values 123 // above 1000 will be coerced to 1000. 124 int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; 125 126 // Optional. A page token, received from a previous `ListCustomTargetingKeys` 127 // call. Provide this to retrieve the subsequent page. 128 // 129 // When paginating, all other parameters provided to `ListCustomTargetingKeys` 130 // must match the call that provided the page token. 131 string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; 132 133 // Optional. Expression to filter the response. 134 // See syntax details at 135 // https://developers.google.com/ad-manager/api/beta/filters 136 string filter = 4 [(google.api.field_behavior) = OPTIONAL]; 137 138 // Optional. Expression to specify sorting order. 139 // See syntax details at 140 // https://developers.google.com/ad-manager/api/beta/filters#order 141 string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; 142 143 // Optional. Number of individual resources to skip while paginating. 144 int32 skip = 6 [(google.api.field_behavior) = OPTIONAL]; 145} 146 147// Response object for `ListCustomTargetingKeysRequest` containing matching 148// `CustomTargetingKey` objects. 149message ListCustomTargetingKeysResponse { 150 // The `CustomTargetingKey` objects from the specified network. 151 repeated CustomTargetingKey custom_targeting_keys = 1; 152 153 // A token, which can be sent as `page_token` to retrieve the next page. 154 // If this field is omitted, there are no subsequent pages. 155 string next_page_token = 2; 156 157 // Total number of `CustomTargetingKey` objects. 158 // If a filter was included in the request, this reflects the total number 159 // after the filtering is applied. 160 // 161 // `total_size` will not be calculated in the response unless it has been 162 // included in a response field mask. The response field mask can be provided 163 // to the method by using the URL parameter `$fields` or `fields`, or by using 164 // the HTTP/gRPC header `X-Goog-FieldMask`. 165 // 166 // For more information, see 167 // https://developers.google.com/ad-manager/api/beta/field-masks 168 int32 total_size = 3; 169} 170