frequency_cap.proto 2.5 KB

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