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 AD_SERVICES_MEASUREMENT_DEBUG_KEYS_MATCH atom. */ 22 @AutoValue 23 public abstract class MsmtDebugKeysMatchStats { 24 25 /** @return Ad-tech enrollment ID. */ getAdTechEnrollmentId()26 public abstract String getAdTechEnrollmentId(); 27 28 /** @return Attribution type. */ getAttributionType()29 public abstract int getAttributionType(); 30 31 /** @return true, if debug join keys match between source and trigger. */ isMatched()32 public abstract boolean isMatched(); 33 34 /** @return Hashed value of debug join key. */ getDebugJoinKeyHashedValue()35 public abstract long getDebugJoinKeyHashedValue(); 36 37 /** @return Hash limit used to hash the debug join key value. */ getDebugJoinKeyHashLimit()38 public abstract long getDebugJoinKeyHashLimit(); 39 40 /** 41 * @return source registrant. 42 */ getSourceRegistrant()43 public abstract String getSourceRegistrant(); 44 45 /** @return generic builder. */ builder()46 public static MsmtDebugKeysMatchStats.Builder builder() { 47 return new AutoValue_MsmtDebugKeysMatchStats.Builder(); 48 } 49 50 /** Builder class for {@link MsmtDebugKeysMatchStats}. */ 51 @AutoValue.Builder 52 public abstract static class Builder { 53 /** Set Ad-tech enrollment ID. */ setAdTechEnrollmentId(String value)54 public abstract MsmtDebugKeysMatchStats.Builder setAdTechEnrollmentId(String value); 55 56 /** Set attribution type. */ setAttributionType(int value)57 public abstract MsmtDebugKeysMatchStats.Builder setAttributionType(int value); 58 59 /** Set to true, if debug join keys match between source and trigger. */ setMatched(boolean value)60 public abstract Builder setMatched(boolean value); 61 62 /** Set debug join key hashed value. */ setDebugJoinKeyHashedValue(long value)63 public abstract MsmtDebugKeysMatchStats.Builder setDebugJoinKeyHashedValue(long value); 64 65 /** Set limit of debug join key hashed value is calculated. */ setDebugJoinKeyHashLimit(long value)66 public abstract MsmtDebugKeysMatchStats.Builder setDebugJoinKeyHashLimit(long value); 67 68 /** Set source registrant. */ setSourceRegistrant(String value)69 public abstract MsmtDebugKeysMatchStats.Builder setSourceRegistrant(String value); 70 71 /** build for {@link MsmtDebugKeysMatchStats}. */ build()72 public abstract MsmtDebugKeysMatchStats build(); 73 } 74 } 75