frequency_cap.proto 2.5 KB

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