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 android.annotation.NonNull;
20 
21 import com.google.auto.value.AutoValue;
22 
23 /** Class for runAdSelection process reported stats. */
24 @AutoValue
25 public abstract class RunAdSelectionProcessReportedStats {
26     /** @return isRemarketingAdsWon. */
getIsRemarketingAdsWon()27     public abstract boolean getIsRemarketingAdsWon();
28 
29     /** @return DBAdSelectionSizeInBytes. */
getDBAdSelectionSizeInBytes()30     public abstract int getDBAdSelectionSizeInBytes();
31 
32     /** @return persistAdSelectionLatencyInMills. */
getPersistAdSelectionLatencyInMillis()33     public abstract int getPersistAdSelectionLatencyInMillis();
34 
35     /** @return persistAdSelectionResultCode. */
getPersistAdSelectionResultCode()36     public abstract int getPersistAdSelectionResultCode();
37 
38     /** @return runAdSelectionLatencyInMillis. */
getRunAdSelectionLatencyInMillis()39     public abstract int getRunAdSelectionLatencyInMillis();
40 
41     /** @return runAdSelectionResultCode. */
getRunAdSelectionResultCode()42     public abstract int getRunAdSelectionResultCode();
43 
44     /** @return generic builder. */
builder()45     public static Builder builder() {
46         return new AutoValue_RunAdSelectionProcessReportedStats.Builder();
47     }
48 
49     /** Builder class for {@link RunAdSelectionProcessReportedStats}. */
50     @AutoValue.Builder
51     public abstract static class Builder {
52         /** See {@link RunAdSelectionProcessReportedStats#getIsRemarketingAdsWon()} */
53         @NonNull
setIsRemarketingAdsWon(boolean value)54         public abstract Builder setIsRemarketingAdsWon(boolean value);
55 
56         /** See {@link RunAdSelectionProcessReportedStats#getDBAdSelectionSizeInBytes()} */
57         @NonNull
setDBAdSelectionSizeInBytes(int value)58         public abstract Builder setDBAdSelectionSizeInBytes(int value);
59 
60         /** See {@link RunAdSelectionProcessReportedStats#getPersistAdSelectionLatencyInMillis()} */
61         @NonNull
setPersistAdSelectionLatencyInMillis(int value)62         public abstract Builder setPersistAdSelectionLatencyInMillis(int value);
63 
64         /** See {@link RunAdSelectionProcessReportedStats#getPersistAdSelectionResultCode()} */
65         @NonNull
setPersistAdSelectionResultCode(int value)66         public abstract Builder setPersistAdSelectionResultCode(int value);
67 
68         /** See {@link RunAdSelectionProcessReportedStats#getRunAdSelectionLatencyInMillis()} */
69         @NonNull
setRunAdSelectionLatencyInMillis(int value)70         public abstract Builder setRunAdSelectionLatencyInMillis(int value);
71 
72         /** See {@link RunAdSelectionProcessReportedStats#getRunAdSelectionResultCode()} */
73         @NonNull
setRunAdSelectionResultCode(int value)74         public abstract Builder setRunAdSelectionResultCode(int value);
75 
76         /** Build the {@link RunAdSelectionProcessReportedStats} */
77         @NonNull
build()78         public abstract RunAdSelectionProcessReportedStats build();
79     }
80 }
81