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 /** Class for runAdBidding process reported stats. */
22 @AutoValue
23 public abstract class RunAdBiddingProcessReportedStats {
24     /** @return getBuyersCustomAudienceLatencyInMills. */
getGetBuyersCustomAudienceLatencyInMills()25     public abstract int getGetBuyersCustomAudienceLatencyInMills();
26 
27     /** @return getBuyersCustomAudience result code. */
getGetBuyersCustomAudienceResultCode()28     public abstract int getGetBuyersCustomAudienceResultCode();
29 
30     /** @return num of buyers requests. */
getNumBuyersRequested()31     public abstract int getNumBuyersRequested();
32 
33     /** @return num of buyers fetched. */
getNumBuyersFetched()34     public abstract int getNumBuyersFetched();
35 
36     /** @return num of ads entered bidding. */
getNumOfAdsEnteringBidding()37     public abstract int getNumOfAdsEnteringBidding();
38 
39     /** @return num of CAs entered bidding. */
getNumOfCasEnteringBidding()40     public abstract int getNumOfCasEnteringBidding();
41 
42     /** @return num of CAs post bidding. */
getNumOfCasPostBidding()43     public abstract int getNumOfCasPostBidding();
44 
45     /** @return ratio of CAs selected rmkt ads. */
getRatioOfCasSelectingRmktAds()46     public abstract float getRatioOfCasSelectingRmktAds();
47 
48     /** @return runAdBidding latency in milliseconds. */
getRunAdBiddingLatencyInMillis()49     public abstract int getRunAdBiddingLatencyInMillis();
50 
51     /** @return runAdBidding result code. */
getRunAdBiddingResultCode()52     public abstract int getRunAdBiddingResultCode();
53 
54     /** @return total ad bidding stage latency in milliseconds. */
getTotalAdBiddingStageLatencyInMillis()55     public abstract int getTotalAdBiddingStageLatencyInMillis();
56 
builder()57     static Builder builder() {
58         return new AutoValue_RunAdBiddingProcessReportedStats.Builder();
59     }
60 
61     /** Builder class for RunAdBiddingProcessReportedStats. */
62     @AutoValue.Builder
63     abstract static class Builder {
setGetBuyersCustomAudienceLatencyInMills(int value)64         abstract Builder setGetBuyersCustomAudienceLatencyInMills(int value);
65 
setGetBuyersCustomAudienceResultCode(int value)66         abstract Builder setGetBuyersCustomAudienceResultCode(int value);
67 
setNumBuyersRequested(int value)68         abstract Builder setNumBuyersRequested(int value);
69 
setNumBuyersFetched(int value)70         abstract Builder setNumBuyersFetched(int value);
71 
setNumOfAdsEnteringBidding(int value)72         abstract Builder setNumOfAdsEnteringBidding(int value);
73 
setNumOfCasEnteringBidding(int value)74         abstract Builder setNumOfCasEnteringBidding(int value);
75 
setNumOfCasPostBidding(int value)76         abstract Builder setNumOfCasPostBidding(int value);
77 
setRatioOfCasSelectingRmktAds(float value)78         abstract Builder setRatioOfCasSelectingRmktAds(float value);
79 
setRunAdBiddingLatencyInMillis(int value)80         abstract Builder setRunAdBiddingLatencyInMillis(int value);
81 
setRunAdBiddingResultCode(int value)82         abstract Builder setRunAdBiddingResultCode(int value);
83 
setTotalAdBiddingStageLatencyInMillis(int value)84         abstract Builder setTotalAdBiddingStageLatencyInMillis(int value);
85 
build()86         abstract RunAdBiddingProcessReportedStats build();
87     }
88 }
89