• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2022 The Android Open Source Project
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 package com.android.adservices.service.stats;
18 
19 import com.google.auto.value.AutoValue;
20 
21 /**
22  * Class for AdServicesGetTopicsReported atom (for T+ logging) and
23  * AdServicesBackCompatGetTopicsReported atom (for R+ logging).
24  *
25  * <p>See go/rbc-ww-logging for more details.
26  */
27 @AutoValue
28 public abstract class GetTopicsReportedStats {
29     /** @return number of topic ids filtered due to duplication. */
getDuplicateTopicCount()30     public abstract int getDuplicateTopicCount();
31 
32     /** @return number of topic ids filtered due to being blocked. */
getFilteredBlockedTopicCount()33     public abstract int getFilteredBlockedTopicCount();
34 
35     /** @return number of topic ids returned. */
getTopicIdsCount()36     public abstract int getTopicIdsCount();
37 
38     /** @return generic builder. */
builder()39     public static GetTopicsReportedStats.Builder builder() {
40         return new AutoValue_GetTopicsReportedStats.Builder();
41     }
42 
43     /** Builder class for {@link GetTopicsReportedStats}. */
44     @AutoValue.Builder
45     public abstract static class Builder {
46         /** Set duplicate topic count. */
setDuplicateTopicCount(int value)47         public abstract GetTopicsReportedStats.Builder setDuplicateTopicCount(int value);
48 
49         /** Set filtered blocked topic count. */
setFilteredBlockedTopicCount(int value)50         public abstract GetTopicsReportedStats.Builder setFilteredBlockedTopicCount(int value);
51 
52         /** Set number of topic ids returned. */
setTopicIdsCount(int value)53         public abstract GetTopicsReportedStats.Builder setTopicIdsCount(int value);
54 
55         /** build for {@link GetTopicsReportedStats}. */
build()56         public abstract GetTopicsReportedStats build();
57     }
58 }
59