• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright 2022 Google LLC
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 package com.google.android.libraries.mobiledatadownload;
17 
18 import com.google.auto.value.AutoValue;
19 import com.google.mobiledatadownload.ClientConfigProto.ClientFileGroup;
20 
21 /**
22  * Represents errors with or usage of a file group. This information will be reported to MDD which
23  * will log it to clearcut.
24  */
25 @AutoValue
26 public abstract class UsageEvent {
eventCode()27   public abstract int eventCode();
28 
appVersion()29   public abstract long appVersion();
30 
clientFileGroup()31   public abstract ClientFileGroup clientFileGroup();
32 
builder()33   public static Builder builder() {
34     return new AutoValue_UsageEvent.Builder();
35   }
36 
37   /** Builder for UsageEvent. */
38   @AutoValue.Builder
39   public abstract static class Builder {
setEventCode(int eventCode)40     public abstract Builder setEventCode(int eventCode);
41 
setAppVersion(long appVersion)42     public abstract Builder setAppVersion(long appVersion);
43 
setClientFileGroup(ClientFileGroup clientFileGroup)44     public abstract Builder setClientFileGroup(ClientFileGroup clientFileGroup);
45 
build()46     public abstract UsageEvent build();
47   }
48 }
49