• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 com.google.auto.value.AutoValue;
20 
21 @AutoValue
22 public abstract class ScheduledCustomAudienceUpdatePerformedFailureStats {
23 
24     /** Returns the action where the failure occurred. */
25     @AdsRelevanceStatusUtils.ScheduleCustomAudienceUpdatePerformedFailureAction
getFailureAction()26     public abstract int getFailureAction();
27 
28     /** Returns the type of failure occurred. */
29     @AdsRelevanceStatusUtils.ScheduleCustomAudienceUpdatePerformedFailureType
getFailureType()30     public abstract int getFailureType();
31 
32     /**
33      * Returns a new builder for creating an instance of {@link
34      * ScheduledCustomAudienceUpdatePerformedFailureStats}.
35      */
builder()36     public static Builder builder() {
37         return new AutoValue_ScheduledCustomAudienceUpdatePerformedFailureStats.Builder();
38     }
39 
40     @AutoValue.Builder
41     public abstract static class Builder {
42         /** Sets the action where the failure occurred. */
setFailureAction( @dsRelevanceStatusUtils.ScheduleCustomAudienceUpdatePerformedFailureAction int failureAction)43         public abstract Builder setFailureAction(
44                 @AdsRelevanceStatusUtils.ScheduleCustomAudienceUpdatePerformedFailureAction
45                         int failureAction);
46 
47         /** Sets the type of failure occurred. */
setFailureType( @dsRelevanceStatusUtils.ScheduleCustomAudienceUpdatePerformedFailureType int failureType)48         public abstract Builder setFailureType(
49                 @AdsRelevanceStatusUtils.ScheduleCustomAudienceUpdatePerformedFailureType
50                         int failureType);
51 
52         /**
53          * Returns a new {@link ScheduledCustomAudienceUpdatePerformedFailureStats} instance built
54          * from the values set on this builder.
55          */
build()56         public abstract ScheduledCustomAudienceUpdatePerformedFailureStats build();
57     }
58 }
59