xref: /aosp_15_r20/external/googleapis/google/ads/googleads/v16/common/frequency_cap.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.v16.common;
18
19import "google/ads/googleads/v16/enums/frequency_cap_event_type.proto";
20import "google/ads/googleads/v16/enums/frequency_cap_level.proto";
21import "google/ads/googleads/v16/enums/frequency_cap_time_unit.proto";
22
23option csharp_namespace = "Google.Ads.GoogleAds.V16.Common";
24option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v16/common;common";
25option java_multiple_files = true;
26option java_outer_classname = "FrequencyCapProto";
27option java_package = "com.google.ads.googleads.v16.common";
28option objc_class_prefix = "GAA";
29option php_namespace = "Google\\Ads\\GoogleAds\\V16\\Common";
30option ruby_package = "Google::Ads::GoogleAds::V16::Common";
31
32// Proto file describing frequency caps.
33
34// A rule specifying the maximum number of times an ad (or some set of ads) can
35// be shown to a user over a particular time period.
36message FrequencyCapEntry {
37  // The key of a particular frequency cap. There can be no more
38  // than one frequency cap with the same key.
39  FrequencyCapKey key = 1;
40
41  // Maximum number of events allowed during the time range by this cap.
42  optional int32 cap = 3;
43}
44
45// A group of fields used as keys for a frequency cap.
46// There can be no more than one frequency cap with the same key.
47message FrequencyCapKey {
48  // The level on which the cap is to be applied (for example, ad group ad, ad
49  // group). The cap is applied to all the entities of this level.
50  google.ads.googleads.v16.enums.FrequencyCapLevelEnum.FrequencyCapLevel level =
51      1;
52
53  // The type of event that the cap applies to (for example, impression).
54  google.ads.googleads.v16.enums.FrequencyCapEventTypeEnum.FrequencyCapEventType
55      event_type = 3;
56
57  // Unit of time the cap is defined at (for example, day, week).
58  google.ads.googleads.v16.enums.FrequencyCapTimeUnitEnum.FrequencyCapTimeUnit
59      time_unit = 2;
60
61  // Number of time units the cap lasts.
62  optional int32 time_length = 5;
63}
64