1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
// This file is @generated by prost-build.
/// A publisher account contains information relevant to the use of this API,
/// such as the time zone used for the reports.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PublisherAccount {
    /// Resource name of this account.
    /// Format is accounts/{publisher_id}.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// The unique ID by which this publisher account can be identified
    /// in the API requests (for example, pub-1234567890).
    #[prost(string, tag = "2")]
    pub publisher_id: ::prost::alloc::string::String,
    /// The time zone that is used in reports that are generated for this account.
    /// The value is a time-zone ID as specified by the CLDR project,
    /// for example, "America/Los_Angeles".
    #[prost(string, tag = "3")]
    pub reporting_time_zone: ::prost::alloc::string::String,
    /// Currency code of the earning-related metrics, which is the 3-letter code
    /// defined in ISO 4217. The daily average rate is used for the currency
    /// conversion.
    #[prost(string, tag = "4")]
    pub currency_code: ::prost::alloc::string::String,
}
/// The specification for generating an AdMob Network report.
/// For example, the specification to get clicks and estimated earnings for only
/// the 'US' and 'CN' countries can look like the following example:
///
///      {
///        'date_range': {
///          'start_date': {'year': 2018, 'month': 9, 'day': 1},
///          'end_date': {'year': 2018, 'month': 9, 'day': 30}
///        },
///        'dimensions': \['DATE', 'APP', 'COUNTRY'\],
///        'metrics': \['CLICKS', 'ESTIMATED_EARNINGS'\],
///        'dimension_filters': [
///          {
///            'dimension': 'COUNTRY',
///            'matches_any': {'values': \[{'value': 'US', 'value': 'CN'}\]}
///          }
///        ],
///        'sort_conditions': [
///          {'dimension':'APP', order: 'ASCENDING'},
///          {'metric':'CLICKS', order: 'DESCENDING'}
///        ],
///        'localization_settings': {
///          'currency_code': 'USD',
///          'language_code': 'en-US'
///        }
///      }
///
/// For a better understanding, you can treat the preceding specification like
/// the following pseudo SQL:
///
///      SELECT DATE, APP, COUNTRY, CLICKS, ESTIMATED_EARNINGS
///      FROM NETWORK_REPORT
///      WHERE DATE >= '2018-09-01' AND DATE <= '2018-09-30'
///          AND COUNTRY IN ('US', 'CN')
///      GROUP BY DATE, APP, COUNTRY
///      ORDER BY APP ASC, CLICKS DESC;
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct NetworkReportSpec {
    /// The date range for which the report is generated.
    #[prost(message, optional, tag = "1")]
    pub date_range: ::core::option::Option<DateRange>,
    /// List of dimensions of the report. The value combination of these dimensions
    /// determines the row of the report. If no dimensions are specified, the
    /// report returns a single row of requested metrics for the entire account.
    #[prost(enumeration = "network_report_spec::Dimension", repeated, tag = "2")]
    pub dimensions: ::prost::alloc::vec::Vec<i32>,
    /// List of metrics of the report. A report must specify at least one metric.
    #[prost(enumeration = "network_report_spec::Metric", repeated, tag = "3")]
    pub metrics: ::prost::alloc::vec::Vec<i32>,
    /// Describes which report rows to match based on their dimension values.
    #[prost(message, repeated, tag = "4")]
    pub dimension_filters: ::prost::alloc::vec::Vec<
        network_report_spec::DimensionFilter,
    >,
    /// Describes the sorting of report rows. The order of the condition in the
    /// list defines its precedence; the earlier the condition, the higher its
    /// precedence. If no sort conditions are specified, the row ordering is
    /// undefined.
    #[prost(message, repeated, tag = "5")]
    pub sort_conditions: ::prost::alloc::vec::Vec<network_report_spec::SortCondition>,
    /// Localization settings of the report.
    #[prost(message, optional, tag = "6")]
    pub localization_settings: ::core::option::Option<LocalizationSettings>,
    /// Maximum number of report data rows to return. If the value is not set, the
    /// API returns as many rows as possible, up to 100000. Acceptable values are
    /// 1-100000, inclusive. Any other values are treated as 100000.
    #[prost(int32, tag = "7")]
    pub max_report_rows: i32,
    /// A report time zone. Accepts an IANA TZ name values, such as
    /// "America/Los_Angeles."  If no time zone is defined, the account default
    /// takes effect. Check default value by the get account action.
    ///
    /// **Warning:** The "America/Los_Angeles" is the only supported value at
    /// the moment.
    #[prost(string, tag = "8")]
    pub time_zone: ::prost::alloc::string::String,
}
/// Nested message and enum types in `NetworkReportSpec`.
pub mod network_report_spec {
    /// Describes which report rows to match based on their dimension values.
    #[allow(clippy::derive_partial_eq_without_eq)]
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct DimensionFilter {
        /// Applies the filter criterion to the specified dimension.
        #[prost(enumeration = "Dimension", tag = "1")]
        pub dimension: i32,
        /// Filter operator to be applied.
        #[prost(oneof = "dimension_filter::Operator", tags = "2")]
        pub operator: ::core::option::Option<dimension_filter::Operator>,
    }
    /// Nested message and enum types in `DimensionFilter`.
    pub mod dimension_filter {
        /// Filter operator to be applied.
        #[allow(clippy::derive_partial_eq_without_eq)]
        #[derive(Clone, PartialEq, ::prost::Oneof)]
        pub enum Operator {
            /// Matches a row if its value for the specified dimension is in one of the
            /// values specified in this condition.
            #[prost(message, tag = "2")]
            MatchesAny(super::super::StringList),
        }
    }
    /// Sorting direction to be applied on a dimension or a metric.
    #[allow(clippy::derive_partial_eq_without_eq)]
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct SortCondition {
        /// Sorting order of the dimension or metric.
        #[prost(enumeration = "super::SortOrder", tag = "3")]
        pub order: i32,
        /// Identifies which values to sort on.
        #[prost(oneof = "sort_condition::SortOn", tags = "1, 2")]
        pub sort_on: ::core::option::Option<sort_condition::SortOn>,
    }
    /// Nested message and enum types in `SortCondition`.
    pub mod sort_condition {
        /// Identifies which values to sort on.
        #[allow(clippy::derive_partial_eq_without_eq)]
        #[derive(Clone, PartialEq, ::prost::Oneof)]
        pub enum SortOn {
            /// Sort by the specified dimension.
            #[prost(enumeration = "super::Dimension", tag = "1")]
            Dimension(i32),
            /// Sort by the specified metric.
            #[prost(enumeration = "super::Metric", tag = "2")]
            Metric(i32),
        }
    }
    /// The dimensions of the network report. Dimensions are data attributes to
    /// break down or refine the quantitative measurements (metrics) by certain
    /// attributes, such as the ad format or the platform an ad was viewed on.
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum Dimension {
        /// Default value for an unset field. Do not use.
        Unspecified = 0,
        /// A date in the YYYY-MM-DD format (for example, "2018-12-21"). Requests can
        /// specify at most one time dimension.
        Date = 1,
        /// A month in the YYYY-MM format (for example, "2018-12"). Requests can
        /// specify at most one time dimension.
        Month = 2,
        /// The date of the first day of a week in the YYYY-MM-DD format
        /// (for example, "2018-12-21"). Requests can specify at most one time
        /// dimension.
        Week = 3,
        /// The unique ID of the ad unit (for example, "ca-app-pub-1234/1234").
        /// If AD_UNIT dimension is specified, then APP is included automatically.
        AdUnit = 4,
        /// The unique ID of the mobile application (for example,
        /// "ca-app-pub-1234~1234").
        App = 5,
        /// Type of the ad (for example, "text" or "image"), an ad delivery
        /// dimension.
        ///
        /// **Warning:** The dimension is incompatible with
        /// [AD_REQUESTS](#Metric.ENUM_VALUES.AD_REQUESTS),
        /// [MATCH_RATE](#Metric.ENUM_VALUES.MATCH_RATE) and
        /// [IMPRESSION_RPM](#Metric.ENUM_VALUES.IMPRESSION_RPM) metrics.
        AdType = 6,
        /// CLDR country code of the place where the ad views/clicks occur (for
        /// example, "US" or "FR"). This is a geography dimension.
        Country = 7,
        /// Format of the ad unit (for example, "banner", "native"), an ad delivery
        /// dimension.
        Format = 8,
        /// Mobile OS platform of the app (for example, "Android" or "iOS").
        Platform = 9,
    }
    impl Dimension {
        /// String value of the enum field names used in the ProtoBuf definition.
        ///
        /// The values are not transformed in any way and thus are considered stable
        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
        pub fn as_str_name(&self) -> &'static str {
            match self {
                Dimension::Unspecified => "DIMENSION_UNSPECIFIED",
                Dimension::Date => "DATE",
                Dimension::Month => "MONTH",
                Dimension::Week => "WEEK",
                Dimension::AdUnit => "AD_UNIT",
                Dimension::App => "APP",
                Dimension::AdType => "AD_TYPE",
                Dimension::Country => "COUNTRY",
                Dimension::Format => "FORMAT",
                Dimension::Platform => "PLATFORM",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "DIMENSION_UNSPECIFIED" => Some(Self::Unspecified),
                "DATE" => Some(Self::Date),
                "MONTH" => Some(Self::Month),
                "WEEK" => Some(Self::Week),
                "AD_UNIT" => Some(Self::AdUnit),
                "APP" => Some(Self::App),
                "AD_TYPE" => Some(Self::AdType),
                "COUNTRY" => Some(Self::Country),
                "FORMAT" => Some(Self::Format),
                "PLATFORM" => Some(Self::Platform),
                _ => None,
            }
        }
    }
    /// The metrics of the network report. Metrics are quantitative measurements
    /// indicating how the publisher business is performing. They are aggregated
    /// from the individual ad events and grouped by the report dimensions. The
    /// metric value is either integer, or decimal (without rounding).
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum Metric {
        /// Default value for an unset field. Do not use.
        Unspecified = 0,
        /// The number of ad requests. The value is an integer.
        ///
        /// **Warning:** The metric is incompatible with
        /// [AD_TYPE](#Dimension.ENUM_VALUES.AD_TYPE) dimension.
        AdRequests = 1,
        /// The number of times a user clicks an ad. The value is an integer.
        Clicks = 2,
        /// The estimated earnings of the AdMob publisher. The currency unit (USD,
        /// EUR, or other) of the earning metrics are determined by the localization
        /// setting for currency. The amount is in micros. For example, $6.50 would
        /// be represented as 6500000.
        EstimatedEarnings = 3,
        /// The total number of ads shown to users. The value is an integer.
        Impressions = 4,
        /// The ratio of clicks over impressions. The value is a double precision
        /// (approximate) decimal value.
        ImpressionCtr = 5,
        /// The estimated earnings per thousand ad impressions. The value is in
        /// micros. For example, $1.03 would be represented as 1030000.
        ///
        /// **Warning:** The metric is incompatible with
        /// [AD_TYPE](#Dimension.ENUM_VALUES.AD_TYPE) dimension.
        ImpressionRpm = 6,
        /// The number of times ads are returned in response to a request. The value
        /// is an integer.
        MatchedRequests = 7,
        /// The ratio of matched ad requests over the total ad requests. The value is
        /// a double precision (approximate) decimal value.
        ///
        /// **Warning:** The metric is incompatible with
        /// [AD_TYPE](#Dimension.ENUM_VALUES.AD_TYPE) dimension.
        MatchRate = 8,
        /// The ratio of ads that are displayed over ads that are returned, defined
        /// as impressions / matched requests. The value is a double precision
        /// (approximate) decimal value.
        ShowRate = 9,
    }
    impl Metric {
        /// String value of the enum field names used in the ProtoBuf definition.
        ///
        /// The values are not transformed in any way and thus are considered stable
        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
        pub fn as_str_name(&self) -> &'static str {
            match self {
                Metric::Unspecified => "METRIC_UNSPECIFIED",
                Metric::AdRequests => "AD_REQUESTS",
                Metric::Clicks => "CLICKS",
                Metric::EstimatedEarnings => "ESTIMATED_EARNINGS",
                Metric::Impressions => "IMPRESSIONS",
                Metric::ImpressionCtr => "IMPRESSION_CTR",
                Metric::ImpressionRpm => "IMPRESSION_RPM",
                Metric::MatchedRequests => "MATCHED_REQUESTS",
                Metric::MatchRate => "MATCH_RATE",
                Metric::ShowRate => "SHOW_RATE",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "METRIC_UNSPECIFIED" => Some(Self::Unspecified),
                "AD_REQUESTS" => Some(Self::AdRequests),
                "CLICKS" => Some(Self::Clicks),
                "ESTIMATED_EARNINGS" => Some(Self::EstimatedEarnings),
                "IMPRESSIONS" => Some(Self::Impressions),
                "IMPRESSION_CTR" => Some(Self::ImpressionCtr),
                "IMPRESSION_RPM" => Some(Self::ImpressionRpm),
                "MATCHED_REQUESTS" => Some(Self::MatchedRequests),
                "MATCH_RATE" => Some(Self::MatchRate),
                "SHOW_RATE" => Some(Self::ShowRate),
                _ => None,
            }
        }
    }
}
/// The specification for generating an AdMob Mediation report.
/// For example, the specification to get observed ECPM sliced by ad source and
/// app for the 'US' and 'CN' countries can look like the following example:
///
///      {
///        "date_range": {
///          "start_date": {"year": 2018, "month": 9, "day": 1},
///          "end_date": {"year": 2018, "month": 9, "day": 30}
///        },
///        "dimensions": \["AD_SOURCE", "APP", "COUNTRY"\],
///        "metrics": \["OBSERVED_ECPM"\],
///        "dimension_filters": [
///          {
///            "dimension": "COUNTRY",
///            "matches_any": {"values": \[{"value": "US", "value": "CN"}\]}
///          }
///        ],
///        "sort_conditions": [
///          {"dimension":"APP", order: "ASCENDING"}
///        ],
///        "localization_settings": {
///          "currency_code": "USD",
///          "language_code": "en-US"
///        }
///      }
///
/// For a better understanding, you can treat the preceding specification like
/// the following pseudo SQL:
///
///      SELECT AD_SOURCE, APP, COUNTRY, OBSERVED_ECPM
///      FROM MEDIATION_REPORT
///      WHERE DATE >= '2018-09-01' AND DATE <= '2018-09-30'
///          AND COUNTRY IN ('US', 'CN')
///      GROUP BY AD_SOURCE, APP, COUNTRY
///      ORDER BY APP ASC;
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MediationReportSpec {
    /// The date range for which the report is generated.
    #[prost(message, optional, tag = "1")]
    pub date_range: ::core::option::Option<DateRange>,
    /// List of dimensions of the report. The value combination of these dimensions
    /// determines the row of the report. If no dimensions are specified, the
    /// report returns a single row of requested metrics for the entire account.
    #[prost(enumeration = "mediation_report_spec::Dimension", repeated, tag = "2")]
    pub dimensions: ::prost::alloc::vec::Vec<i32>,
    /// List of metrics of the report. A report must specify at least one metric.
    #[prost(enumeration = "mediation_report_spec::Metric", repeated, tag = "3")]
    pub metrics: ::prost::alloc::vec::Vec<i32>,
    /// Describes which report rows to match based on their dimension values.
    #[prost(message, repeated, tag = "4")]
    pub dimension_filters: ::prost::alloc::vec::Vec<
        mediation_report_spec::DimensionFilter,
    >,
    /// Describes the sorting of report rows. The order of the condition in the
    /// list defines its precedence; the earlier the condition, the higher its
    /// precedence. If no sort conditions are specified, the row ordering is
    /// undefined.
    #[prost(message, repeated, tag = "5")]
    pub sort_conditions: ::prost::alloc::vec::Vec<mediation_report_spec::SortCondition>,
    /// Localization settings of the report.
    #[prost(message, optional, tag = "6")]
    pub localization_settings: ::core::option::Option<LocalizationSettings>,
    /// Maximum number of report data rows to return. If the value is not set, the
    /// API returns as many rows as possible, up to 100000. Acceptable values are
    /// 1-100000, inclusive. Any other values are treated as 100000.
    #[prost(int32, tag = "7")]
    pub max_report_rows: i32,
    /// A report time zone. Accepts an IANA TZ name values, such as
    /// "America/Los_Angeles."  If no time zone is defined, the account default
    /// takes effect. Check default value by the get account action.
    ///
    /// **Warning:** The "America/Los_Angeles" is the only supported value at
    /// the moment.
    #[prost(string, tag = "8")]
    pub time_zone: ::prost::alloc::string::String,
}
/// Nested message and enum types in `MediationReportSpec`.
pub mod mediation_report_spec {
    /// Describes which report rows to match based on their dimension values.
    #[allow(clippy::derive_partial_eq_without_eq)]
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct DimensionFilter {
        /// Applies the filter criterion to the specified dimension.
        #[prost(enumeration = "Dimension", tag = "1")]
        pub dimension: i32,
        /// Filter operator to be applied.
        #[prost(oneof = "dimension_filter::Operator", tags = "2")]
        pub operator: ::core::option::Option<dimension_filter::Operator>,
    }
    /// Nested message and enum types in `DimensionFilter`.
    pub mod dimension_filter {
        /// Filter operator to be applied.
        #[allow(clippy::derive_partial_eq_without_eq)]
        #[derive(Clone, PartialEq, ::prost::Oneof)]
        pub enum Operator {
            /// Matches a row if its value for the specified dimension is in one of the
            /// values specified in this condition.
            #[prost(message, tag = "2")]
            MatchesAny(super::super::StringList),
        }
    }
    /// Sorting direction to be applied on a dimension or a metric.
    #[allow(clippy::derive_partial_eq_without_eq)]
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct SortCondition {
        /// Sorting order of the dimension or metric.
        #[prost(enumeration = "super::SortOrder", tag = "3")]
        pub order: i32,
        /// Identifies which values to sort on.
        #[prost(oneof = "sort_condition::SortOn", tags = "1, 2")]
        pub sort_on: ::core::option::Option<sort_condition::SortOn>,
    }
    /// Nested message and enum types in `SortCondition`.
    pub mod sort_condition {
        /// Identifies which values to sort on.
        #[allow(clippy::derive_partial_eq_without_eq)]
        #[derive(Clone, PartialEq, ::prost::Oneof)]
        pub enum SortOn {
            /// Sort by the specified dimension.
            #[prost(enumeration = "super::Dimension", tag = "1")]
            Dimension(i32),
            /// Sort by the specified metric.
            #[prost(enumeration = "super::Metric", tag = "2")]
            Metric(i32),
        }
    }
    /// The dimensions of the mediation report. Dimensions are data attributes to
    /// break down or refine the quantitative measurements (metrics) by certain
    /// attributes, such as the ad format or the platform an ad was viewed on.
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum Dimension {
        /// Default value for an unset field. Do not use.
        Unspecified = 0,
        /// A date in the YYYY-MM-DD format (for example, "2018-12-21"). Requests can
        /// specify at most one time dimension.
        Date = 1,
        /// A month in the YYYY-MM format (for example, "2018-12"). Requests can
        /// specify at most one time dimension.
        Month = 2,
        /// The date of the first day of a week in the YYYY-MM-DD format
        /// (for example, "2018-12-21"). Requests can specify at most one time
        /// dimension.
        Week = 3,
        /// The [unique ID of the ad source](/admob/api/v1/ad_sources) (for example,
        /// "5450213213286189855" and "AdMob Network" as label value).
        AdSource = 4,
        /// The unique ID of the ad source instance (for example,
        /// "ca-app-pub-1234#5678" and "AdMob (default)" as label value).
        AdSourceInstance = 5,
        /// The unique ID of the ad unit (for example, "ca-app-pub-1234/8790").
        /// If AD_UNIT dimension is specified, then APP is included automatically.
        AdUnit = 6,
        /// The unique ID of the mobile application (for example,
        /// "ca-app-pub-1234~1234").
        App = 7,
        /// The unique ID of the mediation group (for example,
        /// "ca-app-pub-1234:mg:1234" and "AdMob (default)" as label value).
        MediationGroup = 11,
        /// CLDR country code of the place where the ad views/clicks occur (for
        /// example, "US" or "FR"). This is a geography dimension.
        Country = 8,
        /// Format of the ad unit (for example, "banner", "native"), an ad delivery
        /// dimension.
        Format = 9,
        /// Mobile OS platform of the app (for example, "Android" or "iOS").
        Platform = 10,
    }
    impl Dimension {
        /// String value of the enum field names used in the ProtoBuf definition.
        ///
        /// The values are not transformed in any way and thus are considered stable
        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
        pub fn as_str_name(&self) -> &'static str {
            match self {
                Dimension::Unspecified => "DIMENSION_UNSPECIFIED",
                Dimension::Date => "DATE",
                Dimension::Month => "MONTH",
                Dimension::Week => "WEEK",
                Dimension::AdSource => "AD_SOURCE",
                Dimension::AdSourceInstance => "AD_SOURCE_INSTANCE",
                Dimension::AdUnit => "AD_UNIT",
                Dimension::App => "APP",
                Dimension::MediationGroup => "MEDIATION_GROUP",
                Dimension::Country => "COUNTRY",
                Dimension::Format => "FORMAT",
                Dimension::Platform => "PLATFORM",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "DIMENSION_UNSPECIFIED" => Some(Self::Unspecified),
                "DATE" => Some(Self::Date),
                "MONTH" => Some(Self::Month),
                "WEEK" => Some(Self::Week),
                "AD_SOURCE" => Some(Self::AdSource),
                "AD_SOURCE_INSTANCE" => Some(Self::AdSourceInstance),
                "AD_UNIT" => Some(Self::AdUnit),
                "APP" => Some(Self::App),
                "MEDIATION_GROUP" => Some(Self::MediationGroup),
                "COUNTRY" => Some(Self::Country),
                "FORMAT" => Some(Self::Format),
                "PLATFORM" => Some(Self::Platform),
                _ => None,
            }
        }
    }
    /// The metrics of the mediation report. Metrics are quantitative measurements
    /// indicating how the publisher business is performing. They are aggregated
    /// from the individual ad events and grouped by the report dimensions. The
    /// metric value is either integer, or decimal (without rounding).
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum Metric {
        /// Default value for an unset field. Do not use.
        Unspecified = 0,
        /// The number of requests. The value is an integer.
        AdRequests = 1,
        /// The number of times a user clicks an ad. The value is an integer.
        Clicks = 2,
        /// The estimated earnings of the AdMob publisher. The currency unit (USD,
        /// EUR, or other) of the earning metrics are determined by the localization
        /// setting for currency. The amount is in micros. For example, $6.50 would
        /// be represented as 6500000.
        ///
        /// Estimated earnings per mediation group and per ad source instance level
        /// is supported dating back to October 20, 2019. Third-party estimated
        /// earnings will show 0 for dates prior to October 20, 2019.
        EstimatedEarnings = 3,
        /// The total number of ads shown to users. The value is an integer.
        Impressions = 4,
        /// The ratio of clicks over impressions. The value is a double precision
        /// (approximate) decimal value.
        ImpressionCtr = 5,
        /// The number of times ads are returned in response to a request. The value
        /// is an integer.
        MatchedRequests = 6,
        /// The ratio of matched ad requests over the total ad requests. The value is
        /// a double precision (approximate) decimal value.
        MatchRate = 7,
        /// The third-party ad network's estimated average eCPM. The currency unit
        /// (USD, EUR, or other) of the earning metrics are determined by the
        /// localization setting for currency. The amount is in micros. For example,
        /// $2.30 would be represented as 2300000.
        ///
        /// The estimated average eCPM per mediation group and per ad source instance
        /// level is supported dating back to October 20, 2019. Third-party estimated
        /// average eCPM will show 0 for dates prior to October 20, 2019.
        ObservedEcpm = 8,
    }
    impl Metric {
        /// String value of the enum field names used in the ProtoBuf definition.
        ///
        /// The values are not transformed in any way and thus are considered stable
        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
        pub fn as_str_name(&self) -> &'static str {
            match self {
                Metric::Unspecified => "METRIC_UNSPECIFIED",
                Metric::AdRequests => "AD_REQUESTS",
                Metric::Clicks => "CLICKS",
                Metric::EstimatedEarnings => "ESTIMATED_EARNINGS",
                Metric::Impressions => "IMPRESSIONS",
                Metric::ImpressionCtr => "IMPRESSION_CTR",
                Metric::MatchedRequests => "MATCHED_REQUESTS",
                Metric::MatchRate => "MATCH_RATE",
                Metric::ObservedEcpm => "OBSERVED_ECPM",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "METRIC_UNSPECIFIED" => Some(Self::Unspecified),
                "AD_REQUESTS" => Some(Self::AdRequests),
                "CLICKS" => Some(Self::Clicks),
                "ESTIMATED_EARNINGS" => Some(Self::EstimatedEarnings),
                "IMPRESSIONS" => Some(Self::Impressions),
                "IMPRESSION_CTR" => Some(Self::ImpressionCtr),
                "MATCHED_REQUESTS" => Some(Self::MatchedRequests),
                "MATCH_RATE" => Some(Self::MatchRate),
                "OBSERVED_ECPM" => Some(Self::ObservedEcpm),
                _ => None,
            }
        }
    }
}
/// A row of the returning report.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ReportRow {
    /// Map of dimension values in a row, with keys as enum name of the dimensions.
    #[prost(btree_map = "string, message", tag = "1")]
    pub dimension_values: ::prost::alloc::collections::BTreeMap<
        ::prost::alloc::string::String,
        report_row::DimensionValue,
    >,
    /// Map of metric values in a row, with keys as enum name of the metrics. If
    /// a metric being requested has no value returned, the map will not include
    /// it.
    #[prost(btree_map = "string, message", tag = "2")]
    pub metric_values: ::prost::alloc::collections::BTreeMap<
        ::prost::alloc::string::String,
        report_row::MetricValue,
    >,
}
/// Nested message and enum types in `ReportRow`.
pub mod report_row {
    /// Representation of a dimension value.
    #[allow(clippy::derive_partial_eq_without_eq)]
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct DimensionValue {
        /// Dimension value in the format specified in the report's spec Dimension
        /// enum.
        #[prost(string, tag = "1")]
        pub value: ::prost::alloc::string::String,
        /// The localized string representation of the value. If unspecified, the
        /// display label should be derived from the value.
        #[prost(string, tag = "2")]
        pub display_label: ::prost::alloc::string::String,
    }
    /// Representation of a metric value.
    #[allow(clippy::derive_partial_eq_without_eq)]
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct MetricValue {
        /// Metric value in the format specified in the report's spec Metric enum
        /// name.
        #[prost(oneof = "metric_value::Value", tags = "1, 2, 3")]
        pub value: ::core::option::Option<metric_value::Value>,
    }
    /// Nested message and enum types in `MetricValue`.
    pub mod metric_value {
        /// Metric value in the format specified in the report's spec Metric enum
        /// name.
        #[allow(clippy::derive_partial_eq_without_eq)]
        #[derive(Clone, PartialEq, ::prost::Oneof)]
        pub enum Value {
            /// Metric integer value.
            #[prost(int64, tag = "1")]
            IntegerValue(i64),
            /// Double precision (approximate) decimal values. Rates are from 0 to 1.
            #[prost(double, tag = "2")]
            DoubleValue(f64),
            /// Amount in micros. One million is equivalent to one unit. Currency value
            /// is in the unit (USD, EUR or other) specified by the request.
            /// For example, $6.50 whould be represented as 6500000 micros.
            #[prost(int64, tag = "3")]
            MicrosValue(i64),
        }
    }
}
/// Warnings associated with generation of the report.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ReportWarning {
    /// Type of the warning.
    #[prost(enumeration = "report_warning::Type", tag = "1")]
    pub r#type: i32,
    /// Describes the details of the warning message, in English.
    #[prost(string, tag = "2")]
    pub description: ::prost::alloc::string::String,
}
/// Nested message and enum types in `ReportWarning`.
pub mod report_warning {
    /// Warning type.
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum Type {
        /// Default value for an unset field. Do not use.
        Unspecified = 0,
        /// Some data in this report is aggregated based on a time zone different
        /// from the requested time zone. This could happen if a local time-zone
        /// report has the start time before the last time this time zone changed.
        /// The description field will contain the date of the last time zone
        /// change.
        DataBeforeAccountTimezoneChange = 1,
        /// There is an unusual delay in processing the source data for the
        /// requested date range. The report results might be less up to date than
        /// usual. AdMob is aware of the issue and is actively working to resolve
        /// it.
        DataDelayed = 2,
        /// Warnings that are exposed without a specific type. Useful when new
        /// warning types are added but the API is not changed yet.
        Other = 3,
        /// The currency being requested is not the account currency. The earning
        /// metrics will be based on the requested currency, and thus not a good
        /// estimation of the final payment anymore, due to the currency rate
        /// fluctuation.
        ReportCurrencyNotAccountCurrency = 4,
    }
    impl Type {
        /// String value of the enum field names used in the ProtoBuf definition.
        ///
        /// The values are not transformed in any way and thus are considered stable
        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
        pub fn as_str_name(&self) -> &'static str {
            match self {
                Type::Unspecified => "TYPE_UNSPECIFIED",
                Type::DataBeforeAccountTimezoneChange => {
                    "DATA_BEFORE_ACCOUNT_TIMEZONE_CHANGE"
                }
                Type::DataDelayed => "DATA_DELAYED",
                Type::Other => "OTHER",
                Type::ReportCurrencyNotAccountCurrency => {
                    "REPORT_CURRENCY_NOT_ACCOUNT_CURRENCY"
                }
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "TYPE_UNSPECIFIED" => Some(Self::Unspecified),
                "DATA_BEFORE_ACCOUNT_TIMEZONE_CHANGE" => {
                    Some(Self::DataBeforeAccountTimezoneChange)
                }
                "DATA_DELAYED" => Some(Self::DataDelayed),
                "OTHER" => Some(Self::Other),
                "REPORT_CURRENCY_NOT_ACCOUNT_CURRENCY" => {
                    Some(Self::ReportCurrencyNotAccountCurrency)
                }
                _ => None,
            }
        }
    }
}
/// Groups data helps to treat the generated report. Always sent as a first
/// message in the stream response.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ReportHeader {
    /// The date range for which the report is generated. This is identical to the
    /// range specified in the report request.
    #[prost(message, optional, tag = "1")]
    pub date_range: ::core::option::Option<DateRange>,
    /// Localization settings of the report. This is identical to the settings
    /// in the report request.
    #[prost(message, optional, tag = "2")]
    pub localization_settings: ::core::option::Option<LocalizationSettings>,
    /// The report time zone. The value is a time-zone ID as specified by the CLDR
    /// project, for example, "America/Los_Angeles".
    #[prost(string, tag = "3")]
    pub reporting_time_zone: ::prost::alloc::string::String,
}
/// Groups data available after report generation, for example, warnings and row
/// counts. Always sent as the last message in the stream response.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ReportFooter {
    /// Warnings associated with generation of the report.
    #[prost(message, repeated, tag = "1")]
    pub warnings: ::prost::alloc::vec::Vec<ReportWarning>,
    /// Total number of rows that matched the request.
    ///
    /// Warning: This count does NOT always match the number of rows in the
    /// response. Do not make that assumption when processing the response.
    #[prost(int64, tag = "2")]
    pub matching_row_count: i64,
}
/// Specification of a single date range. Both dates are inclusive.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DateRange {
    /// Start date of the date range, inclusive. Must be less than or equal to the
    /// end date.
    #[prost(message, optional, tag = "1")]
    pub start_date: ::core::option::Option<super::super::super::r#type::Date>,
    /// End date of the date range, inclusive. Must be greater than or equal to the
    /// start date.
    #[prost(message, optional, tag = "2")]
    pub end_date: ::core::option::Option<super::super::super::r#type::Date>,
}
/// Localization settings for reports, such as currency and language. It affects
/// how metrics are calculated.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct LocalizationSettings {
    /// Currency code of the earning related metrics, which is the 3-letter code
    /// defined in ISO 4217. The daily average rate is used for the currency
    /// conversion. Defaults to the account currency code if unspecified.
    #[prost(string, tag = "1")]
    pub currency_code: ::prost::alloc::string::String,
    /// Language used for any localized text, such as some dimension value display
    /// labels. The language tag defined in the IETF BCP47. Defaults to 'en-US' if
    /// unspecified.
    #[prost(string, tag = "2")]
    pub language_code: ::prost::alloc::string::String,
}
/// List of string values.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StringList {
    /// The string values.
    #[prost(string, repeated, tag = "1")]
    pub values: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
/// The sorting order.
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum SortOrder {
    /// Default value for an unset field. Do not use.
    Unspecified = 0,
    /// Sort dimension value or metric value in ascending order.
    Ascending = 1,
    /// Sort dimension value or metric value in descending order.
    Descending = 2,
}
impl SortOrder {
    /// String value of the enum field names used in the ProtoBuf definition.
    ///
    /// The values are not transformed in any way and thus are considered stable
    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
    pub fn as_str_name(&self) -> &'static str {
        match self {
            SortOrder::Unspecified => "SORT_ORDER_UNSPECIFIED",
            SortOrder::Ascending => "ASCENDING",
            SortOrder::Descending => "DESCENDING",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "SORT_ORDER_UNSPECIFIED" => Some(Self::Unspecified),
            "ASCENDING" => Some(Self::Ascending),
            "DESCENDING" => Some(Self::Descending),
            _ => None,
        }
    }
}
/// Request to retrieve the specified publisher account.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetPublisherAccountRequest {
    /// Resource name of the publisher account to retrieve.
    /// Example: accounts/pub-9876543210987654
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
}
/// Request to retrieve the AdMob publisher account accessible with the client
/// credential. Currently all credentials have access to at most 1 account.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListPublisherAccountsRequest {
    /// Maximum number of accounts to return.
    #[prost(int32, tag = "1")]
    pub page_size: i32,
    /// The value returned by the last `ListPublisherAccountsResponse`; indicates
    /// that this is a continuation of a prior `ListPublisherAccounts` call, and
    /// that the system should return the next page of data.
    #[prost(string, tag = "2")]
    pub page_token: ::prost::alloc::string::String,
}
/// Response for the publisher account list request.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListPublisherAccountsResponse {
    /// Publisher that the client credentials can access.
    #[prost(message, repeated, tag = "1")]
    pub account: ::prost::alloc::vec::Vec<PublisherAccount>,
    /// If not empty, indicates that there might be more accounts for the request;
    /// you must pass this value in a new `ListPublisherAccountsRequest`.
    #[prost(string, tag = "2")]
    pub next_page_token: ::prost::alloc::string::String,
}
/// Request to generate an AdMob Mediation report.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GenerateMediationReportRequest {
    /// Resource name of the account to generate the report for.
    /// Example: accounts/pub-9876543210987654
    #[prost(string, tag = "1")]
    pub parent: ::prost::alloc::string::String,
    /// Network report specification.
    #[prost(message, optional, tag = "2")]
    pub report_spec: ::core::option::Option<MediationReportSpec>,
}
/// The streaming response for the AdMob Mediation report where the first
/// response contains the report header, then a stream of row responses, and
/// finally a footer as the last response message.
///
/// For example:
///
///      [{
///        "header": {
///          "date_range": {
///            "start_date": {"year": 2018, "month": 9, "day": 1},
///            "end_date": {"year": 2018, "month": 9, "day": 1}
///          },
///          "localization_settings": {
///            "currency_code": "USD",
///            "language_code": "en-US"
///          }
///        }
///      },
///      {
///        "row": {
///          "dimension_values": {
///            "DATE": {"value": "20180918"},
///            "APP": {
///              "value": "ca-app-pub-8123415297019784~1001342552",
///               "display_label": "My app name!"
///            }
///          },
///          "metric_values": {
///            "ESTIMATED_EARNINGS": {"decimal_value": "1324746"}
///          }
///        }
///      },
///      {
///        "footer": {"matching_row_count": 1}
///      }]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GenerateMediationReportResponse {
    /// Each stream response message contains one type of payload.
    #[prost(oneof = "generate_mediation_report_response::Payload", tags = "1, 2, 3")]
    pub payload: ::core::option::Option<generate_mediation_report_response::Payload>,
}
/// Nested message and enum types in `GenerateMediationReportResponse`.
pub mod generate_mediation_report_response {
    /// Each stream response message contains one type of payload.
    #[allow(clippy::derive_partial_eq_without_eq)]
    #[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum Payload {
        /// Report generation settings that describes the report contents, such as
        /// the report date range and localization settings.
        #[prost(message, tag = "1")]
        Header(super::ReportHeader),
        /// Actual report data.
        #[prost(message, tag = "2")]
        Row(super::ReportRow),
        /// Additional information about the generated report, such as warnings about
        /// the data.
        #[prost(message, tag = "3")]
        Footer(super::ReportFooter),
    }
}
/// Request to generate an AdMob Network report.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GenerateNetworkReportRequest {
    /// Resource name of the account to generate the report for.
    /// Example: accounts/pub-9876543210987654
    #[prost(string, tag = "1")]
    pub parent: ::prost::alloc::string::String,
    /// Network report specification.
    #[prost(message, optional, tag = "2")]
    pub report_spec: ::core::option::Option<NetworkReportSpec>,
}
/// The streaming response for the AdMob Network report where the first response
/// contains the report header, then a stream of row responses, and finally a
/// footer as the last response message.
///
/// For example:
///
///      [{
///        "header": {
///          "dateRange": {
///            "startDate": {"year": 2018, "month": 9, "day": 1},
///            "endDate": {"year": 2018, "month": 9, "day": 1}
///          },
///          "localizationSettings": {
///            "currencyCode": "USD",
///            "languageCode": "en-US"
///          }
///        }
///      },
///      {
///        "row": {
///          "dimensionValues": {
///            "DATE": {"value": "20180918"},
///            "APP": {
///              "value": "ca-app-pub-8123415297019784~1001342552",
///               displayLabel: "My app name!"
///            }
///          },
///          "metricValues": {
///            "ESTIMATED_EARNINGS": {"microsValue": 6500000}
///          }
///        }
///      },
///      {
///        "footer": {"matchingRowCount": 1}
///      }]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GenerateNetworkReportResponse {
    /// Each stream response message contains one type of payload.
    #[prost(oneof = "generate_network_report_response::Payload", tags = "1, 2, 3")]
    pub payload: ::core::option::Option<generate_network_report_response::Payload>,
}
/// Nested message and enum types in `GenerateNetworkReportResponse`.
pub mod generate_network_report_response {
    /// Each stream response message contains one type of payload.
    #[allow(clippy::derive_partial_eq_without_eq)]
    #[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum Payload {
        /// Report generation settings that describes the report contents, such as
        /// the report date range and localization settings.
        #[prost(message, tag = "1")]
        Header(super::ReportHeader),
        /// Actual report data.
        #[prost(message, tag = "2")]
        Row(super::ReportRow),
        /// Additional information about the generated report, such as warnings about
        /// the data.
        #[prost(message, tag = "3")]
        Footer(super::ReportFooter),
    }
}
/// Generated client implementations.
pub mod ad_mob_api_client {
    #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
    use tonic::codegen::*;
    use tonic::codegen::http::Uri;
    /// The AdMob API allows AdMob publishers programmatically get information about
    /// their AdMob account.
    #[derive(Debug, Clone)]
    pub struct AdMobApiClient<T> {
        inner: tonic::client::Grpc<T>,
    }
    impl<T> AdMobApiClient<T>
    where
        T: tonic::client::GrpcService<tonic::body::BoxBody>,
        T::Error: Into<StdError>,
        T::ResponseBody: Body<Data = Bytes> + Send + 'static,
        <T::ResponseBody as Body>::Error: Into<StdError> + Send,
    {
        pub fn new(inner: T) -> Self {
            let inner = tonic::client::Grpc::new(inner);
            Self { inner }
        }
        pub fn with_origin(inner: T, origin: Uri) -> Self {
            let inner = tonic::client::Grpc::with_origin(inner, origin);
            Self { inner }
        }
        pub fn with_interceptor<F>(
            inner: T,
            interceptor: F,
        ) -> AdMobApiClient<InterceptedService<T, F>>
        where
            F: tonic::service::Interceptor,
            T::ResponseBody: Default,
            T: tonic::codegen::Service<
                http::Request<tonic::body::BoxBody>,
                Response = http::Response<
                    <T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
                >,
            >,
            <T as tonic::codegen::Service<
                http::Request<tonic::body::BoxBody>,
            >>::Error: Into<StdError> + Send + Sync,
        {
            AdMobApiClient::new(InterceptedService::new(inner, interceptor))
        }
        /// Compress requests with the given encoding.
        ///
        /// This requires the server to support it otherwise it might respond with an
        /// error.
        #[must_use]
        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
            self.inner = self.inner.send_compressed(encoding);
            self
        }
        /// Enable decompressing responses.
        #[must_use]
        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
            self.inner = self.inner.accept_compressed(encoding);
            self
        }
        /// Limits the maximum size of a decoded message.
        ///
        /// Default: `4MB`
        #[must_use]
        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
            self.inner = self.inner.max_decoding_message_size(limit);
            self
        }
        /// Limits the maximum size of an encoded message.
        ///
        /// Default: `usize::MAX`
        #[must_use]
        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
            self.inner = self.inner.max_encoding_message_size(limit);
            self
        }
        /// Gets information about the specified AdMob publisher account.
        pub async fn get_publisher_account(
            &mut self,
            request: impl tonic::IntoRequest<super::GetPublisherAccountRequest>,
        ) -> std::result::Result<
            tonic::Response<super::PublisherAccount>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::new(
                        tonic::Code::Unknown,
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.ads.admob.v1.AdMobApi/GetPublisherAccount",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.ads.admob.v1.AdMobApi",
                        "GetPublisherAccount",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Lists the AdMob publisher account accessible with the client credential.
        /// Currently, all credentials have access to at most one AdMob account.
        pub async fn list_publisher_accounts(
            &mut self,
            request: impl tonic::IntoRequest<super::ListPublisherAccountsRequest>,
        ) -> std::result::Result<
            tonic::Response<super::ListPublisherAccountsResponse>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::new(
                        tonic::Code::Unknown,
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.ads.admob.v1.AdMobApi/ListPublisherAccounts",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.ads.admob.v1.AdMobApi",
                        "ListPublisherAccounts",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Generates an AdMob Network report based on the provided report
        /// specification.
        pub async fn generate_network_report(
            &mut self,
            request: impl tonic::IntoRequest<super::GenerateNetworkReportRequest>,
        ) -> std::result::Result<
            tonic::Response<
                tonic::codec::Streaming<super::GenerateNetworkReportResponse>,
            >,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::new(
                        tonic::Code::Unknown,
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.ads.admob.v1.AdMobApi/GenerateNetworkReport",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.ads.admob.v1.AdMobApi",
                        "GenerateNetworkReport",
                    ),
                );
            self.inner.server_streaming(req, path, codec).await
        }
        /// Generates an AdMob Mediation report based on the provided report
        /// specification.
        pub async fn generate_mediation_report(
            &mut self,
            request: impl tonic::IntoRequest<super::GenerateMediationReportRequest>,
        ) -> std::result::Result<
            tonic::Response<
                tonic::codec::Streaming<super::GenerateMediationReportResponse>,
            >,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::new(
                        tonic::Code::Unknown,
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.ads.admob.v1.AdMobApi/GenerateMediationReport",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.ads.admob.v1.AdMobApi",
                        "GenerateMediationReport",
                    ),
                );
            self.inner.server_streaming(req, path, codec).await
        }
    }
}