1 /* 2 * Copyright (C) 2024 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 static com.android.adservices.service.stats.AdsRelevanceStatusUtils.BACKGROUND_KEY_FETCH_STATUS_UNSET; 20 21 import com.google.auto.value.AutoValue; 22 23 /** Class for Server Auction Background Key Fetch scheduled stats */ 24 @AutoValue 25 public abstract class ServerAuctionBackgroundKeyFetchScheduledStats { 26 /** The status of the Server Auction Background Key Fetch scheduled in AdServices */ 27 @AdsRelevanceStatusUtils.BackgroundKeyFetchStatus getStatus()28 public abstract int getStatus(); 29 30 /** The count of auction urls */ getCountAuctionUrls()31 public abstract int getCountAuctionUrls(); 32 33 /** The count of join urls */ getCountJoinUrls()34 public abstract int getCountJoinUrls(); 35 36 /** Returns a generic builder. */ builder()37 public static Builder builder() { 38 return new AutoValue_ServerAuctionBackgroundKeyFetchScheduledStats.Builder() 39 .setStatus(BACKGROUND_KEY_FETCH_STATUS_UNSET); 40 } 41 42 /** Builder class for ServerAuctionBackgroundKeyFetchScheduledStats. */ 43 @AutoValue.Builder 44 public abstract static class Builder { 45 /** Sets the status of the Server Auction Background Key Fetch scheduled in AdServices */ setStatus( @dsRelevanceStatusUtils.BackgroundKeyFetchStatus int status)46 public abstract Builder setStatus( 47 @AdsRelevanceStatusUtils.BackgroundKeyFetchStatus int status); 48 49 /** Sets the count of auction urls */ setCountAuctionUrls(int countAuctionUrls)50 public abstract Builder setCountAuctionUrls(int countAuctionUrls); 51 52 /** Sets the join of auction urls */ setCountJoinUrls(int countJoinUrls)53 public abstract Builder setCountJoinUrls(int countJoinUrls); 54 55 /** Builds the {@link ServerAuctionBackgroundKeyFetchScheduledStats} object. */ build()56 public abstract ServerAuctionBackgroundKeyFetchScheduledStats build(); 57 } 58 } 59