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 AdServicesEpochComputationGetTopTopicsReported atom. */ 22 @AutoValue 23 public abstract class EpochComputationGetTopTopicsStats { 24 25 /** @return number of top topics generated. */ getTopTopicCount()26 public abstract int getTopTopicCount(); 27 28 /** @return number of padded random topics generated. */ getPaddedRandomTopicsCount()29 public abstract int getPaddedRandomTopicsCount(); 30 31 /** @return number of apps considered for calculating top topics. */ getAppsConsideredCount()32 public abstract int getAppsConsideredCount(); 33 34 /** @return number of sdks that called Topics API in the epoch. */ getSdksConsideredCount()35 public abstract int getSdksConsideredCount(); 36 37 /** @return generic builder. */ builder()38 public static EpochComputationGetTopTopicsStats.Builder builder() { 39 return new AutoValue_EpochComputationGetTopTopicsStats.Builder(); 40 } 41 42 /** Builder class for {@link EpochComputationGetTopTopicsStats}. */ 43 @AutoValue.Builder 44 public abstract static class Builder { 45 /** Set number of top topics generated. */ setTopTopicCount(int value)46 public abstract EpochComputationGetTopTopicsStats.Builder setTopTopicCount(int value); 47 48 /** Set number of padded random topics generated. */ setPaddedRandomTopicsCount( int value)49 public abstract EpochComputationGetTopTopicsStats.Builder setPaddedRandomTopicsCount( 50 int value); 51 52 /** Set number of apps considered for calculating top topics. */ setAppsConsideredCount(int value)53 public abstract EpochComputationGetTopTopicsStats.Builder setAppsConsideredCount(int value); 54 55 /** Set number of sdks that called Topics API in the epoch. */ setSdksConsideredCount(int value)56 public abstract EpochComputationGetTopTopicsStats.Builder setSdksConsideredCount(int value); 57 58 /** build for {@link EpochComputationGetTopTopicsStats}. */ build()59 public abstract EpochComputationGetTopTopicsStats build(); 60 } 61 } 62