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 /** @return generic builder. */ builder()41 public static MsmtDebugKeysMatchStats.Builder builder() { 42 return new AutoValue_MsmtDebugKeysMatchStats.Builder(); 43 } 44 45 /** Builder class for {@link MsmtDebugKeysMatchStats}. */ 46 @AutoValue.Builder 47 public abstract static class Builder { 48 /** Set Ad-tech enrollment ID. */ setAdTechEnrollmentId(String value)49 public abstract MsmtDebugKeysMatchStats.Builder setAdTechEnrollmentId(String value); 50 51 /** Set attribution type. */ setAttributionType(int value)52 public abstract MsmtDebugKeysMatchStats.Builder setAttributionType(int value); 53 54 /** Set to true, if debug join keys match between source and trigger. */ setMatched(boolean value)55 public abstract Builder setMatched(boolean value); 56 57 /** Set debug join key hashed value. */ setDebugJoinKeyHashedValue(long value)58 public abstract MsmtDebugKeysMatchStats.Builder setDebugJoinKeyHashedValue(long value); 59 60 /** Set limit of debug join key hashed value is calculated. */ setDebugJoinKeyHashLimit(long value)61 public abstract MsmtDebugKeysMatchStats.Builder setDebugJoinKeyHashLimit(long value); 62 63 /** build for {@link MsmtDebugKeysMatchStats}. */ build()64 public abstract MsmtDebugKeysMatchStats build(); 65 } 66 } 67