xref: /aosp_15_r20/external/googleapis/google/ads/googleads/v14/common/targeting_setting.proto (revision d5c09012810ac0c9f33fe448fb6da8260d444cc9)
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.googleads.v14.common;
18
19import "google/ads/googleads/v14/enums/targeting_dimension.proto";
20
21option csharp_namespace = "Google.Ads.GoogleAds.V14.Common";
22option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v14/common;common";
23option java_multiple_files = true;
24option java_outer_classname = "TargetingSettingProto";
25option java_package = "com.google.ads.googleads.v14.common";
26option objc_class_prefix = "GAA";
27option php_namespace = "Google\\Ads\\GoogleAds\\V14\\Common";
28option ruby_package = "Google::Ads::GoogleAds::V14::Common";
29
30// Proto file describing TargetingSetting
31
32// Settings for the targeting-related features, at the campaign and ad group
33// levels. For more details about the targeting setting, visit
34// https://support.google.com/google-ads/answer/7365594
35message TargetingSetting {
36  // The per-targeting-dimension setting to restrict the reach of your campaign
37  // or ad group.
38  repeated TargetRestriction target_restrictions = 1;
39
40  // The list of operations changing the target restrictions.
41  //
42  // Adding a target restriction with a targeting dimension that already exists
43  // causes the existing target restriction to be replaced with the new value.
44  repeated TargetRestrictionOperation target_restriction_operations = 2;
45}
46
47// The list of per-targeting-dimension targeting settings.
48message TargetRestriction {
49  // The targeting dimension that these settings apply to.
50  google.ads.googleads.v14.enums.TargetingDimensionEnum.TargetingDimension
51      targeting_dimension = 1;
52
53  // Indicates whether to restrict your ads to show only for the criteria you
54  // have selected for this targeting_dimension, or to target all values for
55  // this targeting_dimension and show ads based on your targeting in other
56  // TargetingDimensions. A value of `true` means that these criteria will only
57  // apply bid modifiers, and not affect targeting. A value of `false` means
58  // that these criteria will restrict targeting as well as applying bid
59  // modifiers.
60  optional bool bid_only = 3;
61}
62
63// Operation to be performed on a target restriction list in a mutate.
64message TargetRestrictionOperation {
65  // The operator.
66  enum Operator {
67    // Unspecified.
68    UNSPECIFIED = 0;
69
70    // Used for return value only. Represents value unknown in this version.
71    UNKNOWN = 1;
72
73    // Add the restriction to the existing restrictions.
74    ADD = 2;
75
76    // Remove the restriction from the existing restrictions.
77    REMOVE = 3;
78  }
79
80  // Type of list operation to perform.
81  Operator operator = 1;
82
83  // The target restriction being added to or removed from the list.
84  TargetRestriction value = 2;
85}
86