• 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.data.customaudience;
18 
19 import androidx.annotation.NonNull;
20 
21 import com.google.auto.value.AutoValue;
22 
23 import java.util.Collections;
24 import java.util.List;
25 
26 /** */
27 @AutoValue
28 public abstract class DBScheduledCustomAudienceUpdateRequest {
29     /**
30      * @return delayed {@link DBScheduledCustomAudienceUpdate} for this update request
31      */
getUpdate()32     public abstract @NonNull DBScheduledCustomAudienceUpdate getUpdate();
33 
34     /**
35      * @return overrides for incoming custom audiences
36      */
getPartialCustomAudienceList()37     public abstract @NonNull List<DBPartialCustomAudience> getPartialCustomAudienceList();
38 
39     /**
40      * @return custom audiences requested to be left with this update request
41      */
getCustomAudienceToLeaveList()42     public abstract @NonNull List<DBCustomAudienceToLeave> getCustomAudienceToLeaveList();
43 
44     /** Builder for creating an object of type {@link DBScheduledCustomAudienceUpdateRequest} */
builder()45     public static Builder builder() {
46         return new AutoValue_DBScheduledCustomAudienceUpdateRequest.Builder()
47                 .setPartialCustomAudienceList(Collections.emptyList())
48                 .setCustomAudienceToLeaveList(Collections.emptyList());
49     }
50 
51     @AutoValue.Builder
52     public abstract static class Builder {
53         /** see {@link #getUpdate()} */
setUpdate(DBScheduledCustomAudienceUpdate update)54         public abstract Builder setUpdate(DBScheduledCustomAudienceUpdate update);
55 
56         /** see {@link #getPartialCustomAudienceList()} */
setPartialCustomAudienceList(List<DBPartialCustomAudience> list)57         public abstract Builder setPartialCustomAudienceList(List<DBPartialCustomAudience> list);
58 
59         /** see {@link #getCustomAudienceToLeaveList()} */
setCustomAudienceToLeaveList(List<DBCustomAudienceToLeave> list)60         public abstract Builder setCustomAudienceToLeaveList(List<DBCustomAudienceToLeave> list);
61 
62         /** Builds a {@link DBScheduledCustomAudienceUpdateRequest.Builder} */
build()63         public abstract DBScheduledCustomAudienceUpdateRequest build();
64     }
65 }
66