1 /*
2  * Copyright (C) 2023 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 package com.android.adservices.service.stats;
17 
18 import com.google.auto.value.AutoValue;
19 
20 /** Class for AD_SERVICES_MEASUREMENT_AD_ID_MATCH_FOR_DEBUG_KEYS atom. */
21 @AutoValue
22 public abstract class MsmtAdIdMatchForDebugKeysStats {
23     /**
24      * @return Ad-tech enrollment ID.
25      */
getAdTechEnrollmentId()26     public abstract String getAdTechEnrollmentId();
27 
28     /**
29      * @return Attribution type.
30      */
getAttributionType()31     public abstract int getAttributionType();
32 
33     /**
34      * @return true, if the debug AdID provided by the Ad-tech on web registration matches the
35      *     platform AdID value.
36      */
isMatched()37     public abstract boolean isMatched();
38 
39     /**
40      * @return Number of unique AdIDs an Ad-tech has provided for matching.
41      */
getNumUniqueAdIds()42     public abstract long getNumUniqueAdIds();
43 
44     /**
45      * @return Limit on number of unique AdIDs an Ad-tech is allowed.
46      */
getNumUniqueAdIdsLimit()47     public abstract long getNumUniqueAdIdsLimit();
48 
49     /**
50      * @return source registrant.
51      */
getSourceRegistrant()52     public abstract String getSourceRegistrant();
53 
54     /**
55      * @return generic builder.
56      */
builder()57     public static MsmtAdIdMatchForDebugKeysStats.Builder builder() {
58         return new AutoValue_MsmtAdIdMatchForDebugKeysStats.Builder();
59     }
60 
61     /** Builder class for {@link MsmtAdIdMatchForDebugKeysStats} */
62     @AutoValue.Builder
63     public abstract static class Builder {
64         /** Set Ad-tech enrollment ID. */
setAdTechEnrollmentId(String value)65         public abstract Builder setAdTechEnrollmentId(String value);
66 
67         /** Set attribution type. */
setAttributionType(int value)68         public abstract Builder setAttributionType(int value);
69 
70         /**
71          * Set to true, if the debug AdID provided by the Ad-tech on web registration matches the
72          * platform AdID value.
73          */
setMatched(boolean value)74         public abstract Builder setMatched(boolean value);
75 
76         /** Set number of unique AdIDs an Ad-tech has provided for matching. */
setNumUniqueAdIds(long value)77         public abstract Builder setNumUniqueAdIds(long value);
78 
79         /** Set limit on number of unique AdIDs an Ad-tech is allowed. */
setNumUniqueAdIdsLimit(long value)80         public abstract Builder setNumUniqueAdIdsLimit(long value);
81 
82         /** Set source registrant. */
setSourceRegistrant(String value)83         public abstract Builder setSourceRegistrant(String value);
84 
85         /** build for {@link MsmtAdIdMatchForDebugKeysStats} */
build()86         public abstract MsmtAdIdMatchForDebugKeysStats build();
87     }
88 }
89